Merge V8 5.2.361.47 DO NOT MERGE
https://chromium.googlesource.com/v8/v8/+/5.2.361.47
FPIIM-449
Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/test/benchmarks/benchmarks.gyp b/test/benchmarks/benchmarks.gyp
index 3884b09..0822ee4 100644
--- a/test/benchmarks/benchmarks.gyp
+++ b/test/benchmarks/benchmarks.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'benchmarks.isolate',
diff --git a/test/bot_default.gyp b/test/bot_default.gyp
index 9b39f58..0467918 100644
--- a/test/bot_default.gyp
+++ b/test/bot_default.gyp
@@ -20,8 +20,8 @@
'webkit/webkit.gyp:webkit_run',
],
'includes': [
- '../build/features.gypi',
- '../build/isolate.gypi',
+ '../gypfiles/features.gypi',
+ '../gypfiles/isolate.gypi',
],
'sources': [
'bot_default.isolate',
diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp
index 2e00e88..e33ee81 100644
--- a/test/cctest/cctest.gyp
+++ b/test/cctest/cctest.gyp
@@ -30,14 +30,14 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
},
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
+ 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'cctest',
'type': 'executable',
'dependencies': [
'resources',
- '../../tools/gyp/v8.gyp:v8_libplatform',
+ '../../src/v8.gyp:v8_libplatform',
],
'include_dirs': [
'../..',
@@ -51,7 +51,6 @@
'compiler/graph-builder-tester.h',
'compiler/test-basic-block-profiler.cc',
'compiler/test-branch-combine.cc',
- 'compiler/test-changes-lowering.cc',
'compiler/test-code-stub-assembler.cc',
'compiler/test-gap-resolver.cc',
'compiler/test-graph-visualizer.cc',
@@ -68,7 +67,6 @@
'compiler/test-node.cc',
'compiler/test-operator.cc',
'compiler/test-osr.cc',
- 'compiler/test-pipeline.cc',
'compiler/test-representation-change.cc',
'compiler/test-run-bytecode-graph-builder.cc',
'compiler/test-run-calls-to-external-references.cc',
@@ -80,11 +78,13 @@
'compiler/test-run-jsexceptions.cc',
'compiler/test-run-jsobjects.cc',
'compiler/test-run-jsops.cc',
+ 'compiler/test-run-load-store.cc',
'compiler/test-run-machops.cc',
'compiler/test-run-native-calls.cc',
'compiler/test-run-stackcheck.cc',
'compiler/test-run-stubs.cc',
'compiler/test-run-variables.cc',
+ 'compiler/test-run-wasm-machops.cc',
'compiler/test-simplified-lowering.cc',
'cctest.cc',
'expression-type-collector.cc',
@@ -155,9 +155,7 @@
'test-liveedit.cc',
'test-lockers.cc',
'test-log.cc',
- 'test-microtask-delivery.cc',
'test-mementos.cc',
- 'test-object-observe.cc',
'test-parsing.cc',
'test-platform.cc',
'test-profile-generator.cc',
@@ -178,7 +176,6 @@
'test-transitions.cc',
'test-typedarrays.cc',
'test-types.cc',
- 'test-typing-reset.cc',
'test-unbound-queue.cc',
'test-unboxed-doubles.cc',
'test-unique.cc',
@@ -190,9 +187,13 @@
'trace-extension.cc',
'wasm/test-run-wasm.cc',
'wasm/test-run-wasm-64.cc',
+ 'wasm/test-run-wasm-asmjs.cc',
'wasm/test-run-wasm-js.cc',
'wasm/test-run-wasm-module.cc',
'wasm/test-signatures.h',
+ 'wasm/test-wasm-function-name-table.cc',
+ 'wasm/test-wasm-stack.cc',
+ 'wasm/test-wasm-trap-position.cc',
'wasm/wasm-run-utils.h',
],
'conditions': [
@@ -269,6 +270,15 @@
'test-disasm-ppc.cc'
],
}],
+ ['v8_target_arch=="mips"', {
+ 'sources': [ ### gcmole(arch:mips) ###
+ 'test-assembler-mips.cc',
+ 'test-code-stubs.cc',
+ 'test-code-stubs-mips.cc',
+ 'test-disasm-mips.cc',
+ 'test-macro-assembler-mips.cc'
+ ],
+ }],
['v8_target_arch=="mipsel"', {
'sources': [ ### gcmole(arch:mipsel) ###
'test-assembler-mips.cc',
@@ -278,8 +288,17 @@
'test-macro-assembler-mips.cc'
],
}],
+ ['v8_target_arch=="mips64"', {
+ 'sources': [ ### gcmole(arch:mips64) ###
+ 'test-assembler-mips64.cc',
+ 'test-code-stubs.cc',
+ 'test-code-stubs-mips64.cc',
+ 'test-disasm-mips64.cc',
+ 'test-macro-assembler-mips64.cc'
+ ],
+ }],
['v8_target_arch=="mips64el"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:mips64el) ###
'test-assembler-mips64.cc',
'test-code-stubs.cc',
'test-code-stubs-mips64.cc',
@@ -327,9 +346,9 @@
['component=="shared_library"', {
# cctest can't be built against a shared library, so we need to
# depend on the underlying static target in that case.
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
+ 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
}, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
+ 'dependencies': ['../../src/v8.gyp:v8'],
}],
],
},
@@ -372,14 +391,14 @@
'target_name': 'generate-bytecode-expectations',
'type': 'executable',
'dependencies': [
- '../../tools/gyp/v8.gyp:v8_libplatform',
+ '../../src/v8.gyp:v8_libplatform',
],
'conditions': [
['component=="shared_library"', {
# Same as cctest, we need to depend on the underlying static target.
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
+ 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
}, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
+ 'dependencies': ['../../src/v8.gyp:v8'],
}],
],
'include_dirs+': [
@@ -402,7 +421,7 @@
'cctest',
],
'includes': [
- '../../build/isolate.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'cctest_exe.isolate',
@@ -415,7 +434,7 @@
'cctest_exe_run',
],
'includes': [
- '../../build/isolate.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'cctest.isolate',
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index c992ab6..e1da00d 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -132,6 +132,52 @@
'test-debug/CallFunctionInDebugger': [PASS, ['mode == debug', SLOW]],
'test-strings/StringOOM*': [PASS, ['mode == debug', SKIP]],
'test-serialize/CustomSnapshotDataBlobImmortalImmovableRoots': [PASS, ['mode == debug', SKIP]],
+
+ ############################################################################
+ # Ignition
+
+ # TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized().
+ 'test-heap/TestCodeFlushingPreAged': [PASS, NO_IGNITION],
+ 'test-heap/TestCodeFlushingIncrementalScavenge': [PASS, NO_IGNITION],
+ 'test-heap/TestCodeFlushing': [PASS, NO_IGNITION],
+ 'test-heap/TestCodeFlushingIncremental': [PASS, NO_IGNITION],
+ 'test-heap/TestCodeFlushingIncrementalAbort': [PASS, ['mode == debug or dcheck_always_on == True', NO_IGNITION]],
+
+ # TODO(rmcilroy,4680): Fails to find the correct function name for the
+ # anonymous function. Fails without ignition but with --no-lazy also, so seems
+ # to be an issue when eagerly parsing.
+ 'test-func-name-inference/ReturnAnonymousFunction': [PASS, NO_IGNITION],
+
+ # TODO(mythria,4780): Related to type feedback support for calls.
+ 'test-feedback-vector/VectorCallICStates': [PASS, NO_IGNITION],
+ 'test-compiler/FeedbackVectorPreservedAcrossRecompiles': [PASS, NO_IGNITION],
+ 'test-heap/WeakFunctionInConstructor': [PASS, NO_IGNITION],
+ 'test-heap/IncrementalMarkingClearsMonomorphicConstructor': [PASS, NO_IGNITION],
+ 'test-heap/IncrementalMarkingPreservesMonomorphicConstructor': [PASS, NO_IGNITION],
+ 'test-heap/IncrementalMarkingPreservesMonomorphicCallIC': [PASS, NO_IGNITION],
+ 'test-heap/CellsInOptimizedCodeAreWeak': [PASS, NO_IGNITION],
+
+ # TODO(mythria,4680): Lack of code-ageing in interpreter.
+ 'test-heap/Regress169209': [PASS, NO_IGNITION],
+
+ # TODO(mythria,4680): Lack of code-ageing and/or lack of compilation cache
+ # in interpreter.
+ 'test-heap/CompilationCacheCachingBehavior': [PASS, NO_IGNITION],
+
+ # TODO(mstarzinger,4680): Fails due to the turbo-asm pipeline only being taken
+ # in compiler.cc GetLazyCode for uncompiled code, and no similar path for eager
+ # code.
+ 'test-api/TurboAsmDisablesNeuter': [PASS, NO_IGNITION],
+
+ # TODO(mvstanton,4900): CHECK(!g_function->is_compiled());
+ 'test-heap/TestUseOfIncrementalBarrierOnCompileLazy': [PASS, NO_IGNITION],
+
+ # BUG(rmcilroy,4680): Function is optimized without type feedback and so immediately deopts again, causing check failure in the test.
+ 'test-heap/ResetSharedFunctionInfoCountersDuringIncrementalMarking': [PASS, NO_IGNITION],
+ 'test-heap/ResetSharedFunctionInfoCountersDuringMarkSweep': [PASS, NO_IGNITION],
+
+ # BUG(4751). Flaky with ignition and tsan.
+ 'test-cpu-profiler/JsNativeJsSample': [PASS, ['tsan', NO_IGNITION]],
}], # ALWAYS
##############################################################################
@@ -256,15 +302,14 @@
'test-run-wasm-module/Run_WasmModule_Return114': [SKIP],
'test-run-wasm-module/Run_WasmModule_CheckMemoryIsZero': [SKIP],
'test-run-wasm-module/Run_WasmModule_Global': [SKIP],
- 'test-run-wasm/Run_Wasm_Int32LoadInt16_signext': [SKIP],
- 'test-run-wasm/Run_Wasm_Int32LoadInt16_zeroext': [SKIP],
- 'test-run-wasm/Run_WasmMixedGlobals': [SKIP],
- 'test-run-wasm-64/Run_WasmI64*': [SKIP],
- 'test-run-wasm-64/Run_Wasm_I64*': [SKIP],
- 'test-run-wasm-64/Run_Wasm_LoadStoreI64_sx': [SKIP],
+ 'test-run-wasm/RunWasmCompiled_Int32LoadInt16_signext': [SKIP],
+ 'test-run-wasm/RunWasmCompiled_Int32LoadInt16_zeroext': [SKIP],
+ 'test-run-wasm/RunWasmCompiled_MixedGlobals': [SKIP],
+ 'test-run-wasm-64/RunWasmCompiled_I64*': [SKIP],
+ 'test-run-wasm-64/RunWasmCompiled_LoadStoreI64_sx': [SKIP],
'test-run-wasm-64/Run_TestI64WasmRunner': [SKIP],
- 'test-run-wasm-64/Run_WasmCall_Int64Sub': [SKIP],
- 'test-run-wasm-64/Run_Wasm_MemI64_Sum': [SKIP],
+ 'test-run-wasm-64/RunWasmCompiled_Call_Int64Sub': [SKIP],
+ 'test-run-wasm-64/RunWasmCompiled_MemI64_Sum': [SKIP],
}], # 'byteorder == big'
##############################################################################
@@ -488,12 +533,8 @@
}], # 'arch == ppc64 and simulator_run == True'
##############################################################################
-['ignition == True', {
-
- # TODO(rmcilroy,4680): The function_data field should be a BytecodeArray on interpreter entry
- 'test-api/SetFunctionEntryHook': [FAIL],
-
- # TODO(rmcilroy,4680): Check failed: !function->shared()->is_compiled() || function->IsOptimized().
+['ignition or ignition_turbofan', {
+ # TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized().
'test-heap/TestCodeFlushingPreAged': [FAIL],
'test-heap/TestCodeFlushingIncrementalScavenge': [FAIL],
'test-heap/TestCodeFlushing': [FAIL],
@@ -530,6 +571,9 @@
# code.
'test-api/TurboAsmDisablesNeuter': [FAIL],
+ # TODO(mvstanton,4900): CHECK(!g_function->is_compiled());
+ 'test-heap/TestUseOfIncrementalBarrierOnCompileLazy': [FAIL],
+
# TODO(rmcilroy,4837): We don't set a LoadContextSlot for a function as
# immutable in the BytecodeGraphBuilder, therefore no inlining happens.
'test-run-inlining/InlineLoopGuardedTwice': [FAIL],
@@ -555,6 +599,9 @@
'test-run-inlining/InlineBuiltin': [FAIL],
'test-run-inlining/InlineTwiceDependent': [FAIL],
'test-run-inlining/SimpleInliningContextDeopt': [FAIL],
-}], # ignition == True
+
+ # BUG(4751). Flaky with ignition and tsan.
+ 'test-cpu-profiler/JsNativeJsSample': [PASS, ['tsan', SKIP]],
+}], # ignition or ignition_turbofan
]
diff --git a/test/cctest/compiler/call-tester.h b/test/cctest/compiler/call-tester.h
index c75bde1..77d2ce1 100644
--- a/test/cctest/compiler/call-tester.h
+++ b/test/cctest/compiler/call-tester.h
@@ -106,12 +106,14 @@
static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); }
};
+#if !V8_TARGET_ARCH_PPC64
template <>
struct ParameterTraits<uint32_t> {
static int64_t Cast(uint32_t r) {
return static_cast<int64_t>(static_cast<int32_t>(r));
}
};
+#endif
#endif // !V8_TARGET_ARCH_64_BIT
diff --git a/test/cctest/compiler/codegen-tester.h b/test/cctest/compiler/codegen-tester.h
index 5d670bf..dbb9a72 100644
--- a/test/cctest/compiler/codegen-tester.h
+++ b/test/cctest/compiler/codegen-tester.h
@@ -65,7 +65,7 @@
Schedule* schedule = this->Export();
CallDescriptor* call_descriptor = this->call_descriptor();
Graph* graph = this->graph();
- CompilationInfo info("testing", main_isolate(), main_zone());
+ CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone());
code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph,
schedule);
}
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
index 631bdde..555e049 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -31,7 +31,7 @@
Compile(function);
const uint32_t supported_flags =
CompilationInfo::kFunctionContextSpecializing |
- CompilationInfo::kInliningEnabled | CompilationInfo::kTypingEnabled;
+ CompilationInfo::kInliningEnabled;
CHECK_EQ(0u, flags_ & ~supported_flags);
}
@@ -177,7 +177,7 @@
Handle<JSFunction> Compile(Handle<JSFunction> function) {
Zone zone(function->GetIsolate()->allocator());
ParseInfo parse_info(&zone, function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
info.MarkAsDeoptimizationEnabled();
CHECK(Parser::ParseStatic(info.parse_info()));
@@ -188,14 +188,14 @@
if (flags_ & CompilationInfo::kInliningEnabled) {
info.MarkAsInliningEnabled();
}
- if (flags_ & CompilationInfo::kTypingEnabled) {
- info.MarkAsTypingEnabled();
+ if (FLAG_turbo_from_bytecode && function->shared()->HasBytecodeArray()) {
+ info.MarkAsOptimizeFromBytecode();
+ } else {
+ CHECK(Compiler::Analyze(info.parse_info()));
+ CHECK(Compiler::EnsureDeoptimizationSupport(&info));
}
- CHECK(Compiler::Analyze(info.parse_info()));
- CHECK(Compiler::EnsureDeoptimizationSupport(&info));
- Pipeline pipeline(&info);
- Handle<Code> code = pipeline.GenerateCode();
+ Handle<Code> code = Pipeline::GenerateCodeForTesting(&info);
CHECK(!code.is_null());
info.dependencies()->Commit(code);
info.context()->native_context()->AddOptimizedCode(*code);
@@ -226,12 +226,10 @@
Handle<JSFunction> CompileGraph(Graph* graph) {
Zone zone(function->GetIsolate()->allocator());
ParseInfo parse_info(&zone, function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
CHECK(Parser::ParseStatic(info.parse_info()));
info.SetOptimizing();
- CHECK(Compiler::Analyze(info.parse_info()));
- CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph);
CHECK(!code.is_null());
diff --git a/test/cctest/compiler/graph-builder-tester.h b/test/cctest/compiler/graph-builder-tester.h
index de2713a..e4cccda 100644
--- a/test/cctest/compiler/graph-builder-tester.h
+++ b/test/cctest/compiler/graph-builder-tester.h
@@ -168,11 +168,11 @@
Node* ChangeFloat64ToTagged(Node* a) {
return NewNode(simplified()->ChangeFloat64ToTagged(), a);
}
- Node* ChangeBoolToBit(Node* a) {
- return NewNode(simplified()->ChangeBoolToBit(), a);
+ Node* ChangeTaggedToBit(Node* a) {
+ return NewNode(simplified()->ChangeTaggedToBit(), a);
}
- Node* ChangeBitToBool(Node* a) {
- return NewNode(simplified()->ChangeBitToBool(), a);
+ Node* ChangeBitToTagged(Node* a) {
+ return NewNode(simplified()->ChangeBitToTagged(), a);
}
Node* LoadField(const FieldAccess& access, Node* object) {
@@ -277,7 +277,7 @@
Zone* zone = graph()->zone();
CallDescriptor* desc =
Linkage::GetSimplifiedCDescriptor(zone, this->csig_);
- CompilationInfo info("testing", main_isolate(), main_zone());
+ CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone());
code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph());
#ifdef ENABLE_DISASSEMBLER
if (!code_.is_null() && FLAG_print_opt_code) {
diff --git a/test/cctest/compiler/test-branch-combine.cc b/test/cctest/compiler/test-branch-combine.cc
index c3b4308..c5c4166 100644
--- a/test/cctest/compiler/test-branch-combine.cc
+++ b/test/cctest/compiler/test-branch-combine.cc
@@ -457,6 +457,27 @@
}
}
+TEST(BranchCombineEffectLevel) {
+ // Test that the load doesn't get folded into the branch, as there's a store
+ // between them. See http://crbug.com/611976.
+ int32_t input = 0;
+
+ RawMachineAssemblerTester<int32_t> m;
+ Node* a = m.LoadFromPointer(&input, MachineType::Int32());
+ Node* compare = m.Word32And(a, m.Int32Constant(1));
+ Node* equal = m.Word32Equal(compare, m.Int32Constant(0));
+ m.StoreToPointer(&input, MachineRepresentation::kWord32, m.Int32Constant(1));
+
+ RawMachineLabel blocka, blockb;
+ m.Branch(equal, &blocka, &blockb);
+ m.Bind(&blocka);
+ m.Return(m.Int32Constant(42));
+ m.Bind(&blockb);
+ m.Return(m.Int32Constant(0));
+
+ CHECK_EQ(42, m.Call());
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/test/cctest/compiler/test-changes-lowering.cc b/test/cctest/compiler/test-changes-lowering.cc
deleted file mode 100644
index ddeabe4..0000000
--- a/test/cctest/compiler/test-changes-lowering.cc
+++ /dev/null
@@ -1,290 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <limits>
-
-#include "src/ast/scopes.h"
-#include "src/compiler/change-lowering.h"
-#include "src/compiler/control-builders.h"
-#include "src/compiler/js-graph.h"
-#include "src/compiler/node-properties.h"
-#include "src/compiler/pipeline.h"
-#include "src/compiler/select-lowering.h"
-#include "src/compiler/simplified-lowering.h"
-#include "src/compiler/typer.h"
-#include "src/compiler/verifier.h"
-#include "src/execution.h"
-#include "src/globals.h"
-#include "src/parsing/parser.h"
-#include "src/parsing/rewriter.h"
-#include "test/cctest/cctest.h"
-#include "test/cctest/compiler/codegen-tester.h"
-#include "test/cctest/compiler/function-tester.h"
-#include "test/cctest/compiler/graph-builder-tester.h"
-#include "test/cctest/compiler/value-helper.h"
-
-namespace v8 {
-namespace internal {
-namespace compiler {
-
-template <typename ReturnType>
-class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
- public:
- explicit ChangesLoweringTester(MachineType p0 = MachineType::None())
- : GraphBuilderTester<ReturnType>(p0),
- javascript(this->zone()),
- jsgraph(this->isolate(), this->graph(), this->common(), &javascript,
- nullptr, this->machine()),
- function(Handle<JSFunction>::null()) {}
-
- JSOperatorBuilder javascript;
- JSGraph jsgraph;
- Handle<JSFunction> function;
-
- Node* start() { return this->graph()->start(); }
-
- template <typename T>
- T* CallWithPotentialGC() {
- // TODO(titzer): we wrap the code in a JSFunction here to reuse the
- // JSEntryStub; that could be done with a special prologue or other stub.
- if (function.is_null()) {
- function = FunctionTester::ForMachineGraph(this->graph());
- }
- Handle<Object>* args = NULL;
- MaybeHandle<Object> result =
- Execution::Call(this->isolate(), function, factory()->undefined_value(),
- 0, args, false);
- return T::cast(*result.ToHandleChecked());
- }
-
- void StoreFloat64(Node* node, double* ptr) {
- Node* ptr_node = this->PointerConstant(ptr);
- this->Store(MachineType::Float64(), ptr_node, node);
- }
-
- Node* LoadInt32(int32_t* ptr) {
- Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(MachineType::Int32(), ptr_node);
- }
-
- Node* LoadUint32(uint32_t* ptr) {
- Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(MachineType::Uint32(), ptr_node);
- }
-
- Node* LoadFloat64(double* ptr) {
- Node* ptr_node = this->PointerConstant(ptr);
- return this->Load(MachineType::Float64(), ptr_node);
- }
-
- void CheckNumber(double expected, Object* number) {
- CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number));
- }
-
- void BuildAndLower(const Operator* op) {
- // We build a graph by hand here, because the raw machine assembler
- // does not add the correct control and effect nodes.
- Node* p0 = this->Parameter(0);
- Node* change = this->graph()->NewNode(op, p0);
- Node* ret = this->graph()->NewNode(this->common()->Return(), change,
- this->start(), this->start());
- Node* end = this->graph()->NewNode(this->common()->End(1), ret);
- this->graph()->SetEnd(end);
- LowerChange(change);
- }
-
- void BuildStoreAndLower(const Operator* op, const Operator* store_op,
- void* location) {
- // We build a graph by hand here, because the raw machine assembler
- // does not add the correct control and effect nodes.
- Node* p0 = this->Parameter(0);
- Node* change = this->graph()->NewNode(op, p0);
- Node* store = this->graph()->NewNode(
- store_op, this->PointerConstant(location), this->Int32Constant(0),
- change, this->start(), this->start());
- Node* ret = this->graph()->NewNode(
- this->common()->Return(), this->Int32Constant(0), store, this->start());
- Node* end = this->graph()->NewNode(this->common()->End(1), ret);
- this->graph()->SetEnd(end);
- LowerChange(change);
- }
-
- void BuildLoadAndLower(const Operator* op, const Operator* load_op,
- void* location) {
- // We build a graph by hand here, because the raw machine assembler
- // does not add the correct control and effect nodes.
- Node* load = this->graph()->NewNode(
- load_op, this->PointerConstant(location), this->Int32Constant(0),
- this->start(), this->start());
- Node* change = this->graph()->NewNode(op, load);
- Node* ret = this->graph()->NewNode(this->common()->Return(), change,
- this->start(), this->start());
- Node* end = this->graph()->NewNode(this->common()->End(1), ret);
- this->graph()->SetEnd(end);
- LowerChange(change);
- }
-
- void LowerChange(Node* change) {
- // Run the graph reducer with changes lowering on a single node.
- Typer typer(this->isolate(), this->graph());
- typer.Run();
- ChangeLowering change_lowering(&jsgraph);
- SelectLowering select_lowering(this->graph(), this->common());
- GraphReducer reducer(this->zone(), this->graph());
- reducer.AddReducer(&change_lowering);
- reducer.AddReducer(&select_lowering);
- reducer.ReduceNode(change);
- Verifier::Run(this->graph(), Verifier::UNTYPED);
- }
-
- Factory* factory() { return this->isolate()->factory(); }
- Heap* heap() { return this->isolate()->heap(); }
-};
-
-
-TEST(RunChangeTaggedToInt32) {
- // Build and lower a graph by hand.
- ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
- t.BuildAndLower(t.simplified()->ChangeTaggedToInt32());
-
- FOR_INT32_INPUTS(i) {
- int32_t input = *i;
-
- if (Smi::IsValid(input)) {
- int32_t result = t.Call(Smi::FromInt(input));
- CHECK_EQ(input, result);
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- int32_t result = t.Call(*number);
- CHECK_EQ(input, result);
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- int32_t result = t.Call(*number);
- CHECK_EQ(input, result);
- }
- }
-}
-
-
-TEST(RunChangeTaggedToUint32) {
- // Build and lower a graph by hand.
- ChangesLoweringTester<uint32_t> t(MachineType::AnyTagged());
- t.BuildAndLower(t.simplified()->ChangeTaggedToUint32());
-
- FOR_UINT32_INPUTS(i) {
- uint32_t input = *i;
-
- if (Smi::IsValid(input)) {
- uint32_t result = t.Call(Smi::FromInt(input));
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- uint32_t result = t.Call(*number);
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- uint32_t result = t.Call(*number);
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
- }
-}
-
-
-TEST(RunChangeTaggedToFloat64) {
- ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
- double result;
-
- t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(),
- t.machine()->Store(StoreRepresentation(
- MachineRepresentation::kFloat64, kNoWriteBarrier)),
- &result);
-
- {
- FOR_INT32_INPUTS(i) {
- int32_t input = *i;
-
- if (Smi::IsValid(input)) {
- t.Call(Smi::FromInt(input));
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- t.Call(*number);
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- t.Call(*number);
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
- }
- }
-
- {
- FOR_FLOAT64_INPUTS(i) {
- double input = *i;
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- t.Call(*number);
- CHECK_DOUBLE_EQ(input, result);
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- t.Call(*number);
- CHECK_DOUBLE_EQ(input, result);
- }
- }
- }
-}
-
-
-TEST(RunChangeBoolToBit) {
- ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
- t.BuildAndLower(t.simplified()->ChangeBoolToBit());
-
- {
- Object* true_obj = t.heap()->true_value();
- int32_t result = t.Call(true_obj);
- CHECK_EQ(1, result);
- }
-
- {
- Object* false_obj = t.heap()->false_value();
- int32_t result = t.Call(false_obj);
- CHECK_EQ(0, result);
- }
-}
-
-
-TEST(RunChangeBitToBool) {
- ChangesLoweringTester<Object*> t(MachineType::Int32());
- t.BuildAndLower(t.simplified()->ChangeBitToBool());
-
- {
- Object* result = t.Call(1);
- Object* true_obj = t.heap()->true_value();
- CHECK_EQ(true_obj, result);
- }
-
- {
- Object* result = t.Call(0);
- Object* false_obj = t.heap()->false_value();
- CHECK_EQ(false_obj, result);
- }
-}
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
diff --git a/test/cctest/compiler/test-code-stub-assembler.cc b/test/cctest/compiler/test-code-stub-assembler.cc
index ff02cc9..37ba9e9 100644
--- a/test/cctest/compiler/test-code-stub-assembler.cc
+++ b/test/cctest/compiler/test-code-stub-assembler.cc
@@ -246,8 +246,9 @@
CodeStubAssemblerTester m(isolate, descriptor);
Handle<FixedArray> array = isolate->factory()->NewFixedArray(5);
array->set(4, Smi::FromInt(733));
- m.Return(m.LoadFixedArrayElementSmiIndex(m.HeapConstant(array),
- m.SmiTag(m.Int32Constant(4))));
+ m.Return(m.LoadFixedArrayElement(m.HeapConstant(array),
+ m.SmiTag(m.Int32Constant(4)), 0,
+ CodeStubAssembler::SMI_PARAMETERS));
Handle<Code> code = m.GenerateCode();
FunctionTester ft(descriptor, code);
MaybeHandle<Object> result = ft.Call();
@@ -361,6 +362,33 @@
USE(m.GenerateCode());
}
+TEST(TestToConstant) {
+ Isolate* isolate(CcTest::InitIsolateOnce());
+ VoidDescriptor descriptor(isolate);
+ CodeStubAssemblerTester m(isolate, descriptor);
+ int32_t value32;
+ int64_t value64;
+ Node* a = m.Int32Constant(5);
+ CHECK(m.ToInt32Constant(a, value32));
+ CHECK(m.ToInt64Constant(a, value64));
+
+ a = m.Int64Constant(static_cast<int64_t>(1) << 32);
+ CHECK(!m.ToInt32Constant(a, value32));
+ CHECK(m.ToInt64Constant(a, value64));
+
+ a = m.Int64Constant(13);
+ CHECK(m.ToInt32Constant(a, value32));
+ CHECK(m.ToInt64Constant(a, value64));
+
+ a = m.UndefinedConstant();
+ CHECK(!m.ToInt32Constant(a, value32));
+ CHECK(!m.ToInt64Constant(a, value64));
+
+ a = m.UndefinedConstant();
+ CHECK(!m.ToInt32Constant(a, value32));
+ CHECK(!m.ToInt64Constant(a, value64));
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/test/cctest/compiler/test-gap-resolver.cc b/test/cctest/compiler/test-gap-resolver.cc
index 7f85088..9781aeb 100644
--- a/test/cctest/compiler/test-gap-resolver.cc
+++ b/test/cctest/compiler/test-gap-resolver.cc
@@ -81,7 +81,7 @@
if (!is_constant) {
if (op.IsRegister()) {
index = LocationOperand::cast(op).GetRegister().code();
- } else if (op.IsDoubleRegister()) {
+ } else if (op.IsFPRegister()) {
index = LocationOperand::cast(op).GetDoubleRegister().code();
} else {
index = LocationOperand::cast(op).index();
diff --git a/test/cctest/compiler/test-linkage.cc b/test/cctest/compiler/test-linkage.cc
index 0cbdb4c..dc83f4d 100644
--- a/test/cctest/compiler/test-linkage.cc
+++ b/test/cctest/compiler/test-linkage.cc
@@ -43,7 +43,7 @@
HandleAndZoneScope handles;
Handle<JSFunction> function = Compile("a + b");
ParseInfo parse_info(handles.main_zone(), function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
CHECK(descriptor);
}
@@ -59,7 +59,7 @@
Handle<JSFunction>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Function>::Cast(CompileRun(sources[i]))));
ParseInfo parse_info(handles.main_zone(), function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
CallDescriptor* descriptor = Linkage::ComputeIncoming(info.zone(), &info);
CHECK(descriptor);
@@ -75,7 +75,7 @@
HandleAndZoneScope handles;
Handle<JSFunction> function = Compile("a + c");
ParseInfo parse_info(handles.main_zone(), function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
for (int i = 0; i < 32; i++) {
CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(
@@ -98,7 +98,8 @@
Isolate* isolate = CcTest::InitIsolateOnce();
Zone zone(isolate->allocator());
ToNumberStub stub(isolate);
- CompilationInfo info("test", isolate, &zone, Code::ComputeFlags(Code::STUB));
+ CompilationInfo info(ArrayVector("test"), isolate, &zone,
+ Code::ComputeFlags(Code::STUB));
CallInterfaceDescriptor interface_descriptor =
stub.GetCallInterfaceDescriptor();
CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
diff --git a/test/cctest/compiler/test-loop-assignment-analysis.cc b/test/cctest/compiler/test-loop-assignment-analysis.cc
index 69f5e15..eafd0ec 100644
--- a/test/cctest/compiler/test-loop-assignment-analysis.cc
+++ b/test/cctest/compiler/test-loop-assignment-analysis.cc
@@ -31,7 +31,7 @@
void CheckLoopAssignedCount(int expected, const char* var_name) {
// TODO(titzer): don't scope analyze every single time.
ParseInfo parse_info(main_zone(), function);
- CompilationInfo info(&parse_info);
+ CompilationInfo info(&parse_info, function);
CHECK(Parser::ParseStatic(&parse_info));
CHECK(Rewriter::Rewrite(&parse_info));
diff --git a/test/cctest/compiler/test-multiple-return.cc b/test/cctest/compiler/test-multiple-return.cc
index 2108ab1..53bae5e 100644
--- a/test/cctest/compiler/test-multiple-return.cc
+++ b/test/cctest/compiler/test-multiple-return.cc
@@ -85,7 +85,8 @@
Node* mul = m.Int32Mul(p0, p1);
m.Return(add, sub, mul);
- CompilationInfo info("testing", handles.main_isolate(), handles.main_zone());
+ CompilationInfo info(ArrayVector("testing"), handles.main_isolate(),
+ handles.main_zone());
Handle<Code> code =
Pipeline::GenerateCodeForTesting(&info, desc, m.graph(), m.Export());
#ifdef ENABLE_DISASSEMBLER
diff --git a/test/cctest/compiler/test-pipeline.cc b/test/cctest/compiler/test-pipeline.cc
deleted file mode 100644
index 35e3427..0000000
--- a/test/cctest/compiler/test-pipeline.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/compiler.h"
-#include "src/compiler/pipeline.h"
-#include "src/handles.h"
-#include "src/parsing/parser.h"
-#include "test/cctest/cctest.h"
-
-namespace v8 {
-namespace internal {
-namespace compiler {
-
-static void RunPipeline(Zone* zone, const char* source) {
- Handle<JSFunction> function = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
- *v8::Local<v8::Function>::Cast(CompileRun(source))));
- ParseInfo parse_info(zone, function);
- CHECK(Compiler::ParseAndAnalyze(&parse_info));
- CompilationInfo info(&parse_info);
- info.SetOptimizing();
-
- Pipeline pipeline(&info);
- Handle<Code> code = pipeline.GenerateCode();
- CHECK(!code.is_null());
-}
-
-
-TEST(PipelineTyped) {
- HandleAndZoneScope handles;
- FLAG_turbo_types = true;
- RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
-}
-
-
-TEST(PipelineGeneric) {
- HandleAndZoneScope handles;
- FLAG_turbo_types = false;
- RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
-}
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
diff --git a/test/cctest/compiler/test-representation-change.cc b/test/cctest/compiler/test-representation-change.cc
index 7e75bf8..76aa390 100644
--- a/test/cctest/compiler/test-representation-change.cc
+++ b/test/cctest/compiler/test-representation-change.cc
@@ -439,24 +439,45 @@
TEST(SingleChanges) {
- CheckChange(IrOpcode::kChangeBoolToBit, MachineRepresentation::kTagged,
+ CheckChange(IrOpcode::kChangeTaggedToBit, MachineRepresentation::kTagged,
Type::None(), MachineRepresentation::kBit);
- CheckChange(IrOpcode::kChangeBitToBool, MachineRepresentation::kBit,
+ CheckChange(IrOpcode::kChangeBitToTagged, MachineRepresentation::kBit,
Type::None(), MachineRepresentation::kTagged);
+ CheckChange(IrOpcode::kChangeInt31ToTaggedSigned,
+ MachineRepresentation::kWord32, Type::Signed31(),
+ MachineRepresentation::kTagged);
CheckChange(IrOpcode::kChangeInt32ToTagged, MachineRepresentation::kWord32,
Type::Signed32(), MachineRepresentation::kTagged);
CheckChange(IrOpcode::kChangeUint32ToTagged, MachineRepresentation::kWord32,
Type::Unsigned32(), MachineRepresentation::kTagged);
CheckChange(IrOpcode::kChangeFloat64ToTagged, MachineRepresentation::kFloat64,
- Type::None(), MachineRepresentation::kTagged);
+ Type::Number(), MachineRepresentation::kTagged);
+ CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32,
+ IrOpcode::kChangeInt31ToTaggedSigned,
+ MachineRepresentation::kFloat64, Type::Signed31(),
+ MachineRepresentation::kTagged);
+ CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32,
+ IrOpcode::kChangeInt32ToTagged,
+ MachineRepresentation::kFloat64, Type::Signed32(),
+ MachineRepresentation::kTagged);
+ CheckTwoChanges(IrOpcode::kChangeFloat64ToUint32,
+ IrOpcode::kChangeUint32ToTagged,
+ MachineRepresentation::kFloat64, Type::Unsigned32(),
+ MachineRepresentation::kTagged);
CheckChange(IrOpcode::kChangeTaggedToInt32, MachineRepresentation::kTagged,
Type::Signed32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kChangeTaggedToUint32, MachineRepresentation::kTagged,
Type::Unsigned32(), MachineRepresentation::kWord32);
CheckChange(IrOpcode::kChangeTaggedToFloat64, MachineRepresentation::kTagged,
- Type::None(), MachineRepresentation::kFloat64);
+ Type::Number(), MachineRepresentation::kFloat64);
+ CheckChange(IrOpcode::kChangeTaggedToFloat64, MachineRepresentation::kTagged,
+ Type::NumberOrUndefined(), MachineRepresentation::kFloat64);
+ CheckTwoChanges(IrOpcode::kChangeTaggedSignedToInt32,
+ IrOpcode::kChangeInt32ToFloat64,
+ MachineRepresentation::kTagged, Type::TaggedSigned(),
+ MachineRepresentation::kFloat64);
// Int32,Uint32 <-> Float64 are actually machine conversions.
CheckChange(IrOpcode::kChangeInt32ToFloat64, MachineRepresentation::kWord32,
@@ -513,7 +534,7 @@
Type::None(), MachineRepresentation::kFloat64);
CheckChange(IrOpcode::kChangeFloat64ToInt32, MachineRepresentation::kFloat64,
Type::Signed32(), MachineRepresentation::kWord32);
- CheckChange(IrOpcode::kTruncateFloat64ToInt32,
+ CheckChange(IrOpcode::kTruncateFloat64ToWord32,
MachineRepresentation::kFloat64, Type::Number(),
MachineRepresentation::kWord32);
@@ -522,7 +543,7 @@
MachineRepresentation::kWord32, Type::None(),
MachineRepresentation::kFloat32);
CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64,
- IrOpcode::kTruncateFloat64ToInt32,
+ IrOpcode::kTruncateFloat64ToWord32,
MachineRepresentation::kFloat32, Type::Number(),
MachineRepresentation::kWord32);
}
diff --git a/test/cctest/compiler/test-run-bytecode-graph-builder.cc b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
index c32f923..024747f 100644
--- a/test/cctest/compiler/test-run-bytecode-graph-builder.cc
+++ b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
@@ -125,11 +125,11 @@
// having to instantiate a ParseInfo first. Fix this!
ParseInfo parse_info(zone_, function);
- CompilationInfo compilation_info(&parse_info);
+ CompilationInfo compilation_info(&parse_info, function);
compilation_info.SetOptimizing();
compilation_info.MarkAsDeoptimizationEnabled();
- compiler::Pipeline pipeline(&compilation_info);
- Handle<Code> code = pipeline.GenerateCode();
+ compilation_info.MarkAsOptimizeFromBytecode();
+ Handle<Code> code = Pipeline::GenerateCodeForTesting(&compilation_info);
function->ReplaceCode(*code);
return function;
diff --git a/test/cctest/compiler/test-run-calls-to-external-references.cc b/test/cctest/compiler/test-run-calls-to-external-references.cc
index 3b79cd8..430e238 100644
--- a/test/cctest/compiler/test-run-calls-to-external-references.cc
+++ b/test/cctest/compiler/test-run-calls-to-external-references.cc
@@ -2,6 +2,7 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
+#include "src/wasm/wasm-external-refs.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/codegen-tester.h"
#include "test/cctest/compiler/value-helper.h"
@@ -10,521 +11,234 @@
namespace internal {
namespace compiler {
-template <typename T>
-void TestExternalReferenceRoundingFunction(
- BufferedRawMachineAssemblerTester<int32_t>* m, ExternalReference ref,
- T (*comparison)(T)) {
- T parameter;
+template <typename P>
+void TestExternalReference(BufferedRawMachineAssemblerTester<int32_t>* m,
+ ExternalReference ref, void (*comparison)(P*),
+ P param) {
+ P comparison_param = param;
Node* function = m->ExternalConstant(ref);
m->CallCFunction1(MachineType::Pointer(), MachineType::Pointer(), function,
- m->PointerConstant(¶meter));
+ m->PointerConstant(¶m));
m->Return(m->Int32Constant(4356));
- FOR_FLOAT64_INPUTS(i) {
- parameter = *i;
- m->Call();
- CHECK_DOUBLE_EQ(comparison(*i), parameter);
- }
+
+ m->Call();
+ comparison(&comparison_param);
+
+ CHECK_EQ(comparison_param, param);
+}
+
+template <typename P1, typename P2>
+void TestExternalReference(BufferedRawMachineAssemblerTester<int32_t>* m,
+ ExternalReference ref, void (*comparison)(P1*, P2*),
+ P1 param1, P2 param2) {
+ P1 comparison_param1 = param1;
+ P2 comparison_param2 = param2;
+
+ Node* function = m->ExternalConstant(ref);
+ m->CallCFunction2(MachineType::Pointer(), MachineType::Pointer(),
+ MachineType::Pointer(), function,
+ m->PointerConstant(¶m1), m->PointerConstant(¶m2));
+ m->Return(m->Int32Constant(4356));
+
+ m->Call();
+ comparison(&comparison_param1, &comparison_param2);
+
+ CHECK_EQ(comparison_param1, param1);
+ CHECK_EQ(comparison_param2, param2);
+}
+
+template <typename R, typename P>
+void TestExternalReference(BufferedRawMachineAssemblerTester<R>* m,
+ ExternalReference ref, R (*comparison)(P*),
+ P param) {
+ P comparison_param = param;
+
+ Node* function = m->ExternalConstant(ref);
+ m->Return(m->CallCFunction1(MachineType::Pointer(), MachineType::Pointer(),
+ function, m->PointerConstant(¶m)));
+
+ CHECK_EQ(comparison(&comparison_param), m->Call());
+
+ CHECK_EQ(comparison_param, param);
+}
+
+template <typename R, typename P1, typename P2>
+void TestExternalReference(BufferedRawMachineAssemblerTester<R>* m,
+ ExternalReference ref, R (*comparison)(P1*, P2*),
+ P1 param1, P2 param2) {
+ P1 comparison_param1 = param1;
+ P2 comparison_param2 = param2;
+
+ Node* function = m->ExternalConstant(ref);
+ m->Return(m->CallCFunction2(
+ MachineType::Pointer(), MachineType::Pointer(), MachineType::Pointer(),
+ function, m->PointerConstant(¶m1), m->PointerConstant(¶m2)));
+
+ CHECK_EQ(comparison(&comparison_param1, &comparison_param2), m->Call());
+
+ CHECK_EQ(comparison_param1, param1);
+ CHECK_EQ(comparison_param2, param2);
}
TEST(RunCallF32Trunc) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f32_trunc(m.isolate());
- TestExternalReferenceRoundingFunction<float>(&m, ref, truncf);
+ TestExternalReference(&m, ref, wasm::f32_trunc_wrapper, 1.25f);
}
TEST(RunCallF32Floor) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f32_floor(m.isolate());
- TestExternalReferenceRoundingFunction<float>(&m, ref, floorf);
+ TestExternalReference(&m, ref, wasm::f32_floor_wrapper, 1.25f);
}
TEST(RunCallF32Ceil) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f32_ceil(m.isolate());
- TestExternalReferenceRoundingFunction<float>(&m, ref, ceilf);
+ TestExternalReference(&m, ref, wasm::f32_ceil_wrapper, 1.25f);
}
TEST(RunCallF32RoundTiesEven) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f32_nearest_int(m.isolate());
- TestExternalReferenceRoundingFunction<float>(&m, ref, nearbyintf);
+ TestExternalReference(&m, ref, wasm::f32_nearest_int_wrapper, 1.25f);
}
TEST(RunCallF64Trunc) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f64_trunc(m.isolate());
- TestExternalReferenceRoundingFunction<double>(&m, ref, trunc);
+ TestExternalReference(&m, ref, wasm::f64_trunc_wrapper, 1.25);
}
TEST(RunCallF64Floor) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f64_floor(m.isolate());
- TestExternalReferenceRoundingFunction<double>(&m, ref, floor);
+ TestExternalReference(&m, ref, wasm::f64_floor_wrapper, 1.25);
}
TEST(RunCallF64Ceil) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f64_ceil(m.isolate());
- TestExternalReferenceRoundingFunction<double>(&m, ref, ceil);
+ TestExternalReference(&m, ref, wasm::f64_ceil_wrapper, 1.25);
}
TEST(RunCallF64RoundTiesEven) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_f64_nearest_int(m.isolate());
- TestExternalReferenceRoundingFunction<double>(&m, ref, nearbyint);
+ TestExternalReference(&m, ref, wasm::f64_nearest_int_wrapper, 1.25);
}
TEST(RunCallInt64ToFloat32) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_int64_to_float32(m.isolate());
-
- int64_t input;
- float output;
-
- Node* function = m.ExternalConstant(ref);
- m.CallCFunction2(MachineType::Pointer(), MachineType::Pointer(),
- MachineType::Pointer(), function, m.PointerConstant(&input),
- m.PointerConstant(&output));
- m.Return(m.Int32Constant(4356));
- FOR_INT64_INPUTS(i) {
- input = *i;
- m.Call();
- CHECK_FLOAT_EQ(static_cast<float>(*i), output);
- }
+ TestExternalReference(&m, ref, wasm::int64_to_float32_wrapper, int64_t(-2124),
+ 1.25f);
}
TEST(RunCallUint64ToFloat32) {
- struct {
- uint64_t input;
- uint32_t expected;
- } values[] = {{0x0, 0x0},
- {0x1, 0x3f800000},
- {0xffffffff, 0x4f800000},
- {0x1b09788b, 0x4dd84bc4},
- {0x4c5fce8, 0x4c98bf9d},
- {0xcc0de5bf, 0x4f4c0de6},
- {0x2, 0x40000000},
- {0x3, 0x40400000},
- {0x4, 0x40800000},
- {0x5, 0x40a00000},
- {0x8, 0x41000000},
- {0x9, 0x41100000},
- {0xffffffffffffffff, 0x5f800000},
- {0xfffffffffffffffe, 0x5f800000},
- {0xfffffffffffffffd, 0x5f800000},
- {0x0, 0x0},
- {0x100000000, 0x4f800000},
- {0xffffffff00000000, 0x5f800000},
- {0x1b09788b00000000, 0x5dd84bc4},
- {0x4c5fce800000000, 0x5c98bf9d},
- {0xcc0de5bf00000000, 0x5f4c0de6},
- {0x200000000, 0x50000000},
- {0x300000000, 0x50400000},
- {0x400000000, 0x50800000},
- {0x500000000, 0x50a00000},
- {0x800000000, 0x51000000},
- {0x900000000, 0x51100000},
- {0x273a798e187937a3, 0x5e1ce9e6},
- {0xece3af835495a16b, 0x5f6ce3b0},
- {0xb668ecc11223344, 0x5d3668ed},
- {0x9e, 0x431e0000},
- {0x43, 0x42860000},
- {0xaf73, 0x472f7300},
- {0x116b, 0x458b5800},
- {0x658ecc, 0x4acb1d98},
- {0x2b3b4c, 0x4a2ced30},
- {0x88776655, 0x4f087766},
- {0x70000000, 0x4ee00000},
- {0x7200000, 0x4ce40000},
- {0x7fffffff, 0x4f000000},
- {0x56123761, 0x4eac246f},
- {0x7fffff00, 0x4efffffe},
- {0x761c4761eeeeeeee, 0x5eec388f},
- {0x80000000eeeeeeee, 0x5f000000},
- {0x88888888dddddddd, 0x5f088889},
- {0xa0000000dddddddd, 0x5f200000},
- {0xddddddddaaaaaaaa, 0x5f5dddde},
- {0xe0000000aaaaaaaa, 0x5f600000},
- {0xeeeeeeeeeeeeeeee, 0x5f6eeeef},
- {0xfffffffdeeeeeeee, 0x5f800000},
- {0xf0000000dddddddd, 0x5f700000},
- {0x7fffffdddddddd, 0x5b000000},
- {0x3fffffaaaaaaaa, 0x5a7fffff},
- {0x1fffffaaaaaaaa, 0x59fffffd},
- {0xfffff, 0x497ffff0},
- {0x7ffff, 0x48ffffe0},
- {0x3ffff, 0x487fffc0},
- {0x1ffff, 0x47ffff80},
- {0xffff, 0x477fff00},
- {0x7fff, 0x46fffe00},
- {0x3fff, 0x467ffc00},
- {0x1fff, 0x45fff800},
- {0xfff, 0x457ff000},
- {0x7ff, 0x44ffe000},
- {0x3ff, 0x447fc000},
- {0x1ff, 0x43ff8000},
- {0x3fffffffffff, 0x56800000},
- {0x1fffffffffff, 0x56000000},
- {0xfffffffffff, 0x55800000},
- {0x7ffffffffff, 0x55000000},
- {0x3ffffffffff, 0x54800000},
- {0x1ffffffffff, 0x54000000},
- {0x8000008000000000, 0x5f000000},
- {0x8000008000000001, 0x5f000001},
- {0x8000008000000002, 0x5f000001},
- {0x8000008000000004, 0x5f000001},
- {0x8000008000000008, 0x5f000001},
- {0x8000008000000010, 0x5f000001},
- {0x8000008000000020, 0x5f000001},
- {0x8000009000000000, 0x5f000001},
- {0x800000a000000000, 0x5f000001},
- {0x8000008000100000, 0x5f000001},
- {0x8000000000000400, 0x5f000000},
- {0x8000000000000401, 0x5f000000}};
-
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref =
ExternalReference::wasm_uint64_to_float32(m.isolate());
-
- uint64_t input;
- float output;
-
- Node* function = m.ExternalConstant(ref);
- m.CallCFunction2(MachineType::Pointer(), MachineType::Pointer(),
- MachineType::Pointer(), function, m.PointerConstant(&input),
- m.PointerConstant(&output));
- m.Return(m.Int32Constant(4356));
-
- for (size_t i = 0; i < arraysize(values); i++) {
- input = values[i].input;
- m.Call();
- CHECK_EQ(values[i].expected, bit_cast<uint32_t>(output));
- }
+ TestExternalReference(&m, ref, wasm::uint64_to_float32_wrapper,
+ uint64_t(2124), 1.25f);
}
TEST(RunCallInt64ToFloat64) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_int64_to_float64(m.isolate());
-
- int64_t input;
- double output;
-
- Node* function = m.ExternalConstant(ref);
- m.CallCFunction2(MachineType::Pointer(), MachineType::Pointer(),
- MachineType::Pointer(), function, m.PointerConstant(&input),
- m.PointerConstant(&output));
- m.Return(m.Int32Constant(4356));
- FOR_INT64_INPUTS(i) {
- input = *i;
- m.Call();
- CHECK_DOUBLE_EQ(static_cast<double>(*i), output);
- }
+ TestExternalReference(&m, ref, wasm::int64_to_float64_wrapper, int64_t(2124),
+ 1.25);
}
TEST(RunCallUint64ToFloat64) {
- struct {
- uint64_t input;
- uint64_t expected;
- } values[] = {{0x0, 0x0},
- {0x1, 0x3ff0000000000000},
- {0xffffffff, 0x41efffffffe00000},
- {0x1b09788b, 0x41bb09788b000000},
- {0x4c5fce8, 0x419317f3a0000000},
- {0xcc0de5bf, 0x41e981bcb7e00000},
- {0x2, 0x4000000000000000},
- {0x3, 0x4008000000000000},
- {0x4, 0x4010000000000000},
- {0x5, 0x4014000000000000},
- {0x8, 0x4020000000000000},
- {0x9, 0x4022000000000000},
- {0xffffffffffffffff, 0x43f0000000000000},
- {0xfffffffffffffffe, 0x43f0000000000000},
- {0xfffffffffffffffd, 0x43f0000000000000},
- {0x100000000, 0x41f0000000000000},
- {0xffffffff00000000, 0x43efffffffe00000},
- {0x1b09788b00000000, 0x43bb09788b000000},
- {0x4c5fce800000000, 0x439317f3a0000000},
- {0xcc0de5bf00000000, 0x43e981bcb7e00000},
- {0x200000000, 0x4200000000000000},
- {0x300000000, 0x4208000000000000},
- {0x400000000, 0x4210000000000000},
- {0x500000000, 0x4214000000000000},
- {0x800000000, 0x4220000000000000},
- {0x900000000, 0x4222000000000000},
- {0x273a798e187937a3, 0x43c39d3cc70c3c9c},
- {0xece3af835495a16b, 0x43ed9c75f06a92b4},
- {0xb668ecc11223344, 0x43a6cd1d98224467},
- {0x9e, 0x4063c00000000000},
- {0x43, 0x4050c00000000000},
- {0xaf73, 0x40e5ee6000000000},
- {0x116b, 0x40b16b0000000000},
- {0x658ecc, 0x415963b300000000},
- {0x2b3b4c, 0x41459da600000000},
- {0x88776655, 0x41e10eeccaa00000},
- {0x70000000, 0x41dc000000000000},
- {0x7200000, 0x419c800000000000},
- {0x7fffffff, 0x41dfffffffc00000},
- {0x56123761, 0x41d5848dd8400000},
- {0x7fffff00, 0x41dfffffc0000000},
- {0x761c4761eeeeeeee, 0x43dd8711d87bbbbc},
- {0x80000000eeeeeeee, 0x43e00000001dddde},
- {0x88888888dddddddd, 0x43e11111111bbbbc},
- {0xa0000000dddddddd, 0x43e40000001bbbbc},
- {0xddddddddaaaaaaaa, 0x43ebbbbbbbb55555},
- {0xe0000000aaaaaaaa, 0x43ec000000155555},
- {0xeeeeeeeeeeeeeeee, 0x43edddddddddddde},
- {0xfffffffdeeeeeeee, 0x43efffffffbdddde},
- {0xf0000000dddddddd, 0x43ee0000001bbbbc},
- {0x7fffffdddddddd, 0x435ffffff7777777},
- {0x3fffffaaaaaaaa, 0x434fffffd5555555},
- {0x1fffffaaaaaaaa, 0x433fffffaaaaaaaa},
- {0xfffff, 0x412ffffe00000000},
- {0x7ffff, 0x411ffffc00000000},
- {0x3ffff, 0x410ffff800000000},
- {0x1ffff, 0x40fffff000000000},
- {0xffff, 0x40efffe000000000},
- {0x7fff, 0x40dfffc000000000},
- {0x3fff, 0x40cfff8000000000},
- {0x1fff, 0x40bfff0000000000},
- {0xfff, 0x40affe0000000000},
- {0x7ff, 0x409ffc0000000000},
- {0x3ff, 0x408ff80000000000},
- {0x1ff, 0x407ff00000000000},
- {0x3fffffffffff, 0x42cfffffffffff80},
- {0x1fffffffffff, 0x42bfffffffffff00},
- {0xfffffffffff, 0x42affffffffffe00},
- {0x7ffffffffff, 0x429ffffffffffc00},
- {0x3ffffffffff, 0x428ffffffffff800},
- {0x1ffffffffff, 0x427ffffffffff000},
- {0x8000008000000000, 0x43e0000010000000},
- {0x8000008000000001, 0x43e0000010000000},
- {0x8000000000000400, 0x43e0000000000000},
- {0x8000000000000401, 0x43e0000000000001},
- {0x8000000000000402, 0x43e0000000000001},
- {0x8000000000000404, 0x43e0000000000001},
- {0x8000000000000408, 0x43e0000000000001},
- {0x8000000000000410, 0x43e0000000000001},
- {0x8000000000000420, 0x43e0000000000001},
- {0x8000000000000440, 0x43e0000000000001},
- {0x8000000000000480, 0x43e0000000000001},
- {0x8000000000000500, 0x43e0000000000001},
- {0x8000000000000600, 0x43e0000000000001}};
-
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref =
ExternalReference::wasm_uint64_to_float64(m.isolate());
-
- uint64_t input;
- double output;
-
- Node* function = m.ExternalConstant(ref);
- m.CallCFunction2(MachineType::Pointer(), MachineType::Pointer(),
- MachineType::Pointer(), function, m.PointerConstant(&input),
- m.PointerConstant(&output));
- m.Return(m.Int32Constant(4356));
-
- for (size_t i = 0; i < arraysize(values); i++) {
- input = values[i].input;
- m.Call();
- CHECK_EQ(values[i].expected, bit_cast<uint64_t>(output));
- }
+ TestExternalReference(&m, ref, wasm::uint64_to_float64_wrapper,
+ uint64_t(2124), 1.25);
}
TEST(RunCallFloat32ToInt64) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_float32_to_int64(m.isolate());
-
- float input;
- int64_t output;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(
- MachineType::Int32(), MachineType::Pointer(), MachineType::Pointer(),
- function, m.PointerConstant(&input), m.PointerConstant(&output)));
- FOR_FLOAT32_INPUTS(i) {
- input = *i;
- if (*i >= static_cast<float>(std::numeric_limits<int64_t>::min()) &&
- *i < static_cast<float>(std::numeric_limits<int64_t>::max())) {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(static_cast<int64_t>(*i), output);
- } else {
- CHECK_EQ(0, m.Call());
- }
- }
+ TestExternalReference(&m, ref, wasm::float32_to_int64_wrapper, 1.25f,
+ int64_t(2124));
}
TEST(RunCallFloat32ToUint64) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref =
ExternalReference::wasm_float32_to_uint64(m.isolate());
-
- float input;
- uint64_t output;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(
- MachineType::Int32(), MachineType::Pointer(), MachineType::Pointer(),
- function, m.PointerConstant(&input), m.PointerConstant(&output)));
- FOR_FLOAT32_INPUTS(i) {
- input = *i;
- if (*i > -1.0 &&
- *i < static_cast<float>(std::numeric_limits<uint64_t>::max())) {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(static_cast<uint64_t>(*i), output);
- } else {
- CHECK_EQ(0, m.Call());
- }
- }
+ TestExternalReference(&m, ref, wasm::float32_to_uint64_wrapper, 1.25f,
+ uint64_t(2124));
}
TEST(RunCallFloat64ToInt64) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_float64_to_int64(m.isolate());
-
- double input;
- int64_t output;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(
- MachineType::Int32(), MachineType::Pointer(), MachineType::Pointer(),
- function, m.PointerConstant(&input), m.PointerConstant(&output)));
- FOR_FLOAT64_INPUTS(i) {
- input = *i;
- if (*i >= static_cast<double>(std::numeric_limits<int64_t>::min()) &&
- *i < static_cast<double>(std::numeric_limits<int64_t>::max())) {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(static_cast<int64_t>(*i), output);
- } else {
- CHECK_EQ(0, m.Call());
- }
- }
+ TestExternalReference(&m, ref, wasm::float64_to_int64_wrapper, 1.25,
+ int64_t(2124));
}
TEST(RunCallFloat64ToUint64) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref =
ExternalReference::wasm_float64_to_uint64(m.isolate());
-
- double input;
- uint64_t output;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(
- MachineType::Int32(), MachineType::Pointer(), MachineType::Pointer(),
- function, m.PointerConstant(&input), m.PointerConstant(&output)));
- FOR_FLOAT64_INPUTS(i) {
- input = *i;
- if (*i > -1.0 &&
- *i < static_cast<double>(std::numeric_limits<uint64_t>::max())) {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(static_cast<uint64_t>(*i), output);
- } else {
- CHECK_EQ(0, m.Call());
- }
- }
+ TestExternalReference(&m, ref, wasm::float64_to_uint64_wrapper, 1.25,
+ uint64_t(2124));
}
TEST(RunCallInt64Div) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_int64_div(m.isolate());
-
- int64_t dst;
- int64_t src;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(MachineType::Int32(), MachineType::Pointer(),
- MachineType::Pointer(), function,
- m.PointerConstant(&dst), m.PointerConstant(&src)));
- FOR_INT64_INPUTS(i) {
- FOR_INT64_INPUTS(j) {
- dst = *i;
- src = *j;
- if (src == 0) {
- CHECK_EQ(0, m.Call());
- } else if (src == -1 && dst == std::numeric_limits<int64_t>::min()) {
- CHECK_EQ(-1, m.Call());
- } else {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(*i / *j, dst);
- }
- }
- }
+ TestExternalReference(&m, ref, wasm::int64_div_wrapper, int64_t(1774),
+ int64_t(21));
}
TEST(RunCallInt64Mod) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_int64_mod(m.isolate());
-
- int64_t dst;
- int64_t src;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(MachineType::Int32(), MachineType::Pointer(),
- MachineType::Pointer(), function,
- m.PointerConstant(&dst), m.PointerConstant(&src)));
- FOR_INT64_INPUTS(i) {
- FOR_INT64_INPUTS(j) {
- dst = *i;
- src = *j;
- if (src == 0) {
- CHECK_EQ(0, m.Call());
- } else {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(*i % *j, dst);
- }
- }
- }
+ TestExternalReference(&m, ref, wasm::int64_mod_wrapper, int64_t(1774),
+ int64_t(21));
}
TEST(RunCallUint64Div) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_uint64_div(m.isolate());
-
- uint64_t dst;
- uint64_t src;
-
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(MachineType::Int32(), MachineType::Pointer(),
- MachineType::Pointer(), function,
- m.PointerConstant(&dst), m.PointerConstant(&src)));
- FOR_UINT64_INPUTS(i) {
- FOR_UINT64_INPUTS(j) {
- dst = *i;
- src = *j;
- if (src == 0) {
- CHECK_EQ(0, m.Call());
- } else {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(*i / *j, dst);
- }
- }
- }
+ TestExternalReference(&m, ref, wasm::uint64_div_wrapper, uint64_t(1774),
+ uint64_t(21));
}
TEST(RunCallUint64Mod) {
BufferedRawMachineAssemblerTester<int32_t> m;
ExternalReference ref = ExternalReference::wasm_uint64_mod(m.isolate());
+ TestExternalReference(&m, ref, wasm::uint64_mod_wrapper, uint64_t(1774),
+ uint64_t(21));
+}
- uint64_t dst;
- uint64_t src;
+TEST(RunCallWord32Ctz) {
+ BufferedRawMachineAssemblerTester<uint32_t> m;
+ ExternalReference ref = ExternalReference::wasm_word32_ctz(m.isolate());
+ TestExternalReference(&m, ref, wasm::word32_ctz_wrapper, uint32_t(1774));
+}
- Node* function = m.ExternalConstant(ref);
- m.Return(m.CallCFunction2(MachineType::Int32(), MachineType::Pointer(),
- MachineType::Pointer(), function,
- m.PointerConstant(&dst), m.PointerConstant(&src)));
- FOR_UINT64_INPUTS(i) {
- FOR_UINT64_INPUTS(j) {
- dst = *i;
- src = *j;
- if (src == 0) {
- CHECK_EQ(0, m.Call());
- } else {
- CHECK_EQ(1, m.Call());
- CHECK_EQ(*i % *j, dst);
- }
- }
- }
+TEST(RunCallWord64Ctz) {
+ BufferedRawMachineAssemblerTester<uint32_t> m;
+ ExternalReference ref = ExternalReference::wasm_word64_ctz(m.isolate());
+ TestExternalReference(&m, ref, wasm::word64_ctz_wrapper, uint64_t(1774));
+}
+
+TEST(RunCallWord32Popcnt) {
+ BufferedRawMachineAssemblerTester<uint32_t> m;
+ ExternalReference ref = ExternalReference::wasm_word32_popcnt(m.isolate());
+ TestExternalReference(&m, ref, wasm::word32_popcnt_wrapper, uint32_t(1774));
+}
+
+TEST(RunCallWord64Popcnt) {
+ BufferedRawMachineAssemblerTester<uint32_t> m;
+ ExternalReference ref = ExternalReference::wasm_word64_popcnt(m.isolate());
+ TestExternalReference(&m, ref, wasm::word64_popcnt_wrapper, uint64_t(1774));
}
} // namespace compiler
} // namespace internal
diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc
index 234060c..e689bf7 100644
--- a/test/cctest/compiler/test-run-inlining.cc
+++ b/test/cctest/compiler/test-run-inlining.cc
@@ -16,9 +16,9 @@
void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) {
StackTraceFrameIterator it(CcTest::i_isolate());
int frames_seen = 0;
- JavaScriptFrame* topmost = it.frame();
+ JavaScriptFrame* topmost = it.javascript_frame();
while (!it.done()) {
- JavaScriptFrame* frame = it.frame();
+ JavaScriptFrame* frame = it.javascript_frame();
List<JSFunction*> functions(2);
frame->GetFunctions(&functions);
PrintF("%d %s, inline count: %d\n", frames_seen,
@@ -47,14 +47,11 @@
.FromJust());
}
-
const uint32_t kRestrictedInliningFlags =
- CompilationInfo::kFunctionContextSpecializing |
- CompilationInfo::kTypingEnabled;
+ CompilationInfo::kFunctionContextSpecializing;
const uint32_t kInlineFlags = CompilationInfo::kInliningEnabled |
- CompilationInfo::kFunctionContextSpecializing |
- CompilationInfo::kTypingEnabled;
+ CompilationInfo::kFunctionContextSpecializing;
} // namespace
diff --git a/test/cctest/compiler/test-run-jsops.cc b/test/cctest/compiler/test-run-jsops.cc
index b68fc1c..78e1257 100644
--- a/test/cctest/compiler/test-run-jsops.cc
+++ b/test/cctest/compiler/test-run-jsops.cc
@@ -512,7 +512,6 @@
TEST(ClassLiteral) {
- FLAG_harmony_sloppy = true;
const char* src =
"(function(a,b) {"
" class C {"
diff --git a/test/cctest/compiler/test-run-load-store.cc b/test/cctest/compiler/test-run-load-store.cc
new file mode 100644
index 0000000..6484d30
--- /dev/null
+++ b/test/cctest/compiler/test-run-load-store.cc
@@ -0,0 +1,919 @@
+// Copyright 2016 the V8 project authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#include <cmath>
+#include <functional>
+#include <limits>
+
+#include "src/base/bits.h"
+#include "src/base/utils/random-number-generator.h"
+#include "src/codegen.h"
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/codegen-tester.h"
+#include "test/cctest/compiler/graph-builder-tester.h"
+#include "test/cctest/compiler/value-helper.h"
+
+using namespace v8::base;
+
+namespace {
+template <typename Type>
+void CheckOobValue(Type val) {
+ UNREACHABLE();
+}
+
+template <>
+void CheckOobValue(int32_t val) {
+ CHECK_EQ(0, val);
+}
+
+template <>
+void CheckOobValue(int64_t val) {
+ CHECK_EQ(0, val);
+}
+
+template <>
+void CheckOobValue(float val) {
+ CHECK(std::isnan(val));
+}
+
+template <>
+void CheckOobValue(double val) {
+ CHECK(std::isnan(val));
+}
+} // namespace
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// This is a America!
+#define A_BILLION 1000000000ULL
+#define A_GIG (1024ULL * 1024ULL * 1024ULL)
+
+TEST(RunLoadInt32) {
+ RawMachineAssemblerTester<int32_t> m;
+
+ int32_t p1 = 0; // loads directly from this location.
+ m.Return(m.LoadFromPointer(&p1, MachineType::Int32()));
+
+ FOR_INT32_INPUTS(i) {
+ p1 = *i;
+ CHECK_EQ(p1, m.Call());
+ }
+}
+
+TEST(RunLoadInt32Offset) {
+ int32_t p1 = 0; // loads directly from this location.
+
+ int32_t offsets[] = {-2000000, -100, -101, 1, 3,
+ 7, 120, 2000, 2000000000, 0xff};
+
+ for (size_t i = 0; i < arraysize(offsets); i++) {
+ RawMachineAssemblerTester<int32_t> m;
+ int32_t offset = offsets[i];
+ byte* pointer = reinterpret_cast<byte*>(&p1) - offset;
+ // generate load [#base + #index]
+ m.Return(m.LoadFromPointer(pointer, MachineType::Int32(), offset));
+
+ FOR_INT32_INPUTS(j) {
+ p1 = *j;
+ CHECK_EQ(p1, m.Call());
+ }
+ }
+}
+
+TEST(RunLoadStoreFloat32Offset) {
+ float p1 = 0.0f; // loads directly from this location.
+ float p2 = 0.0f; // and stores directly into this location.
+
+ FOR_INT32_INPUTS(i) {
+ int32_t magic = 0x2342aabb + *i * 3;
+ RawMachineAssemblerTester<int32_t> m;
+ int32_t offset = *i;
+ byte* from = reinterpret_cast<byte*>(&p1) - offset;
+ byte* to = reinterpret_cast<byte*>(&p2) - offset;
+ // generate load [#base + #index]
+ Node* load = m.Load(MachineType::Float32(), m.PointerConstant(from),
+ m.IntPtrConstant(offset));
+ m.Store(MachineRepresentation::kFloat32, m.PointerConstant(to),
+ m.IntPtrConstant(offset), load, kNoWriteBarrier);
+ m.Return(m.Int32Constant(magic));
+
+ FOR_FLOAT32_INPUTS(j) {
+ p1 = *j;
+ p2 = *j - 5;
+ CHECK_EQ(magic, m.Call());
+ CheckDoubleEq(p1, p2);
+ }
+ }
+}
+
+TEST(RunLoadStoreFloat64Offset) {
+ double p1 = 0; // loads directly from this location.
+ double p2 = 0; // and stores directly into this location.
+
+ FOR_INT32_INPUTS(i) {
+ int32_t magic = 0x2342aabb + *i * 3;
+ RawMachineAssemblerTester<int32_t> m;
+ int32_t offset = *i;
+ byte* from = reinterpret_cast<byte*>(&p1) - offset;
+ byte* to = reinterpret_cast<byte*>(&p2) - offset;
+ // generate load [#base + #index]
+ Node* load = m.Load(MachineType::Float64(), m.PointerConstant(from),
+ m.IntPtrConstant(offset));
+ m.Store(MachineRepresentation::kFloat64, m.PointerConstant(to),
+ m.IntPtrConstant(offset), load, kNoWriteBarrier);
+ m.Return(m.Int32Constant(magic));
+
+ FOR_FLOAT64_INPUTS(j) {
+ p1 = *j;
+ p2 = *j - 5;
+ CHECK_EQ(magic, m.Call());
+ CheckDoubleEq(p1, p2);
+ }
+ }
+}
+
+namespace {
+template <typename Type>
+void RunLoadImmIndex(MachineType rep) {
+ const int kNumElems = 3;
+ Type buffer[kNumElems];
+
+ // initialize the buffer with some raw data.
+ byte* raw = reinterpret_cast<byte*>(buffer);
+ for (size_t i = 0; i < sizeof(buffer); i++) {
+ raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
+ }
+
+ // Test with various large and small offsets.
+ for (int offset = -1; offset <= 200000; offset *= -5) {
+ for (int i = 0; i < kNumElems; i++) {
+ BufferedRawMachineAssemblerTester<Type> m;
+ Node* base = m.PointerConstant(buffer - offset);
+ Node* index = m.Int32Constant((offset + i) * sizeof(buffer[0]));
+ m.Return(m.Load(rep, base, index));
+
+ volatile Type expected = buffer[i];
+ volatile Type actual = m.Call();
+ CHECK_EQ(expected, actual);
+ }
+ }
+}
+
+template <typename CType>
+void RunLoadStore(MachineType rep) {
+ const int kNumElems = 4;
+ CType buffer[kNumElems];
+
+ for (int32_t x = 0; x < kNumElems; x++) {
+ int32_t y = kNumElems - x - 1;
+ // initialize the buffer with raw data.
+ byte* raw = reinterpret_cast<byte*>(buffer);
+ for (size_t i = 0; i < sizeof(buffer); i++) {
+ raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
+ }
+
+ RawMachineAssemblerTester<int32_t> m;
+ int32_t OK = 0x29000 + x;
+ Node* base = m.PointerConstant(buffer);
+ Node* index0 = m.IntPtrConstant(x * sizeof(buffer[0]));
+ Node* load = m.Load(rep, base, index0);
+ Node* index1 = m.IntPtrConstant(y * sizeof(buffer[0]));
+ m.Store(rep.representation(), base, index1, load, kNoWriteBarrier);
+ m.Return(m.Int32Constant(OK));
+
+ CHECK(buffer[x] != buffer[y]);
+ CHECK_EQ(OK, m.Call());
+ CHECK(buffer[x] == buffer[y]);
+ }
+}
+} // namespace
+
+TEST(RunLoadImmIndex) {
+ RunLoadImmIndex<int8_t>(MachineType::Int8());
+ RunLoadImmIndex<uint8_t>(MachineType::Uint8());
+ RunLoadImmIndex<int16_t>(MachineType::Int16());
+ RunLoadImmIndex<uint16_t>(MachineType::Uint16());
+ RunLoadImmIndex<int32_t>(MachineType::Int32());
+ RunLoadImmIndex<uint32_t>(MachineType::Uint32());
+ RunLoadImmIndex<int32_t*>(MachineType::AnyTagged());
+ RunLoadImmIndex<float>(MachineType::Float32());
+ RunLoadImmIndex<double>(MachineType::Float64());
+#if V8_TARGET_ARCH_64_BIT
+ RunLoadImmIndex<int64_t>(MachineType::Int64());
+#endif
+ // TODO(titzer): test various indexing modes.
+}
+
+TEST(RunLoadStore) {
+ RunLoadStore<int8_t>(MachineType::Int8());
+ RunLoadStore<uint8_t>(MachineType::Uint8());
+ RunLoadStore<int16_t>(MachineType::Int16());
+ RunLoadStore<uint16_t>(MachineType::Uint16());
+ RunLoadStore<int32_t>(MachineType::Int32());
+ RunLoadStore<uint32_t>(MachineType::Uint32());
+ RunLoadStore<void*>(MachineType::AnyTagged());
+ RunLoadStore<float>(MachineType::Float32());
+ RunLoadStore<double>(MachineType::Float64());
+#if V8_TARGET_ARCH_64_BIT
+ RunLoadStore<int64_t>(MachineType::Int64());
+#endif
+}
+
+#if V8_TARGET_LITTLE_ENDIAN
+#define LSB(addr, bytes) addr
+#elif V8_TARGET_BIG_ENDIAN
+#define LSB(addr, bytes) reinterpret_cast<byte*>(addr + 1) - bytes
+#else
+#error "Unknown Architecture"
+#endif
+
+TEST(RunLoadStoreSignExtend32) {
+ int32_t buffer[4];
+ RawMachineAssemblerTester<int32_t> m;
+ Node* load8 = m.LoadFromPointer(LSB(&buffer[0], 1), MachineType::Int8());
+ Node* load16 = m.LoadFromPointer(LSB(&buffer[0], 2), MachineType::Int16());
+ Node* load32 = m.LoadFromPointer(&buffer[0], MachineType::Int32());
+ m.StoreToPointer(&buffer[1], MachineRepresentation::kWord32, load8);
+ m.StoreToPointer(&buffer[2], MachineRepresentation::kWord32, load16);
+ m.StoreToPointer(&buffer[3], MachineRepresentation::kWord32, load32);
+ m.Return(load8);
+
+ FOR_INT32_INPUTS(i) {
+ buffer[0] = *i;
+
+ CHECK_EQ(static_cast<int8_t>(*i & 0xff), m.Call());
+ CHECK_EQ(static_cast<int8_t>(*i & 0xff), buffer[1]);
+ CHECK_EQ(static_cast<int16_t>(*i & 0xffff), buffer[2]);
+ CHECK_EQ(*i, buffer[3]);
+ }
+}
+
+TEST(RunLoadStoreZeroExtend32) {
+ uint32_t buffer[4];
+ RawMachineAssemblerTester<uint32_t> m;
+ Node* load8 = m.LoadFromPointer(LSB(&buffer[0], 1), MachineType::Uint8());
+ Node* load16 = m.LoadFromPointer(LSB(&buffer[0], 2), MachineType::Uint16());
+ Node* load32 = m.LoadFromPointer(&buffer[0], MachineType::Uint32());
+ m.StoreToPointer(&buffer[1], MachineRepresentation::kWord32, load8);
+ m.StoreToPointer(&buffer[2], MachineRepresentation::kWord32, load16);
+ m.StoreToPointer(&buffer[3], MachineRepresentation::kWord32, load32);
+ m.Return(load8);
+
+ FOR_UINT32_INPUTS(i) {
+ buffer[0] = *i;
+
+ CHECK_EQ((*i & 0xff), m.Call());
+ CHECK_EQ((*i & 0xff), buffer[1]);
+ CHECK_EQ((*i & 0xffff), buffer[2]);
+ CHECK_EQ(*i, buffer[3]);
+ }
+}
+
+#if V8_TARGET_ARCH_64_BIT
+TEST(RunCheckedLoadInt64) {
+ int64_t buffer[] = {0x66bbccddeeff0011LL, 0x1122334455667788LL};
+ RawMachineAssemblerTester<int64_t> m(MachineType::Int32());
+ Node* base = m.PointerConstant(buffer);
+ Node* index = m.Parameter(0);
+ Node* length = m.Int32Constant(16);
+ Node* load = m.AddNode(m.machine()->CheckedLoad(MachineType::Int64()), base,
+ index, length);
+ m.Return(load);
+
+ CHECK_EQ(buffer[0], m.Call(0));
+ CHECK_EQ(buffer[1], m.Call(8));
+ CheckOobValue(m.Call(16));
+}
+
+TEST(RunLoadStoreSignExtend64) {
+ if (true) return; // TODO(titzer): sign extension of loads to 64-bit.
+ int64_t buffer[5];
+ RawMachineAssemblerTester<int64_t> m;
+ Node* load8 = m.LoadFromPointer(LSB(&buffer[0], 1), MachineType::Int8());
+ Node* load16 = m.LoadFromPointer(LSB(&buffer[0], 2), MachineType::Int16());
+ Node* load32 = m.LoadFromPointer(LSB(&buffer[0], 4), MachineType::Int32());
+ Node* load64 = m.LoadFromPointer(&buffer[0], MachineType::Int64());
+ m.StoreToPointer(&buffer[1], MachineRepresentation::kWord64, load8);
+ m.StoreToPointer(&buffer[2], MachineRepresentation::kWord64, load16);
+ m.StoreToPointer(&buffer[3], MachineRepresentation::kWord64, load32);
+ m.StoreToPointer(&buffer[4], MachineRepresentation::kWord64, load64);
+ m.Return(load8);
+
+ FOR_INT64_INPUTS(i) {
+ buffer[0] = *i;
+
+ CHECK_EQ(static_cast<int8_t>(*i & 0xff), m.Call());
+ CHECK_EQ(static_cast<int8_t>(*i & 0xff), buffer[1]);
+ CHECK_EQ(static_cast<int16_t>(*i & 0xffff), buffer[2]);
+ CHECK_EQ(static_cast<int32_t>(*i & 0xffffffff), buffer[3]);
+ CHECK_EQ(*i, buffer[4]);
+ }
+}
+
+TEST(RunLoadStoreZeroExtend64) {
+ if (kPointerSize < 8) return;
+ uint64_t buffer[5];
+ RawMachineAssemblerTester<int64_t> m;
+ Node* load8 = m.LoadFromPointer(LSB(&buffer[0], 1), MachineType::Uint8());
+ Node* load16 = m.LoadFromPointer(LSB(&buffer[0], 2), MachineType::Uint16());
+ Node* load32 = m.LoadFromPointer(LSB(&buffer[0], 4), MachineType::Uint32());
+ Node* load64 = m.LoadFromPointer(&buffer[0], MachineType::Uint64());
+ m.StoreToPointer(&buffer[1], MachineRepresentation::kWord64, load8);
+ m.StoreToPointer(&buffer[2], MachineRepresentation::kWord64, load16);
+ m.StoreToPointer(&buffer[3], MachineRepresentation::kWord64, load32);
+ m.StoreToPointer(&buffer[4], MachineRepresentation::kWord64, load64);
+ m.Return(load8);
+
+ FOR_UINT64_INPUTS(i) {
+ buffer[0] = *i;
+
+ CHECK_EQ((*i & 0xff), m.Call());
+ CHECK_EQ((*i & 0xff), buffer[1]);
+ CHECK_EQ((*i & 0xffff), buffer[2]);
+ CHECK_EQ((*i & 0xffffffff), buffer[3]);
+ CHECK_EQ(*i, buffer[4]);
+ }
+}
+
+TEST(RunCheckedStoreInt64) {
+ const int64_t write = 0x5566778899aabbLL;
+ const int64_t before = 0x33bbccddeeff0011LL;
+ int64_t buffer[] = {before, before};
+ RawMachineAssemblerTester<int32_t> m(MachineType::Int32());
+ Node* base = m.PointerConstant(buffer);
+ Node* index = m.Parameter(0);
+ Node* length = m.Int32Constant(16);
+ Node* value = m.Int64Constant(write);
+ Node* store =
+ m.AddNode(m.machine()->CheckedStore(MachineRepresentation::kWord64), base,
+ index, length, value);
+ USE(store);
+ m.Return(m.Int32Constant(11));
+
+ CHECK_EQ(11, m.Call(16));
+ CHECK_EQ(before, buffer[0]);
+ CHECK_EQ(before, buffer[1]);
+
+ CHECK_EQ(11, m.Call(0));
+ CHECK_EQ(write, buffer[0]);
+ CHECK_EQ(before, buffer[1]);
+
+ CHECK_EQ(11, m.Call(8));
+ CHECK_EQ(write, buffer[0]);
+ CHECK_EQ(write, buffer[1]);
+}
+#endif
+
+namespace {
+template <typename IntType>
+void LoadStoreTruncation(MachineType kRepresentation) {
+ IntType input;
+
+ RawMachineAssemblerTester<int32_t> m;
+ Node* a = m.LoadFromPointer(&input, kRepresentation);
+ Node* ap1 = m.Int32Add(a, m.Int32Constant(1));
+ m.StoreToPointer(&input, kRepresentation.representation(), ap1);
+ m.Return(ap1);
+
+ const IntType max = std::numeric_limits<IntType>::max();
+ const IntType min = std::numeric_limits<IntType>::min();
+
+ // Test upper bound.
+ input = max;
+ CHECK_EQ(max + 1, m.Call());
+ CHECK_EQ(min, input);
+
+ // Test lower bound.
+ input = min;
+ CHECK_EQ(static_cast<IntType>(max + 2), m.Call());
+ CHECK_EQ(min + 1, input);
+
+ // Test all one byte values that are not one byte bounds.
+ for (int i = -127; i < 127; i++) {
+ input = i;
+ int expected = i >= 0 ? i + 1 : max + (i - min) + 2;
+ CHECK_EQ(static_cast<IntType>(expected), m.Call());
+ CHECK_EQ(static_cast<IntType>(i + 1), input);
+ }
+}
+} // namespace
+
+TEST(RunLoadStoreTruncation) {
+ LoadStoreTruncation<int8_t>(MachineType::Int8());
+ LoadStoreTruncation<int16_t>(MachineType::Int16());
+}
+
+void TestRunOobCheckedLoad(bool length_is_immediate) {
+ USE(CheckOobValue<int32_t>);
+ USE(CheckOobValue<int64_t>);
+ USE(CheckOobValue<float>);
+ USE(CheckOobValue<double>);
+
+ RawMachineAssemblerTester<int32_t> m(MachineType::Int32(),
+ MachineType::Int32());
+ MachineOperatorBuilder machine(m.zone());
+ const int32_t kNumElems = 27;
+ const int32_t kLength = kNumElems * 4;
+
+ int32_t buffer[kNumElems];
+ Node* base = m.PointerConstant(buffer);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
+ Node* node =
+ m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
+ m.Return(node);
+
+ {
+ // randomize memory.
+ v8::base::RandomNumberGenerator rng;
+ rng.SetSeed(100);
+ rng.NextBytes(&buffer[0], sizeof(buffer));
+ }
+
+ // in-bounds accesses.
+ for (int32_t i = 0; i < kNumElems; i++) {
+ int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
+ int32_t expected = buffer[i];
+ CHECK_EQ(expected, m.Call(offset, kLength));
+ }
+
+ // slightly out-of-bounds accesses.
+ for (int32_t i = kLength; i < kNumElems + 30; i++) {
+ int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
+ CheckOobValue(m.Call(offset, kLength));
+ }
+
+ // way out-of-bounds accesses.
+ for (int32_t offset = -2000000000; offset <= 2000000000;
+ offset += 100000000) {
+ if (offset == 0) continue;
+ CheckOobValue(m.Call(offset, kLength));
+ }
+}
+
+TEST(RunOobCheckedLoad) { TestRunOobCheckedLoad(false); }
+
+TEST(RunOobCheckedLoadImm) { TestRunOobCheckedLoad(true); }
+
+void TestRunOobCheckedStore(bool length_is_immediate) {
+ RawMachineAssemblerTester<int32_t> m(MachineType::Int32(),
+ MachineType::Int32());
+ MachineOperatorBuilder machine(m.zone());
+ const int32_t kNumElems = 29;
+ const int32_t kValue = -78227234;
+ const int32_t kLength = kNumElems * 4;
+
+ int32_t buffer[kNumElems + kNumElems];
+ Node* base = m.PointerConstant(buffer);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
+ Node* val = m.Int32Constant(kValue);
+ m.AddNode(machine.CheckedStore(MachineRepresentation::kWord32), base, offset,
+ len, val);
+ m.Return(val);
+
+ // in-bounds accesses.
+ for (int32_t i = 0; i < kNumElems; i++) {
+ memset(buffer, 0, sizeof(buffer));
+ int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
+ CHECK_EQ(kValue, m.Call(offset, kLength));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ if (i == j) {
+ CHECK_EQ(kValue, buffer[j]);
+ } else {
+ CHECK_EQ(0, buffer[j]);
+ }
+ }
+ }
+
+ memset(buffer, 0, sizeof(buffer));
+
+ // slightly out-of-bounds accesses.
+ for (int32_t i = kLength; i < kNumElems + 30; i++) {
+ int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
+ CHECK_EQ(kValue, m.Call(offset, kLength));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ CHECK_EQ(0, buffer[j]);
+ }
+ }
+
+ // way out-of-bounds accesses.
+ for (int32_t offset = -2000000000; offset <= 2000000000;
+ offset += 100000000) {
+ if (offset == 0) continue;
+ CHECK_EQ(kValue, m.Call(offset, kLength));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ CHECK_EQ(0, buffer[j]);
+ }
+ }
+}
+
+TEST(RunOobCheckedStore) { TestRunOobCheckedStore(false); }
+
+TEST(RunOobCheckedStoreImm) { TestRunOobCheckedStore(true); }
+
+// TODO(titzer): CheckedLoad/CheckedStore don't support 64-bit offsets.
+#define ALLOW_64_BIT_OFFSETS 0
+
+#if V8_TARGET_ARCH_64_BIT && ALLOW_64_BIT_OFFSETS
+
+void TestRunOobCheckedLoad64(uint32_t pseudo_base, bool length_is_immediate) {
+ RawMachineAssemblerTester<int32_t> m(MachineType::Uint64(),
+ MachineType::Uint64());
+ MachineOperatorBuilder machine(m.zone());
+ const uint32_t kNumElems = 25;
+ const uint32_t kLength = kNumElems * 4;
+ int32_t real_buffer[kNumElems];
+
+ // Simulate the end of a large buffer.
+ int32_t* buffer = real_buffer - (pseudo_base / 4);
+ uint64_t length = kLength + pseudo_base;
+
+ Node* base = m.PointerConstant(buffer);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int64Constant(length) : m.Parameter(1);
+ Node* node =
+ m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
+ m.Return(node);
+
+ {
+ // randomize memory.
+ v8::base::RandomNumberGenerator rng;
+ rng.SetSeed(100);
+ rng.NextBytes(&real_buffer[0], sizeof(real_buffer));
+ }
+
+ // in-bounds accesses.
+ for (uint32_t i = 0; i < kNumElems; i++) {
+ uint64_t offset = pseudo_base + i * 4;
+ int32_t expected = real_buffer[i];
+ CHECK_EQ(expected, m.Call(offset, length));
+ }
+
+ // in-bounds accesses w.r.t lower 32-bits, but upper bits set.
+ for (uint64_t i = 0x100000000ULL; i != 0; i <<= 1) {
+ uint64_t offset = pseudo_base + i;
+ CheckOobValue(m.Call(offset, length));
+ }
+
+ // slightly out-of-bounds accesses.
+ for (uint32_t i = kLength; i < kNumElems + 30; i++) {
+ uint64_t offset = pseudo_base + i * 4;
+ CheckOobValue(0, m.Call(offset, length));
+ }
+
+ // way out-of-bounds accesses.
+ for (uint64_t offset = length; offset < 100 * A_BILLION; offset += A_GIG) {
+ if (offset < length) continue;
+ CheckOobValue(0, m.Call(offset, length));
+ }
+}
+
+TEST(RunOobCheckedLoad64_0) {
+ TestRunOobCheckedLoad64(0, false);
+ TestRunOobCheckedLoad64(0, true);
+}
+
+TEST(RunOobCheckedLoad64_1) {
+ TestRunOobCheckedLoad64(1 * A_BILLION, false);
+ TestRunOobCheckedLoad64(1 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad64_2) {
+ TestRunOobCheckedLoad64(2 * A_BILLION, false);
+ TestRunOobCheckedLoad64(2 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad64_3) {
+ TestRunOobCheckedLoad64(3 * A_BILLION, false);
+ TestRunOobCheckedLoad64(3 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad64_4) {
+ TestRunOobCheckedLoad64(4 * A_BILLION, false);
+ TestRunOobCheckedLoad64(4 * A_BILLION, true);
+}
+
+void TestRunOobCheckedStore64(uint32_t pseudo_base, bool length_is_immediate) {
+ RawMachineAssemblerTester<int32_t> m(MachineType::Uint64(),
+ MachineType::Uint64());
+ MachineOperatorBuilder machine(m.zone());
+ const uint32_t kNumElems = 21;
+ const uint32_t kLength = kNumElems * 4;
+ const uint32_t kValue = 897234987;
+ int32_t real_buffer[kNumElems + kNumElems];
+
+ // Simulate the end of a large buffer.
+ int32_t* buffer = real_buffer - (pseudo_base / 4);
+ uint64_t length = kLength + pseudo_base;
+
+ Node* base = m.PointerConstant(buffer);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int64Constant(length) : m.Parameter(1);
+ Node* val = m.Int32Constant(kValue);
+ m.AddNode(machine.CheckedStore(MachineRepresentation::kWord32), base, offset,
+ len, val);
+ m.Return(val);
+
+ // in-bounds accesses.
+ for (uint32_t i = 0; i < kNumElems; i++) {
+ memset(real_buffer, 0, sizeof(real_buffer));
+ uint64_t offset = pseudo_base + i * 4;
+ CHECK_EQ(kValue, m.Call(offset, length));
+ for (uint32_t j = 0; j < kNumElems + kNumElems; j++) {
+ if (i == j) {
+ CHECK_EQ(kValue, real_buffer[j]);
+ } else {
+ CHECK_EQ(0, real_buffer[j]);
+ }
+ }
+ }
+
+ memset(real_buffer, 0, sizeof(real_buffer));
+
+ // in-bounds accesses w.r.t lower 32-bits, but upper bits set.
+ for (uint64_t i = 0x100000000ULL; i != 0; i <<= 1) {
+ uint64_t offset = pseudo_base + i;
+ CHECK_EQ(kValue, m.Call(offset, length));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ CHECK_EQ(0, real_buffer[j]);
+ }
+ }
+
+ // slightly out-of-bounds accesses.
+ for (uint32_t i = kLength; i < kNumElems + 30; i++) {
+ uint64_t offset = pseudo_base + i * 4;
+ CHECK_EQ(kValue, m.Call(offset, length));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ CHECK_EQ(0, real_buffer[j]);
+ }
+ }
+
+ // way out-of-bounds accesses.
+ for (uint64_t offset = length; offset < 100 * A_BILLION; offset += A_GIG) {
+ if (offset < length) continue;
+ CHECK_EQ(kValue, m.Call(offset, length));
+ for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
+ CHECK_EQ(0, real_buffer[j]);
+ }
+ }
+}
+
+TEST(RunOobCheckedStore64_0) {
+ TestRunOobCheckedStore64(0, false);
+ TestRunOobCheckedStore64(0, true);
+}
+
+TEST(RunOobCheckedStore64_1) {
+ TestRunOobCheckedStore64(1 * A_BILLION, false);
+ TestRunOobCheckedStore64(1 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedStore64_2) {
+ TestRunOobCheckedStore64(2 * A_BILLION, false);
+ TestRunOobCheckedStore64(2 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedStore64_3) {
+ TestRunOobCheckedStore64(3 * A_BILLION, false);
+ TestRunOobCheckedStore64(3 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedStore64_4) {
+ TestRunOobCheckedStore64(4 * A_BILLION, false);
+ TestRunOobCheckedStore64(4 * A_BILLION, true);
+}
+
+#endif
+
+void TestRunOobCheckedLoad_pseudo(uint64_t x, bool length_is_immediate) {
+ RawMachineAssemblerTester<int32_t> m(MachineType::Uint32(),
+ MachineType::Uint32());
+
+ uint32_t pseudo_base = static_cast<uint32_t>(x);
+ MachineOperatorBuilder machine(m.zone());
+ const uint32_t kNumElems = 29;
+ const uint32_t kLength = pseudo_base + kNumElems * 4;
+
+ int32_t buffer[kNumElems];
+ Node* base = m.PointerConstant(reinterpret_cast<byte*>(buffer) - pseudo_base);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
+ Node* node =
+ m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
+ m.Return(node);
+
+ {
+ // randomize memory.
+ v8::base::RandomNumberGenerator rng;
+ rng.SetSeed(100);
+ rng.NextBytes(&buffer[0], sizeof(buffer));
+ }
+
+ // in-bounds accesses.
+ for (uint32_t i = 0; i < kNumElems; i++) {
+ uint32_t offset = static_cast<uint32_t>(i * sizeof(int32_t));
+ uint32_t expected = buffer[i];
+ CHECK_EQ(expected, m.Call(offset + pseudo_base, kLength));
+ }
+
+ // slightly out-of-bounds accesses.
+ for (int32_t i = kNumElems; i < kNumElems + 30; i++) {
+ uint32_t offset = static_cast<uint32_t>(i * sizeof(int32_t));
+ CheckOobValue(m.Call(offset + pseudo_base, kLength));
+ }
+
+ // way out-of-bounds accesses.
+ for (uint64_t i = pseudo_base + sizeof(buffer); i < 0xFFFFFFFF;
+ i += A_BILLION) {
+ uint32_t offset = static_cast<uint32_t>(i);
+ CheckOobValue(m.Call(offset, kLength));
+ }
+}
+
+TEST(RunOobCheckedLoad_pseudo0) {
+ TestRunOobCheckedLoad_pseudo(0, false);
+ TestRunOobCheckedLoad_pseudo(0, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo1) {
+ TestRunOobCheckedLoad_pseudo(100000, false);
+ TestRunOobCheckedLoad_pseudo(100000, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo2) {
+ TestRunOobCheckedLoad_pseudo(A_BILLION, false);
+ TestRunOobCheckedLoad_pseudo(A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo3) {
+ TestRunOobCheckedLoad_pseudo(A_GIG, false);
+ TestRunOobCheckedLoad_pseudo(A_GIG, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo4) {
+ TestRunOobCheckedLoad_pseudo(2 * A_BILLION, false);
+ TestRunOobCheckedLoad_pseudo(2 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo5) {
+ TestRunOobCheckedLoad_pseudo(2 * A_GIG, false);
+ TestRunOobCheckedLoad_pseudo(2 * A_GIG, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo6) {
+ TestRunOobCheckedLoad_pseudo(3 * A_BILLION, false);
+ TestRunOobCheckedLoad_pseudo(3 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo7) {
+ TestRunOobCheckedLoad_pseudo(3 * A_GIG, false);
+ TestRunOobCheckedLoad_pseudo(3 * A_GIG, true);
+}
+
+TEST(RunOobCheckedLoad_pseudo8) {
+ TestRunOobCheckedLoad_pseudo(4 * A_BILLION, false);
+ TestRunOobCheckedLoad_pseudo(4 * A_BILLION, true);
+}
+
+template <typename MemType>
+void TestRunOobCheckedLoadT_pseudo(uint64_t x, bool length_is_immediate) {
+ const int32_t kReturn = 11999;
+ const uint32_t kNumElems = 29;
+ MemType buffer[kNumElems];
+ uint32_t pseudo_base = static_cast<uint32_t>(x);
+ const uint32_t kLength = static_cast<uint32_t>(pseudo_base + sizeof(buffer));
+
+ MemType result;
+
+ RawMachineAssemblerTester<int32_t> m(MachineType::Uint32(),
+ MachineType::Uint32());
+ MachineOperatorBuilder machine(m.zone());
+ Node* base = m.PointerConstant(reinterpret_cast<byte*>(buffer) - pseudo_base);
+ Node* offset = m.Parameter(0);
+ Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
+ Node* node = m.AddNode(machine.CheckedLoad(MachineTypeForC<MemType>()), base,
+ offset, len);
+ Node* store = m.StoreToPointer(
+ &result, MachineTypeForC<MemType>().representation(), node);
+ USE(store);
+ m.Return(m.Int32Constant(kReturn));
+
+ {
+ // randomize memory.
+ v8::base::RandomNumberGenerator rng;
+ rng.SetSeed(103);
+ rng.NextBytes(&buffer[0], sizeof(buffer));
+ }
+
+ // in-bounds accesses.
+ for (uint32_t i = 0; i < kNumElems; i++) {
+ uint32_t offset = static_cast<uint32_t>(i * sizeof(MemType));
+ MemType expected = buffer[i];
+ CHECK_EQ(kReturn, m.Call(offset + pseudo_base, kLength));
+ CHECK_EQ(expected, result);
+ }
+
+ // slightly out-of-bounds accesses.
+ for (int32_t i = kNumElems; i < kNumElems + 30; i++) {
+ uint32_t offset = static_cast<uint32_t>(i * sizeof(MemType));
+ CHECK_EQ(kReturn, m.Call(offset + pseudo_base, kLength));
+ CheckOobValue(result);
+ }
+
+ // way out-of-bounds accesses.
+ for (uint64_t i = pseudo_base + sizeof(buffer); i < 0xFFFFFFFF;
+ i += A_BILLION) {
+ uint32_t offset = static_cast<uint32_t>(i);
+ CHECK_EQ(kReturn, m.Call(offset, kLength));
+ CheckOobValue(result);
+ }
+}
+
+TEST(RunOobCheckedLoadT_pseudo0) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(0, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(0, true);
+ TestRunOobCheckedLoadT_pseudo<float>(0, false);
+ TestRunOobCheckedLoadT_pseudo<float>(0, true);
+ TestRunOobCheckedLoadT_pseudo<double>(0, false);
+ TestRunOobCheckedLoadT_pseudo<double>(0, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo1) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(100000, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(100000, true);
+ TestRunOobCheckedLoadT_pseudo<float>(100000, false);
+ TestRunOobCheckedLoadT_pseudo<float>(100000, true);
+ TestRunOobCheckedLoadT_pseudo<double>(100000, false);
+ TestRunOobCheckedLoadT_pseudo<double>(100000, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo2) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<float>(A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<float>(A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<double>(A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<double>(A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo3) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<float>(A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<float>(A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<double>(A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<double>(A_GIG, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo4) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<float>(2 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<float>(2 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<double>(2 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<double>(2 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo5) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<float>(2 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<float>(2 * A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<double>(2 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<double>(2 * A_GIG, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo6) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<float>(3 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<float>(3 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<double>(3 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<double>(3 * A_BILLION, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo7) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<float>(3 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<float>(3 * A_GIG, true);
+ TestRunOobCheckedLoadT_pseudo<double>(3 * A_GIG, false);
+ TestRunOobCheckedLoadT_pseudo<double>(3 * A_GIG, true);
+}
+
+TEST(RunOobCheckedLoadT_pseudo8) {
+ TestRunOobCheckedLoadT_pseudo<int32_t>(4 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<int32_t>(4 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<float>(4 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<float>(4 * A_BILLION, true);
+ TestRunOobCheckedLoadT_pseudo<double>(4 * A_BILLION, false);
+ TestRunOobCheckedLoadT_pseudo<double>(4 * A_BILLION, true);
+}
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index 2bfe124..6d681bc 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -28,6 +28,39 @@
CHECK_EQ(1, m.Call());
}
+static int RunInt32AddShift(bool is_left, int32_t add_left, int32_t add_right,
+ int32_t shift_left, int32_t shit_right) {
+ RawMachineAssemblerTester<int32_t> m;
+ Node* shift =
+ m.Word32Shl(m.Int32Constant(shift_left), m.Int32Constant(shit_right));
+ Node* add = m.Int32Add(m.Int32Constant(add_left), m.Int32Constant(add_right));
+ Node* lsa = is_left ? m.Int32Add(shift, add) : m.Int32Add(add, shift);
+ m.Return(lsa);
+ return m.Call();
+}
+
+TEST(RunInt32AddShift) {
+ struct Test_case {
+ int32_t add_left, add_right, shift_left, shit_right, expected;
+ };
+
+ Test_case tc[] = {
+ {20, 22, 4, 2, 58},
+ {20, 22, 4, 1, 50},
+ {20, 22, 1, 6, 106},
+ {INT_MAX - 2, 1, 1, 1, INT_MIN}, // INT_MAX - 2 + 1 + (1 << 1), overflow.
+ };
+ const size_t tc_size = sizeof(tc) / sizeof(Test_case);
+
+ for (size_t i = 0; i < tc_size; ++i) {
+ CHECK_EQ(tc[i].expected,
+ RunInt32AddShift(false, tc[i].add_left, tc[i].add_right,
+ tc[i].shift_left, tc[i].shit_right));
+ CHECK_EQ(tc[i].expected,
+ RunInt32AddShift(true, tc[i].add_left, tc[i].add_right,
+ tc[i].shift_left, tc[i].shit_right));
+ }
+}
TEST(RunWord32ReverseBits) {
BufferedRawMachineAssemblerTester<uint32_t> m(MachineType::Uint32());
@@ -636,6 +669,38 @@
}
}
+static int64_t RunInt64AddShift(bool is_left, int64_t add_left,
+ int64_t add_right, int64_t shift_left,
+ int64_t shit_right) {
+ RawMachineAssemblerTester<int64_t> m;
+ Node* shift = m.Word64Shl(m.Int64Constant(4), m.Int64Constant(2));
+ Node* add = m.Int64Add(m.Int64Constant(20), m.Int64Constant(22));
+ Node* dlsa = is_left ? m.Int64Add(shift, add) : m.Int64Add(add, shift);
+ m.Return(dlsa);
+ return m.Call();
+}
+
+TEST(RunInt64AddShift) {
+ struct Test_case {
+ int64_t add_left, add_right, shift_left, shit_right, expected;
+ };
+
+ Test_case tc[] = {
+ {20, 22, 4, 2, 58},
+ {20, 22, 4, 1, 50},
+ {20, 22, 1, 6, 106},
+ {INT64_MAX - 2, 1, 1, 1,
+ INT64_MIN}, // INT64_MAX - 2 + 1 + (1 << 1), overflow.
+ };
+ const size_t tc_size = sizeof(tc) / sizeof(Test_case);
+
+ for (size_t i = 0; i < tc_size; ++i) {
+ CHECK_EQ(58, RunInt64AddShift(false, tc[i].add_left, tc[i].add_right,
+ tc[i].shift_left, tc[i].shit_right));
+ CHECK_EQ(58, RunInt64AddShift(true, tc[i].add_left, tc[i].add_right,
+ tc[i].shift_left, tc[i].shit_right));
+ }
+}
// TODO(titzer): add tests that run 64-bit integer operations.
#endif // V8_TARGET_ARCH_64_BIT
@@ -1142,94 +1207,6 @@
}
-TEST(RunLoadInt32) {
- RawMachineAssemblerTester<int32_t> m;
-
- int32_t p1 = 0; // loads directly from this location.
- m.Return(m.LoadFromPointer(&p1, MachineType::Int32()));
-
- FOR_INT32_INPUTS(i) {
- p1 = *i;
- CHECK_EQ(p1, m.Call());
- }
-}
-
-
-TEST(RunLoadInt32Offset) {
- int32_t p1 = 0; // loads directly from this location.
-
- int32_t offsets[] = {-2000000, -100, -101, 1, 3,
- 7, 120, 2000, 2000000000, 0xff};
-
- for (size_t i = 0; i < arraysize(offsets); i++) {
- RawMachineAssemblerTester<int32_t> m;
- int32_t offset = offsets[i];
- byte* pointer = reinterpret_cast<byte*>(&p1) - offset;
- // generate load [#base + #index]
- m.Return(m.LoadFromPointer(pointer, MachineType::Int32(), offset));
-
- FOR_INT32_INPUTS(j) {
- p1 = *j;
- CHECK_EQ(p1, m.Call());
- }
- }
-}
-
-
-TEST(RunLoadStoreFloat32Offset) {
- float p1 = 0.0f; // loads directly from this location.
- float p2 = 0.0f; // and stores directly into this location.
-
- FOR_INT32_INPUTS(i) {
- int32_t magic = 0x2342aabb + *i * 3;
- RawMachineAssemblerTester<int32_t> m;
- int32_t offset = *i;
- byte* from = reinterpret_cast<byte*>(&p1) - offset;
- byte* to = reinterpret_cast<byte*>(&p2) - offset;
- // generate load [#base + #index]
- Node* load = m.Load(MachineType::Float32(), m.PointerConstant(from),
- m.IntPtrConstant(offset));
- m.Store(MachineRepresentation::kFloat32, m.PointerConstant(to),
- m.IntPtrConstant(offset), load, kNoWriteBarrier);
- m.Return(m.Int32Constant(magic));
-
- FOR_FLOAT32_INPUTS(j) {
- p1 = *j;
- p2 = *j - 5;
- CHECK_EQ(magic, m.Call());
- CHECK_DOUBLE_EQ(p1, p2);
- }
- }
-}
-
-
-TEST(RunLoadStoreFloat64Offset) {
- double p1 = 0; // loads directly from this location.
- double p2 = 0; // and stores directly into this location.
-
- FOR_INT32_INPUTS(i) {
- int32_t magic = 0x2342aabb + *i * 3;
- RawMachineAssemblerTester<int32_t> m;
- int32_t offset = *i;
- byte* from = reinterpret_cast<byte*>(&p1) - offset;
- byte* to = reinterpret_cast<byte*>(&p2) - offset;
- // generate load [#base + #index]
- Node* load = m.Load(MachineType::Float64(), m.PointerConstant(from),
- m.IntPtrConstant(offset));
- m.Store(MachineRepresentation::kFloat64, m.PointerConstant(to),
- m.IntPtrConstant(offset), load, kNoWriteBarrier);
- m.Return(m.Int32Constant(magic));
-
- FOR_FLOAT64_INPUTS(j) {
- p1 = *j;
- p2 = *j - 5;
- CHECK_EQ(magic, m.Call());
- CHECK_DOUBLE_EQ(p1, p2);
- }
- }
-}
-
-
TEST(RunInt32AddP) {
RawMachineAssemblerTester<int32_t> m;
Int32BinopTester bt(&m);
@@ -1709,7 +1686,6 @@
}
}
-
TEST(RunInt32SubImm) {
{
FOR_UINT32_INPUTS(i) {
@@ -1733,6 +1709,11 @@
}
}
+TEST(RunInt32SubImm2) {
+ BufferedRawMachineAssemblerTester<int32_t> r;
+ r.Return(r.Int32Sub(r.Int32Constant(-1), r.Int32Constant(0)));
+ CHECK_EQ(-1, r.Call());
+}
TEST(RunInt32SubAndWord32SarP) {
{
@@ -3566,92 +3547,6 @@
}
-template <typename Type>
-static void RunLoadImmIndex(MachineType rep) {
- const int kNumElems = 3;
- Type buffer[kNumElems];
-
- // initialize the buffer with some raw data.
- byte* raw = reinterpret_cast<byte*>(buffer);
- for (size_t i = 0; i < sizeof(buffer); i++) {
- raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
- }
-
- // Test with various large and small offsets.
- for (int offset = -1; offset <= 200000; offset *= -5) {
- for (int i = 0; i < kNumElems; i++) {
- BufferedRawMachineAssemblerTester<Type> m;
- Node* base = m.PointerConstant(buffer - offset);
- Node* index = m.Int32Constant((offset + i) * sizeof(buffer[0]));
- m.Return(m.Load(rep, base, index));
-
- volatile Type expected = buffer[i];
- volatile Type actual = m.Call();
- CHECK_EQ(expected, actual);
- }
- }
-}
-
-
-TEST(RunLoadImmIndex) {
- RunLoadImmIndex<int8_t>(MachineType::Int8());
- RunLoadImmIndex<uint8_t>(MachineType::Uint8());
- RunLoadImmIndex<int16_t>(MachineType::Int16());
- RunLoadImmIndex<uint16_t>(MachineType::Uint16());
- RunLoadImmIndex<int32_t>(MachineType::Int32());
- RunLoadImmIndex<uint32_t>(MachineType::Uint32());
- RunLoadImmIndex<int32_t*>(MachineType::AnyTagged());
- RunLoadImmIndex<float>(MachineType::Float32());
- RunLoadImmIndex<double>(MachineType::Float64());
- if (kPointerSize == 8) {
- RunLoadImmIndex<int64_t>(MachineType::Int64());
- }
- // TODO(titzer): test various indexing modes.
-}
-
-
-template <typename CType>
-static void RunLoadStore(MachineType rep) {
- const int kNumElems = 4;
- CType buffer[kNumElems];
-
- for (int32_t x = 0; x < kNumElems; x++) {
- int32_t y = kNumElems - x - 1;
- // initialize the buffer with raw data.
- byte* raw = reinterpret_cast<byte*>(buffer);
- for (size_t i = 0; i < sizeof(buffer); i++) {
- raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
- }
-
- RawMachineAssemblerTester<int32_t> m;
- int32_t OK = 0x29000 + x;
- Node* base = m.PointerConstant(buffer);
- Node* index0 = m.IntPtrConstant(x * sizeof(buffer[0]));
- Node* load = m.Load(rep, base, index0);
- Node* index1 = m.IntPtrConstant(y * sizeof(buffer[0]));
- m.Store(rep.representation(), base, index1, load, kNoWriteBarrier);
- m.Return(m.Int32Constant(OK));
-
- CHECK(buffer[x] != buffer[y]);
- CHECK_EQ(OK, m.Call());
- CHECK(buffer[x] == buffer[y]);
- }
-}
-
-
-TEST(RunLoadStore) {
- RunLoadStore<int8_t>(MachineType::Int8());
- RunLoadStore<uint8_t>(MachineType::Uint8());
- RunLoadStore<int16_t>(MachineType::Int16());
- RunLoadStore<uint16_t>(MachineType::Uint16());
- RunLoadStore<int32_t>(MachineType::Int32());
- RunLoadStore<uint32_t>(MachineType::Uint32());
- RunLoadStore<void*>(MachineType::AnyTagged());
- RunLoadStore<float>(MachineType::Float32());
- RunLoadStore<double>(MachineType::Float64());
-}
-
-
TEST(RunFloat32Add) {
BufferedRawMachineAssemblerTester<float> m(MachineType::Float32(),
MachineType::Float32());
@@ -4124,7 +4019,7 @@
m.Return(m.TruncateFloat32ToUint32(m.Parameter(0)));
{
FOR_UINT32_INPUTS(i) {
- float input = static_cast<float>(*i);
+ volatile float input = static_cast<float>(*i);
// This condition on 'input' is required because
// static_cast<float>(std::numeric_limits<uint32_t>::max()) results in a
// value outside uint32 range.
@@ -4201,7 +4096,7 @@
return (static_cast<uint64_t>(high) << 32) | static_cast<uint64_t>(low);
}
-#if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87
+#if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_X87
TEST(RunInt32PairAdd) {
BufferedRawMachineAssemblerTester<int32_t> m(
MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(),
@@ -4449,6 +4344,56 @@
TestWord32PairShlWithSharedInput(1, 1);
}
+TEST(RunWord32PairShr) {
+ BufferedRawMachineAssemblerTester<int32_t> m(
+ MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32());
+
+ uint32_t high;
+ uint32_t low;
+
+ Node* PairAdd =
+ m.Word32PairShr(m.Parameter(0), m.Parameter(1), m.Parameter(2));
+
+ m.StoreToPointer(&low, MachineRepresentation::kWord32,
+ m.Projection(0, PairAdd));
+ m.StoreToPointer(&high, MachineRepresentation::kWord32,
+ m.Projection(1, PairAdd));
+ m.Return(m.Int32Constant(74));
+
+ FOR_UINT64_INPUTS(i) {
+ for (uint32_t j = 0; j < 64; j++) {
+ m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+ static_cast<uint32_t>(*i >> 32), j);
+ CHECK_EQ(*i >> j, ToInt64(low, high));
+ }
+ }
+}
+
+TEST(RunWord32PairSar) {
+ BufferedRawMachineAssemblerTester<int32_t> m(
+ MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32());
+
+ uint32_t high;
+ uint32_t low;
+
+ Node* PairAdd =
+ m.Word32PairSar(m.Parameter(0), m.Parameter(1), m.Parameter(2));
+
+ m.StoreToPointer(&low, MachineRepresentation::kWord32,
+ m.Projection(0, PairAdd));
+ m.StoreToPointer(&high, MachineRepresentation::kWord32,
+ m.Projection(1, PairAdd));
+ m.Return(m.Int32Constant(74));
+
+ FOR_INT64_INPUTS(i) {
+ for (uint32_t j = 0; j < 64; j++) {
+ m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+ static_cast<uint32_t>(*i >> 32), j);
+ CHECK_EQ(*i >> j, ToInt64(low, high));
+ }
+ }
+}
+
#endif
TEST(RunDeadChangeFloat64ToInt32) {
@@ -4968,45 +4913,6 @@
}
-template <typename IntType>
-static void LoadStoreTruncation(MachineType kRepresentation) {
- IntType input;
-
- RawMachineAssemblerTester<int32_t> m;
- Node* a = m.LoadFromPointer(&input, kRepresentation);
- Node* ap1 = m.Int32Add(a, m.Int32Constant(1));
- m.StoreToPointer(&input, kRepresentation.representation(), ap1);
- m.Return(ap1);
-
- const IntType max = std::numeric_limits<IntType>::max();
- const IntType min = std::numeric_limits<IntType>::min();
-
- // Test upper bound.
- input = max;
- CHECK_EQ(max + 1, m.Call());
- CHECK_EQ(min, input);
-
- // Test lower bound.
- input = min;
- CHECK_EQ(static_cast<IntType>(max + 2), m.Call());
- CHECK_EQ(min + 1, input);
-
- // Test all one byte values that are not one byte bounds.
- for (int i = -127; i < 127; i++) {
- input = i;
- int expected = i >= 0 ? i + 1 : max + (i - min) + 2;
- CHECK_EQ(static_cast<IntType>(expected), m.Call());
- CHECK_EQ(static_cast<IntType>(i + 1), input);
- }
-}
-
-
-TEST(RunLoadStoreTruncation) {
- LoadStoreTruncation<int8_t>(MachineType::Int8());
- LoadStoreTruncation<int16_t>(MachineType::Int16());
-}
-
-
static void IntPtrCompare(intptr_t left, intptr_t right) {
for (int test = 0; test < 7; test++) {
RawMachineAssemblerTester<bool> m(MachineType::Pointer(),
@@ -5417,8 +5323,7 @@
}
}
-
-TEST(RunTruncateFloat64ToInt32P) {
+TEST(RunTruncateFloat64ToWord32P) {
struct {
double from;
double raw;
@@ -5479,8 +5384,7 @@
{-1.7976931348623157e+308, 0}};
double input = -1.0;
RawMachineAssemblerTester<int32_t> m;
- m.Return(m.TruncateFloat64ToInt32(
- TruncationMode::kJavaScript,
+ m.Return(m.TruncateFloat64ToWord32(
m.LoadFromPointer(&input, MachineType::Float64())));
for (size_t i = 0; i < arraysize(kValues); ++i) {
input = kValues[i].from;
@@ -5489,6 +5393,12 @@
}
}
+TEST(RunTruncateFloat64ToWord32SignExtension) {
+ BufferedRawMachineAssemblerTester<int32_t> r;
+ r.Return(r.Int32Sub(r.TruncateFloat64ToWord32(r.Float64Constant(-1.0)),
+ r.Int32Constant(0)));
+ CHECK_EQ(-1, r.Call());
+}
TEST(RunChangeFloat32ToFloat64) {
BufferedRawMachineAssemblerTester<double> m(MachineType::Float32());
@@ -5854,50 +5764,6 @@
#if V8_TARGET_ARCH_64_BIT
// TODO(titzer): run int64 tests on all platforms when supported.
-TEST(RunCheckedLoadInt64) {
- int64_t buffer[] = {0x66bbccddeeff0011LL, 0x1122334455667788LL};
- RawMachineAssemblerTester<int64_t> m(MachineType::Int32());
- Node* base = m.PointerConstant(buffer);
- Node* index = m.Parameter(0);
- Node* length = m.Int32Constant(16);
- Node* load = m.AddNode(m.machine()->CheckedLoad(MachineType::Int64()), base,
- index, length);
- m.Return(load);
-
- CHECK_EQ(buffer[0], m.Call(0));
- CHECK_EQ(buffer[1], m.Call(8));
- CHECK_EQ(0, m.Call(16));
-}
-
-
-TEST(RunCheckedStoreInt64) {
- const int64_t write = 0x5566778899aabbLL;
- const int64_t before = 0x33bbccddeeff0011LL;
- int64_t buffer[] = {before, before};
- RawMachineAssemblerTester<int32_t> m(MachineType::Int32());
- Node* base = m.PointerConstant(buffer);
- Node* index = m.Parameter(0);
- Node* length = m.Int32Constant(16);
- Node* value = m.Int64Constant(write);
- Node* store =
- m.AddNode(m.machine()->CheckedStore(MachineRepresentation::kWord64), base,
- index, length, value);
- USE(store);
- m.Return(m.Int32Constant(11));
-
- CHECK_EQ(11, m.Call(16));
- CHECK_EQ(before, buffer[0]);
- CHECK_EQ(before, buffer[1]);
-
- CHECK_EQ(11, m.Call(0));
- CHECK_EQ(write, buffer[0]);
- CHECK_EQ(before, buffer[1]);
-
- CHECK_EQ(11, m.Call(8));
- CHECK_EQ(write, buffer[0]);
- CHECK_EQ(write, buffer[1]);
-}
-
TEST(RunBitcastInt64ToFloat64) {
int64_t input = 1;
diff --git a/test/cctest/compiler/test-run-native-calls.cc b/test/cctest/compiler/test-run-native-calls.cc
index bfdcc0e..a63cc8a 100644
--- a/test/cctest/compiler/test-run-native-calls.cc
+++ b/test/cctest/compiler/test-run-native-calls.cc
@@ -255,7 +255,7 @@
Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph,
Schedule* schedule = nullptr) {
Isolate* isolate = CcTest::InitIsolateOnce();
- CompilationInfo info("testing", isolate, graph->zone());
+ CompilationInfo info(ArrayVector("testing"), isolate, graph->zone());
Handle<Code> code =
Pipeline::GenerateCodeForTesting(&info, desc, graph, schedule);
CHECK(!code.is_null());
diff --git a/test/cctest/compiler/test-run-stubs.cc b/test/cctest/compiler/test-run-stubs.cc
index c745219..feb25c9 100644
--- a/test/cctest/compiler/test-run-stubs.cc
+++ b/test/cctest/compiler/test-run-stubs.cc
@@ -27,7 +27,7 @@
// Create code and an accompanying descriptor.
StringLengthStub stub(isolate);
Handle<Code> code = stub.GenerateCode();
- CompilationInfo info("test", isolate, zone,
+ CompilationInfo info(ArrayVector("test"), isolate, zone,
Code::ComputeFlags(Code::HANDLER));
CallInterfaceDescriptor interface_descriptor =
stub.GetCallInterfaceDescriptor();
diff --git a/test/cctest/compiler/test-run-wasm-machops.cc b/test/cctest/compiler/test-run-wasm-machops.cc
new file mode 100644
index 0000000..0b23669
--- /dev/null
+++ b/test/cctest/compiler/test-run-wasm-machops.cc
@@ -0,0 +1,170 @@
+// Copyright 2016 the V8 project authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#include <cmath>
+#include <functional>
+#include <limits>
+
+#include "src/base/bits.h"
+#include "src/base/utils/random-number-generator.h"
+#include "src/codegen.h"
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/codegen-tester.h"
+#include "test/cctest/compiler/graph-builder-tester.h"
+#include "test/cctest/compiler/value-helper.h"
+
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+
+static void UpdateMemoryReferences(Handle<Code> code, Address old_base,
+ Address new_base, uint32_t old_size,
+ uint32_t new_size) {
+ Isolate* isolate = CcTest::i_isolate();
+ bool modified = false;
+ int mode_mask = RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_REFERENCE) |
+ RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemoryReference(mode) ||
+ RelocInfo::IsWasmMemorySizeReference(mode)) {
+ // Patch addresses with change in memory start address
+ it.rinfo()->update_wasm_memory_reference(old_base, new_base, old_size,
+ new_size);
+ modified = true;
+ }
+ }
+ if (modified) {
+ Assembler::FlushICache(isolate, code->instruction_start(),
+ code->instruction_size());
+ }
+}
+
+template <typename CType>
+static void RunLoadStoreRelocation(MachineType rep) {
+ const int kNumElems = 2;
+ CType buffer[kNumElems];
+ CType new_buffer[kNumElems];
+ byte* raw = reinterpret_cast<byte*>(buffer);
+ byte* new_raw = reinterpret_cast<byte*>(new_buffer);
+ for (size_t i = 0; i < sizeof(buffer); i++) {
+ raw[i] = static_cast<byte>((i + sizeof(CType)) ^ 0xAA);
+ new_raw[i] = static_cast<byte>((i + sizeof(CType)) ^ 0xAA);
+ }
+ int32_t OK = 0x29000;
+ RawMachineAssemblerTester<uint32_t> m;
+ Node* base = m.RelocatableIntPtrConstant(reinterpret_cast<intptr_t>(raw),
+ RelocInfo::WASM_MEMORY_REFERENCE);
+ Node* base1 = m.RelocatableIntPtrConstant(
+ reinterpret_cast<intptr_t>(raw + sizeof(CType)),
+ RelocInfo::WASM_MEMORY_REFERENCE);
+ Node* index = m.Int32Constant(0);
+ Node* load = m.Load(rep, base, index);
+ m.Store(rep.representation(), base1, index, load, kNoWriteBarrier);
+ m.Return(m.Int32Constant(OK));
+ CHECK(buffer[0] != buffer[1]);
+ CHECK_EQ(OK, m.Call());
+ CHECK(buffer[0] == buffer[1]);
+ m.GenerateCode();
+ Handle<Code> code = m.GetCode();
+ UpdateMemoryReferences(code, raw, new_raw, sizeof(buffer),
+ sizeof(new_buffer));
+ CHECK(new_buffer[0] != new_buffer[1]);
+ CHECK_EQ(OK, m.Call());
+ CHECK(new_buffer[0] == new_buffer[1]);
+}
+
+TEST(RunLoadStoreRelocation) {
+ RunLoadStoreRelocation<int8_t>(MachineType::Int8());
+ RunLoadStoreRelocation<uint8_t>(MachineType::Uint8());
+ RunLoadStoreRelocation<int16_t>(MachineType::Int16());
+ RunLoadStoreRelocation<uint16_t>(MachineType::Uint16());
+ RunLoadStoreRelocation<int32_t>(MachineType::Int32());
+ RunLoadStoreRelocation<uint32_t>(MachineType::Uint32());
+ RunLoadStoreRelocation<void*>(MachineType::AnyTagged());
+ RunLoadStoreRelocation<float>(MachineType::Float32());
+ RunLoadStoreRelocation<double>(MachineType::Float64());
+}
+
+template <typename CType>
+static void RunLoadStoreRelocationOffset(MachineType rep) {
+ RawMachineAssemblerTester<int32_t> r(MachineType::Int32());
+ const int kNumElems = 4;
+ CType buffer[kNumElems];
+ CType new_buffer[kNumElems + 1];
+
+ for (int32_t x = 0; x < kNumElems; x++) {
+ int32_t y = kNumElems - x - 1;
+ // initialize the buffer with raw data.
+ byte* raw = reinterpret_cast<byte*>(buffer);
+ for (size_t i = 0; i < sizeof(buffer); i++) {
+ raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
+ }
+
+ RawMachineAssemblerTester<int32_t> m;
+ int32_t OK = 0x29000 + x;
+ Node* base = m.RelocatableIntPtrConstant(reinterpret_cast<intptr_t>(buffer),
+ RelocInfo::WASM_MEMORY_REFERENCE);
+ Node* index0 = m.IntPtrConstant(x * sizeof(buffer[0]));
+ Node* load = m.Load(rep, base, index0);
+ Node* index1 = m.IntPtrConstant(y * sizeof(buffer[0]));
+ m.Store(rep.representation(), base, index1, load, kNoWriteBarrier);
+ m.Return(m.Int32Constant(OK));
+
+ CHECK(buffer[x] != buffer[y]);
+ CHECK_EQ(OK, m.Call());
+ CHECK(buffer[x] == buffer[y]);
+ m.GenerateCode();
+
+ // Initialize new buffer and set old_buffer to 0
+ byte* new_raw = reinterpret_cast<byte*>(new_buffer);
+ for (size_t i = 0; i < sizeof(buffer); i++) {
+ raw[i] = 0;
+ new_raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
+ }
+
+ // Perform relocation on generated code
+ Handle<Code> code = m.GetCode();
+ UpdateMemoryReferences(code, raw, new_raw, sizeof(buffer),
+ sizeof(new_buffer));
+
+ CHECK(new_buffer[x] != new_buffer[y]);
+ CHECK_EQ(OK, m.Call());
+ CHECK(new_buffer[x] == new_buffer[y]);
+ }
+}
+
+TEST(RunLoadStoreRelocationOffset) {
+ RunLoadStoreRelocationOffset<int8_t>(MachineType::Int8());
+ RunLoadStoreRelocationOffset<uint8_t>(MachineType::Uint8());
+ RunLoadStoreRelocationOffset<int16_t>(MachineType::Int16());
+ RunLoadStoreRelocationOffset<uint16_t>(MachineType::Uint16());
+ RunLoadStoreRelocationOffset<int32_t>(MachineType::Int32());
+ RunLoadStoreRelocationOffset<uint32_t>(MachineType::Uint32());
+ RunLoadStoreRelocationOffset<void*>(MachineType::AnyTagged());
+ RunLoadStoreRelocationOffset<float>(MachineType::Float32());
+ RunLoadStoreRelocationOffset<double>(MachineType::Float64());
+}
+
+TEST(Uint32LessThanRelocation) {
+ RawMachineAssemblerTester<uint32_t> m;
+ RawMachineLabel within_bounds, out_of_bounds;
+ Node* index = m.Int32Constant(0x200);
+ Node* limit =
+ m.RelocatableInt32Constant(0x200, RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ Node* cond = m.AddNode(m.machine()->Uint32LessThan(), index, limit);
+ m.Branch(cond, &within_bounds, &out_of_bounds);
+ m.Bind(&within_bounds);
+ m.Return(m.Int32Constant(0xaced));
+ m.Bind(&out_of_bounds);
+ m.Return(m.Int32Constant(0xdeadbeef));
+ // Check that index is out of bounds with current size
+ CHECK_EQ(0xdeadbeef, m.Call());
+ m.GenerateCode();
+
+ Handle<Code> code = m.GetCode();
+ UpdateMemoryReferences(code, reinterpret_cast<Address>(1234),
+ reinterpret_cast<Address>(1234), 0x200, 0x400);
+ // Check that after limit is increased, index is within bounds.
+ CHECK_EQ(0xaced, m.Call());
+}
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc
index b5e9929..4efb149 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -6,13 +6,14 @@
#include "src/ast/scopes.h"
#include "src/compiler/access-builder.h"
-#include "src/compiler/change-lowering.h"
#include "src/compiler/control-builders.h"
-#include "src/compiler/graph-reducer.h"
+#include "src/compiler/effect-control-linearizer.h"
#include "src/compiler/graph-visualizer.h"
+#include "src/compiler/memory-optimizer.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/pipeline.h"
#include "src/compiler/representation-change.h"
+#include "src/compiler/scheduler.h"
#include "src/compiler/simplified-lowering.h"
#include "src/compiler/source-position.h"
#include "src/compiler/typer.h"
@@ -60,11 +61,13 @@
typer.Run();
lowering.LowerAllNodes();
- ChangeLowering lowering(&jsgraph);
- GraphReducer reducer(this->zone(), this->graph());
- reducer.AddReducer(&lowering);
- reducer.ReduceGraph();
- Verifier::Run(this->graph());
+ Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(),
+ Scheduler::kNoFlags);
+ EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone());
+ linearizer.Run();
+
+ MemoryOptimizer memory_optimizer(&jsgraph, this->zone());
+ memory_optimizer.Optimize();
}
void CheckNumberCall(double expected, double input) {
@@ -99,13 +102,15 @@
double input;
int32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
- MachineType::Float64()};
+ FieldAccess load = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Number(),
+ MachineType::Float64(), kNoWriteBarrier};
Node* loaded = t.LoadField(load, t.PointerConstant(&input));
NodeProperties::SetType(loaded, Type::Number());
Node* convert = t.NumberToInt32(loaded);
- FieldAccess store = {kUntaggedBase, 0, Handle<Name>(), Type::Signed32(),
- MachineType::Int32()};
+ FieldAccess store = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Signed32(),
+ MachineType::Int32(), kNoWriteBarrier};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
t.LowerAllNodesAndLowerChanges();
@@ -126,13 +131,15 @@
double input;
uint32_t result;
SimplifiedLoweringTester<Object*> t;
- FieldAccess load = {kUntaggedBase, 0, Handle<Name>(), Type::Number(),
- MachineType::Float64()};
+ FieldAccess load = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Number(),
+ MachineType::Float64(), kNoWriteBarrier};
Node* loaded = t.LoadField(load, t.PointerConstant(&input));
NodeProperties::SetType(loaded, Type::Number());
Node* convert = t.NumberToUint32(loaded);
- FieldAccess store = {kUntaggedBase, 0, Handle<Name>(), Type::Unsigned32(),
- MachineType::Uint32()};
+ FieldAccess store = {kUntaggedBase, 0,
+ Handle<Name>(), Type::Unsigned32(),
+ MachineType::Uint32(), kNoWriteBarrier};
t.StoreField(store, t.PointerConstant(&result), convert);
t.Return(t.jsgraph.TrueConstant());
t.LowerAllNodesAndLowerChanges();
@@ -291,8 +298,12 @@
for (size_t i = 0; i < arraysize(smis); i++) {
int offset = static_cast<int>(i * sizeof(Smi*));
- FieldAccess access = {kUntaggedBase, offset, Handle<Name>(),
- Type::Integral32(), MachineType::AnyTagged()};
+ FieldAccess access = {kUntaggedBase,
+ offset,
+ Handle<Name>(),
+ Type::Integral32(),
+ MachineType::AnyTagged(),
+ kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t;
Node* load = t.LoadField(access, t.PointerConstant(smis));
@@ -313,8 +324,12 @@
for (size_t i = 0; i < arraysize(smis); i++) {
int offset = static_cast<int>(i * sizeof(Smi*));
- FieldAccess access = {kUntaggedBase, offset, Handle<Name>(),
- Type::Integral32(), MachineType::AnyTagged()};
+ FieldAccess access = {kUntaggedBase,
+ offset,
+ Handle<Name>(),
+ Type::Integral32(),
+ MachineType::AnyTagged(),
+ kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t(MachineType::AnyTagged());
Node* p0 = t.Parameter(0);
@@ -340,7 +355,7 @@
for (size_t j = 0; (i + j) < arraysize(smis); j++) { // for element index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t;
Node* load = t.LoadElement(access, t.PointerConstant(smis),
@@ -366,7 +381,7 @@
for (size_t j = 0; (i + j) < arraysize(smis); j++) { // for element index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
SimplifiedLoweringTester<Object*> t(MachineType::AnyTagged());
Node* p0 = t.Parameter(0);
@@ -518,7 +533,7 @@
ElementAccess GetElementAccess() {
ElementAccess access = {tagged ? kTaggedBase : kUntaggedBase,
tagged ? FixedArrayBase::kHeaderSize : 0,
- Type::Any(), rep};
+ Type::Any(), rep, kFullWriteBarrier};
return access;
}
@@ -526,7 +541,10 @@
int offset = field * sizeof(E);
FieldAccess access = {tagged ? kTaggedBase : kUntaggedBase,
offset + (tagged ? FixedArrayBase::kHeaderSize : 0),
- Handle<Name>(), Type::Any(), rep};
+ Handle<Name>(),
+ Type::Any(),
+ rep,
+ kFullWriteBarrier};
return access;
}
@@ -726,11 +744,13 @@
SourcePositionTable table(jsgraph.graph());
SimplifiedLowering(&jsgraph, jsgraph.zone(), &table).LowerAllNodes();
- ChangeLowering lowering(&jsgraph);
- GraphReducer reducer(this->zone(), this->graph());
- reducer.AddReducer(&lowering);
- reducer.ReduceGraph();
- Verifier::Run(this->graph());
+ Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(),
+ Scheduler::kNoFlags);
+ EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone());
+ linearizer.Run();
+
+ MemoryOptimizer memory_optimizer(&jsgraph, this->zone());
+ memory_optimizer.Optimize();
}
// Inserts the node as the return value of the graph.
@@ -831,7 +851,7 @@
Node* use = t.Use(inv, MachineType::AnyTagged());
t.Return(use);
t.Lower();
- CHECK_EQ(IrOpcode::kChangeBitToBool, use->InputAt(0)->opcode());
+ CHECK_EQ(IrOpcode::kChangeBitToTagged, use->InputAt(0)->opcode());
Node* cmp = use->InputAt(0)->InputAt(0);
CHECK_EQ(t.machine()->Word32Equal()->opcode(), cmp->opcode());
CHECK(b == cmp->InputAt(0) || b == cmp->InputAt(1));
@@ -863,7 +883,7 @@
Node* use = t.Use(inv, MachineType::AnyTagged());
t.Return(use);
t.Lower();
- CHECK_EQ(IrOpcode::kChangeBitToBool, use->InputAt(0)->opcode());
+ CHECK_EQ(IrOpcode::kChangeBitToTagged, use->InputAt(0)->opcode());
Node* cmp = use->InputAt(0)->InputAt(0);
CHECK_EQ(t.machine()->WordEqual()->opcode(), cmp->opcode());
CHECK(b == cmp->InputAt(0) || b == cmp->InputAt(1));
@@ -908,7 +928,7 @@
t.Return(use);
t.Lower();
CHECK_EQ(b, use->InputAt(0)->InputAt(0));
- CHECK_EQ(IrOpcode::kChangeUint32ToTagged, use->InputAt(0)->opcode());
+ CHECK_EQ(IrOpcode::kChangeInt31ToTaggedSigned, use->InputAt(0)->opcode());
}
@@ -921,7 +941,7 @@
t.Return(use);
t.Lower();
CHECK_EQ(cnv, use->InputAt(0)->InputAt(0));
- CHECK_EQ(IrOpcode::kChangeUint32ToTagged, use->InputAt(0)->opcode());
+ CHECK_EQ(IrOpcode::kChangeInt31ToTaggedSigned, use->InputAt(0)->opcode());
CHECK_EQ(t.machine()->WordEqual()->opcode(), cnv->opcode());
CHECK(b == cnv->InputAt(0) || b == cnv->InputAt(1));
Node* c = t.jsgraph.TrueConstant();
@@ -1046,8 +1066,7 @@
CheckChangeOf(IrOpcode::kChangeTaggedToInt32, t.p0, use->InputAt(0));
}
-
-TEST(LowerNumberToInt32_to_TruncateFloat64ToInt32) {
+TEST(LowerNumberToInt32_to_TruncateFloat64ToWord32) {
// NumberToInt32(x: kRepFloat64) used as MachineType::Int32()
TestingGraph t(Type::Number());
Node* p0 = t.ExampleWithOutput(MachineType::Float64());
@@ -1055,22 +1074,17 @@
Node* use = t.Use(trunc, MachineType::Int32());
t.Return(use);
t.Lower();
- CheckChangeOf(IrOpcode::kTruncateFloat64ToInt32, p0, use->InputAt(0));
+ CheckChangeOf(IrOpcode::kTruncateFloat64ToWord32, p0, use->InputAt(0));
}
-
-TEST(LowerNumberToInt32_to_TruncateFloat64ToInt32_with_change) {
+TEST(LowerNumberToInt32_to_TruncateTaggedToWord32) {
// NumberToInt32(x: kTypeNumber | kRepTagged) used as MachineType::Int32()
TestingGraph t(Type::Number());
Node* trunc = t.graph()->NewNode(t.simplified()->NumberToInt32(), t.p0);
Node* use = t.Use(trunc, MachineType::Int32());
t.Return(use);
t.Lower();
- Node* node = use->InputAt(0);
- CHECK_EQ(IrOpcode::kTruncateFloat64ToInt32, node->opcode());
- Node* of = node->InputAt(0);
- CHECK_EQ(IrOpcode::kChangeTaggedToFloat64, of->opcode());
- CHECK_EQ(t.p0, of->InputAt(0));
+ CheckChangeOf(IrOpcode::kTruncateTaggedToWord32, t.p0, use->InputAt(0));
}
@@ -1084,8 +1098,7 @@
CheckChangeOf(IrOpcode::kChangeTaggedToUint32, t.p0, use->InputAt(0));
}
-
-TEST(LowerNumberToUint32_to_TruncateFloat64ToInt32) {
+TEST(LowerNumberToUint32_to_TruncateFloat64ToWord32) {
// NumberToUint32(x: kRepFloat64) used as MachineType::Uint32()
TestingGraph t(Type::Number());
Node* p0 = t.ExampleWithOutput(MachineType::Float64());
@@ -1095,26 +1108,20 @@
Node* use = t.Use(trunc, MachineType::Uint32());
t.Return(use);
t.Lower();
- CheckChangeOf(IrOpcode::kTruncateFloat64ToInt32, p0, use->InputAt(0));
+ CheckChangeOf(IrOpcode::kTruncateFloat64ToWord32, p0, use->InputAt(0));
}
-
-TEST(LowerNumberToUint32_to_TruncateFloat64ToInt32_with_change) {
+TEST(LowerNumberToUint32_to_TruncateTaggedToWord32) {
// NumberToInt32(x: kTypeNumber | kRepTagged) used as MachineType::Uint32()
TestingGraph t(Type::Number());
Node* trunc = t.graph()->NewNode(t.simplified()->NumberToUint32(), t.p0);
Node* use = t.Use(trunc, MachineType::Uint32());
t.Return(use);
t.Lower();
- Node* node = use->InputAt(0);
- CHECK_EQ(IrOpcode::kTruncateFloat64ToInt32, node->opcode());
- Node* of = node->InputAt(0);
- CHECK_EQ(IrOpcode::kChangeTaggedToFloat64, of->opcode());
- CHECK_EQ(t.p0, of->InputAt(0));
+ CheckChangeOf(IrOpcode::kTruncateTaggedToWord32, t.p0, use->InputAt(0));
}
-
-TEST(LowerNumberToUint32_to_TruncateFloat64ToInt32_uint32) {
+TEST(LowerNumberToUint32_to_TruncateFloat64ToWord32_uint32) {
// NumberToUint32(x: kRepFloat64) used as kRepWord32
TestingGraph t(Type::Unsigned32());
Node* input = t.ExampleWithOutput(MachineType::Float64());
@@ -1122,7 +1129,7 @@
Node* use = t.Use(trunc, MachineType::RepWord32());
t.Return(use);
t.Lower();
- CheckChangeOf(IrOpcode::kTruncateFloat64ToInt32, input, use->InputAt(0));
+ CheckChangeOf(IrOpcode::kTruncateFloat64ToWord32, input, use->InputAt(0));
}
@@ -1150,7 +1157,7 @@
MachineType::Int32(), Type::Signed32());
CheckChangeInsertion(IrOpcode::kChangeFloat64ToUint32, MachineType::Float64(),
MachineType::Uint32(), Type::Unsigned32());
- CheckChangeInsertion(IrOpcode::kTruncateFloat64ToInt32,
+ CheckChangeInsertion(IrOpcode::kTruncateFloat64ToWord32,
MachineType::Float64(), MachineType::Uint32(),
Type::Integral32());
CheckChangeInsertion(IrOpcode::kChangeTaggedToInt32, MachineType::AnyTagged(),
@@ -1222,7 +1229,7 @@
for (size_t i = 0; i < arraysize(ops); i++) {
CheckChangesAroundBinop(&t, ops[i], IrOpcode::kChangeTaggedToInt32,
- IrOpcode::kChangeBitToBool);
+ IrOpcode::kChangeBitToTagged);
}
}
@@ -1235,7 +1242,7 @@
for (size_t i = 0; i < arraysize(ops); i++) {
CheckChangesAroundBinop(&t, ops[i], IrOpcode::kChangeTaggedToUint32,
- IrOpcode::kChangeBitToBool);
+ IrOpcode::kChangeBitToTagged);
}
}
@@ -1265,7 +1272,7 @@
for (size_t i = 0; i < arraysize(ops); i++) {
CheckChangesAroundBinop(&t, ops[i], IrOpcode::kChangeTaggedToFloat64,
- IrOpcode::kChangeBitToBool);
+ IrOpcode::kChangeBitToTagged);
}
}
@@ -1311,11 +1318,11 @@
TEST(LowerLoadField_to_load) {
- TestingGraph t(Type::Any(), Type::Signed32());
-
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(), kMachineReps[i]};
+ TestingGraph t(Type::Any(), Type::Signed32());
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
+ Handle<Name>::null(), Type::Any(),
+ kMachineReps[i], kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1337,9 +1344,9 @@
TestingGraph t(Type::Any(), Type::Signed32());
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(), kMachineReps[i]};
-
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
+ Handle<Name>::null(), Type::Any(),
+ kMachineReps[i], kNoWriteBarrier};
Node* val = t.ExampleWithOutput(kMachineReps[i]);
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
@@ -1352,7 +1359,7 @@
StoreRepresentation rep = StoreRepresentationOf(store->op());
if (kMachineReps[i].representation() == MachineRepresentation::kTagged) {
- CHECK_EQ(kFullWriteBarrier, rep.write_barrier_kind());
+ CHECK_EQ(kNoWriteBarrier, rep.write_barrier_kind());
}
CHECK_EQ(kMachineReps[i].representation(), rep.representation());
}
@@ -1362,9 +1369,9 @@
Zone* z = scope.main_zone();
TestingGraph t(Type::Any(), Type::Intersect(Type::SignedSmall(),
Type::TaggedSigned(), z));
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::AnyTagged()};
+ FieldAccess access = {
+ kTaggedBase, FixedArrayBase::kHeaderSize, Handle<Name>::null(),
+ Type::Any(), MachineType::AnyTagged(), kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
t.Effect(store);
@@ -1378,11 +1385,10 @@
TEST(LowerLoadElement_to_load) {
- TestingGraph t(Type::Any(), Type::Signed32());
-
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
+ TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), kMachineReps[i]};
+ Type::Any(), kMachineReps[i], kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1401,11 +1407,11 @@
TEST(LowerStoreElement_to_store) {
{
- TestingGraph t(Type::Any(), Type::Signed32());
-
for (size_t i = 0; i < arraysize(kMachineReps); i++) {
+ TestingGraph t(Type::Any(), Type::Signed32());
+
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), kMachineReps[i]};
+ Type::Any(), kMachineReps[i], kNoWriteBarrier};
Node* val = t.ExampleWithOutput(kMachineReps[i]);
Node* store = t.graph()->NewNode(t.simplified()->StoreElement(access),
@@ -1418,7 +1424,7 @@
StoreRepresentation rep = StoreRepresentationOf(store->op());
if (kMachineReps[i].representation() == MachineRepresentation::kTagged) {
- CHECK_EQ(kFullWriteBarrier, rep.write_barrier_kind());
+ CHECK_EQ(kNoWriteBarrier, rep.write_barrier_kind());
}
CHECK_EQ(kMachineReps[i].representation(), rep.representation());
}
@@ -1430,7 +1436,8 @@
Type::Any(), Type::Signed32(),
Type::Intersect(Type::SignedSmall(), Type::TaggedSigned(), z));
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Any(), MachineType::AnyTagged()};
+ Type::Any(), MachineType::AnyTagged(),
+ kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0,
t.p1, t.p2, t.start, t.start);
t.Effect(store);
@@ -1448,7 +1455,7 @@
// Load(obj, Int32Add(Int32Mul(ChangeTaggedToInt32(index), #k), #k))
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1465,7 +1472,7 @@
// Store(obj, Int32Add(Int32Mul(ChangeTaggedToInt32(index), #k), #k), val)
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kFullWriteBarrier};
Node* store =
t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0, t.p1,
@@ -1482,7 +1489,7 @@
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32(), Type::Any());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::Float64()};
+ MachineType::Float64(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadElement(access), t.p0,
t.p1, t.start, t.start);
@@ -1497,9 +1504,9 @@
TEST(InsertChangeForLoadField) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::Float64()};
+ FieldAccess access = {
+ kTaggedBase, FixedArrayBase::kHeaderSize, Handle<Name>::null(),
+ Type::Any(), MachineType::Float64(), kNoWriteBarrier};
Node* load = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
@@ -1515,7 +1522,7 @@
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::Float64()};
+ MachineType::Float64(), kFullWriteBarrier};
Node* store =
t.graph()->NewNode(t.simplified()->StoreElement(access), t.p0,
@@ -1532,9 +1539,9 @@
TEST(InsertChangeForStoreField) {
// TODO(titzer): test all load/store representation change insertions.
TestingGraph t(Type::Any(), Type::Signed32());
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::Float64()};
+ FieldAccess access = {
+ kTaggedBase, FixedArrayBase::kHeaderSize, Handle<Name>::null(),
+ Type::Any(), MachineType::Float64(), kNoWriteBarrier};
Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0,
t.p1, t.start, t.start);
@@ -1554,8 +1561,9 @@
Type* kTypes[] = {Type::Signed32(), Type::Unsigned32(), Type::Number()};
for (size_t i = 0; i < arraysize(kMachineTypes); i++) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), kTypes[i], kMachineTypes[i]};
+ FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
+ Handle<Name>::null(), kTypes[i],
+ kMachineTypes[i], kFullWriteBarrier};
Node* load0 = t.graph()->NewNode(t.simplified()->LoadField(access), t.p0,
t.start, t.start);
diff --git a/test/cctest/expression-type-collector.cc b/test/cctest/expression-type-collector.cc
index c5218b3..f1289a7 100644
--- a/test/cctest/expression-type-collector.cc
+++ b/test/cctest/expression-type-collector.cc
@@ -6,6 +6,7 @@
#include "test/cctest/expression-type-collector.h"
+#include "src/ast/ast-type-bounds.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/codegen.h"
@@ -27,12 +28,10 @@
} // namespace
-
ExpressionTypeCollector::ExpressionTypeCollector(
- Isolate* isolate, FunctionLiteral* root,
+ Isolate* isolate, FunctionLiteral* root, const AstTypeBounds* bounds,
ZoneVector<ExpressionTypeEntry>* dst)
- : AstExpressionVisitor(isolate, root), result_(dst) {}
-
+ : AstExpressionVisitor(isolate, root), bounds_(bounds), result_(dst) {}
void ExpressionTypeCollector::Run() {
result_->clear();
@@ -47,7 +46,7 @@
if (proxy) {
e.name = proxy->raw_name();
}
- e.bounds = expression->bounds();
+ e.bounds = bounds_->get(expression);
AstNode::NodeType type = expression->node_type();
e.kind = "unknown";
for (size_t i = 0; i < arraysize(NodeTypeNameList); ++i) {
diff --git a/test/cctest/expression-type-collector.h b/test/cctest/expression-type-collector.h
index 37bb9a3..a52cfda 100644
--- a/test/cctest/expression-type-collector.h
+++ b/test/cctest/expression-type-collector.h
@@ -10,6 +10,8 @@
namespace v8 {
namespace internal {
+class AstTypeBounds;
+
// A Visitor over an AST that collects a human readable string summarizing
// structure and types. Used for testing of the typing information attached
// to the expression nodes of an AST.
@@ -24,6 +26,7 @@
class ExpressionTypeCollector : public AstExpressionVisitor {
public:
ExpressionTypeCollector(Isolate* isolate, FunctionLiteral* root,
+ const AstTypeBounds* bounds,
ZoneVector<ExpressionTypeEntry>* dst);
void Run();
@@ -31,6 +34,7 @@
void VisitExpression(Expression* expression);
private:
+ const AstTypeBounds* bounds_;
ZoneVector<ExpressionTypeEntry>* result_;
};
} // namespace internal
diff --git a/test/cctest/heap/test-compaction.cc b/test/cctest/heap/test-compaction.cc
index 0feee5f..b787780 100644
--- a/test/cctest/heap/test-compaction.cc
+++ b/test/cctest/heap/test-compaction.cc
@@ -50,6 +50,7 @@
heap->set_force_oom(true);
heap->CollectAllGarbage();
+ heap->mark_compact_collector()->EnsureSweepingCompleted();
// Check that all handles still point to the same page, i.e., compaction
// has been aborted on the page.
@@ -108,6 +109,7 @@
heap->set_force_oom(true);
heap->CollectAllGarbage();
+ heap->mark_compact_collector()->EnsureSweepingCompleted();
bool migration_aborted = false;
for (Handle<FixedArray> object : compaction_page_handles) {
@@ -190,6 +192,7 @@
heap->set_force_oom(true);
heap->CollectAllGarbage();
+ heap->mark_compact_collector()->EnsureSweepingCompleted();
// The following check makes sure that we compacted "some" objects, while
// leaving others in place.
@@ -283,6 +286,7 @@
heap->set_force_oom(true);
heap->CollectAllGarbage();
+ heap->mark_compact_collector()->EnsureSweepingCompleted();
// The following check makes sure that we compacted "some" objects, while
// leaving others in place.
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index 424e987..ef4b217 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -31,6 +31,7 @@
#include "src/compilation-cache.h"
#include "src/context-measure.h"
#include "src/deoptimizer.h"
+#include "src/elements.h"
#include "src/execution.h"
#include "src/factory.h"
#include "src/field-type.h"
@@ -577,7 +578,7 @@
static bool WeakPointerCleared = false;
static void TestWeakGlobalHandleCallback(
- const v8::WeakCallbackData<v8::Value, void>& data) {
+ const v8::WeakCallbackInfo<void>& data) {
std::pair<v8::Persistent<v8::Value>*, int>* p =
reinterpret_cast<std::pair<v8::Persistent<v8::Value>*, int>*>(
data.GetParameter());
@@ -610,9 +611,9 @@
}
std::pair<Handle<Object>*, int> handle_and_id(&h2, 1234);
- GlobalHandles::MakeWeak(h2.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(
+ h2.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
// Scavenge treats weak pointers as normal roots.
heap->CollectGarbage(NEW_SPACE);
@@ -657,9 +658,9 @@
CHECK(!heap->InNewSpace(*h1) && !heap->InNewSpace(*h2));
std::pair<Handle<Object>*, int> handle_and_id(&h2, 1234);
- GlobalHandles::MakeWeak(h2.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(
+ h2.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
CHECK(!GlobalHandles::IsNearDeath(h1.location()));
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
@@ -695,9 +696,9 @@
}
std::pair<Handle<Object>*, int> handle_and_id(&h, 1234);
- GlobalHandles::MakeWeak(h.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(h.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback,
+ v8::WeakCallbackType::kParameter);
// Scanvenge does not recognize weak reference.
heap->CollectGarbage(NEW_SPACE);
@@ -1546,10 +1547,7 @@
Handle<Object> g_value =
Object::GetProperty(isolate->global_object(), g_name).ToHandleChecked();
Handle<JSFunction> g_function = Handle<JSFunction>::cast(g_value);
- // TODO(mvstanton): change to check that g is *not* compiled when optimized
- // cache
- // map lookup moves to the compile lazy builtin.
- CHECK(g_function->is_compiled());
+ CHECK(!g_function->is_compiled());
SimulateIncrementalMarking(heap);
CompileRun("%OptimizeFunctionOnNextCall(f); f();");
@@ -1590,25 +1588,11 @@
CompileRun(raw_source);
}
- // On first compilation, only a hash is inserted in the code cache. We can't
- // find that value.
+ // The script should be in the cache now.
MaybeHandle<SharedFunctionInfo> info = compilation_cache->LookupScript(
source, Handle<Object>(), 0, 0,
v8::ScriptOriginOptions(false, true, false), native_context,
language_mode);
- CHECK(info.is_null());
-
- {
- v8::HandleScope scope(CcTest::isolate());
- CompileRun(raw_source);
- }
-
- // On second compilation, the hash is replaced by a real cache entry mapping
- // the source to the shared function info containing the code.
- info = compilation_cache->LookupScript(
- source, Handle<Object>(), 0, 0,
- v8::ScriptOriginOptions(false, true, false), native_context,
- language_mode);
CHECK(!info.is_null());
// Check that the code cache entry survives at least on GC.
@@ -1640,36 +1624,6 @@
v8::ScriptOriginOptions(false, true, false), native_context,
language_mode);
CHECK(info.is_null());
-
- {
- v8::HandleScope scope(CcTest::isolate());
- CompileRun(raw_source);
- }
-
- // On first compilation, only a hash is inserted in the code cache. We can't
- // find that value.
- info = compilation_cache->LookupScript(
- source, Handle<Object>(), 0, 0,
- v8::ScriptOriginOptions(false, true, false), native_context,
- language_mode);
- CHECK(info.is_null());
-
- for (int i = 0; i < CompilationCacheTable::kHashGenerations; i++) {
- compilation_cache->MarkCompactPrologue();
- }
-
- {
- v8::HandleScope scope(CcTest::isolate());
- CompileRun(raw_source);
- }
-
- // If we aged the cache before caching the script, ensure that we didn't cache
- // on next compilation.
- info = compilation_cache->LookupScript(
- source, Handle<Object>(), 0, 0,
- v8::ScriptOriginOptions(false, true, false), native_context,
- language_mode);
- CHECK(info.is_null());
}
@@ -1692,7 +1646,7 @@
Object* object = CcTest::heap()->native_contexts_list();
while (!object->IsUndefined()) {
count++;
- object = Context::cast(object)->get(Context::NEXT_CONTEXT_LINK);
+ object = Context::cast(object)->next_context_link();
}
return count;
}
@@ -1830,8 +1784,7 @@
count++;
if (count == n) heap->CollectAllGarbage();
object =
- Handle<Object>(Context::cast(*object)->get(Context::NEXT_CONTEXT_LINK),
- isolate);
+ Handle<Object>(Context::cast(*object)->next_context_link(), isolate);
}
return count;
}
@@ -2296,16 +2249,20 @@
// on the heap.
if (size_of_objects_1 > size_of_objects_2) {
intptr_t delta = size_of_objects_1 - size_of_objects_2;
- PrintF("Heap::SizeOfObjects: %" V8_PTR_PREFIX "d, "
- "Iterator: %" V8_PTR_PREFIX "d, "
- "delta: %" V8_PTR_PREFIX "d\n",
+ PrintF("Heap::SizeOfObjects: %" V8PRIdPTR
+ ", "
+ "Iterator: %" V8PRIdPTR
+ ", "
+ "delta: %" V8PRIdPTR "\n",
size_of_objects_1, size_of_objects_2, delta);
CHECK_GT(size_of_objects_1 / 20, delta);
} else {
intptr_t delta = size_of_objects_2 - size_of_objects_1;
- PrintF("Heap::SizeOfObjects: %" V8_PTR_PREFIX "d, "
- "Iterator: %" V8_PTR_PREFIX "d, "
- "delta: %" V8_PTR_PREFIX "d\n",
+ PrintF("Heap::SizeOfObjects: %" V8PRIdPTR
+ ", "
+ "Iterator: %" V8PRIdPTR
+ ", "
+ "delta: %" V8PRIdPTR "\n",
size_of_objects_1, size_of_objects_2, delta);
CHECK_GT(size_of_objects_2 / 20, delta);
}
@@ -2657,6 +2614,14 @@
CcTest::heap()->CollectGarbage(OLD_SPACE);
}
+namespace {
+
+int GetProfilerTicks(SharedFunctionInfo* shared) {
+ return FLAG_ignition ? shared->profiler_ticks()
+ : shared->code()->profiler_ticks();
+}
+
+} // namespace
TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
i::FLAG_stress_compaction = false;
@@ -2687,16 +2652,18 @@
CcTest::global()->Get(ctx, v8_str("f")).ToLocalChecked())));
CHECK(f->IsOptimized());
- IncrementalMarking* marking = CcTest::heap()->incremental_marking();
- marking->Stop();
+ // Make sure incremental marking it not running.
+ CcTest::heap()->incremental_marking()->Stop();
+
CcTest::heap()->StartIncrementalMarking();
// The following calls will increment CcTest::heap()->global_ic_age().
CcTest::isolate()->ContextDisposedNotification();
SimulateIncrementalMarking(CcTest::heap());
CcTest::heap()->CollectAllGarbage();
+
CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
CHECK_EQ(0, f->shared()->opt_count());
- CHECK_EQ(0, f->shared()->code()->profiler_ticks());
+ CHECK_EQ(0, GetProfilerTicks(f->shared()));
}
@@ -2727,9 +2694,9 @@
i::Handle<JSFunction> f = i::Handle<JSFunction>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
CcTest::global()->Get(ctx, v8_str("f")).ToLocalChecked())));
-
CHECK(f->IsOptimized());
+ // Make sure incremental marking it not running.
CcTest::heap()->incremental_marking()->Stop();
// The following two calls will increment CcTest::heap()->global_ic_age().
@@ -2738,7 +2705,7 @@
CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
CHECK_EQ(0, f->shared()->opt_count());
- CHECK_EQ(0, f->shared()->code()->profiler_ticks());
+ CHECK_EQ(0, GetProfilerTicks(f->shared()));
}
@@ -3557,6 +3524,8 @@
// Concurrent sweeping adds non determinism, depending on when memory is
// available for further reuse.
i::FLAG_concurrent_sweeping = false;
+ // Fast evacuation of pages may result in a different page count in old space.
+ i::FLAG_page_promotion = false;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
@@ -5547,19 +5516,21 @@
isolate->Enter();
{
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ Heap* heap = i_isolate->heap();
HandleScope handle_scope(i_isolate);
- PagedSpace* old_space = i_isolate->heap()->old_space();
+ PagedSpace* old_space = heap->old_space();
const int kMaxObjects = 10000;
const int kFixedArrayLen = 512;
Handle<FixedArray> objects[kMaxObjects];
- for (int i = 0; (i < kMaxObjects) && old_space->CanExpand(Page::kPageSize);
+ for (int i = 0; (i < kMaxObjects) &&
+ heap->CanExpandOldGeneration(old_space->AreaSize());
i++) {
objects[i] = i_isolate->factory()->NewFixedArray(kFixedArrayLen, TENURED);
Page::FromAddress(objects[i]->address())
->SetFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
}
SimulateFullSpace(old_space);
- i_isolate->heap()->CollectGarbage(OLD_SPACE);
+ heap->CollectGarbage(OLD_SPACE);
// If we get this far, we've successfully aborted compaction. Any further
// allocations might trigger OOM.
}
@@ -6304,6 +6275,28 @@
"check(g1, g2);");
}
+TEST(RemoveCodeFromSharedFunctionInfoButNotFromClosure) {
+ CcTest::InitializeVM();
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
+ v8::Local<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate);
+ global->Set(isolate, "check", v8::FunctionTemplate::New(
+ isolate, CheckEqualSharedFunctionInfos));
+ global->Set(isolate, "remove",
+ v8::FunctionTemplate::New(isolate, RemoveCodeAndGC));
+ v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+ v8::Context::Scope cscope(context);
+ CompileRun(
+ "function f() { return function g() {}; }"
+ "var g1 = f();"
+ "var g2 = f();"
+ "check(g1, g2);"
+ "g1();"
+ "g2();"
+ "remove(g1);"
+ "g2();"
+ "check(g1, g2);");
+}
TEST(OldGenerationAllocationThroughput) {
CcTest::InitializeVM();
@@ -6604,6 +6597,151 @@
heap->CollectGarbage(OLD_SPACE);
}
+UNINITIALIZED_TEST(PagePromotion) {
+ FLAG_page_promotion = true;
+ FLAG_page_promotion_threshold = 0; // %
+ i::FLAG_min_semi_space_size = 8 * (Page::kPageSize / MB);
+ // We cannot optimize for size as we require a new space with more than one
+ // page.
+ i::FLAG_optimize_for_size = false;
+ // Set max_semi_space_size because it could've been initialized by an
+ // implication of optimize_for_size.
+ i::FLAG_max_semi_space_size = i::FLAG_min_semi_space_size;
+ v8::Isolate::CreateParams create_params;
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ {
+ v8::Isolate::Scope isolate_scope(isolate);
+ v8::HandleScope handle_scope(isolate);
+ v8::Context::New(isolate)->Enter();
+ Heap* heap = i_isolate->heap();
+ std::vector<Handle<FixedArray>> handles;
+ SimulateFullSpace(heap->new_space(), &handles);
+ heap->CollectGarbage(NEW_SPACE);
+ CHECK_GT(handles.size(), 0u);
+ // First object in handle should be on the first page.
+ Handle<FixedArray> first_object = handles.front();
+ Page* first_page = Page::FromAddress(first_object->address());
+ // The age mark should not be on the first page.
+ CHECK(!first_page->ContainsLimit(heap->new_space()->age_mark()));
+ // To perform a sanity check on live bytes we need to mark the heap.
+ SimulateIncrementalMarking(heap, true);
+ // Sanity check that the page meets the requirements for promotion.
+ const int threshold_bytes =
+ FLAG_page_promotion_threshold * Page::kAllocatableMemory / 100;
+ CHECK_GE(first_page->LiveBytes(), threshold_bytes);
+
+ // Actual checks: The page is in new space first, but is moved to old space
+ // during a full GC.
+ CHECK(heap->new_space()->ContainsSlow(first_page->address()));
+ CHECK(!heap->old_space()->ContainsSlow(first_page->address()));
+ heap->CollectGarbage(OLD_SPACE);
+ CHECK(!heap->new_space()->ContainsSlow(first_page->address()));
+ CHECK(heap->old_space()->ContainsSlow(first_page->address()));
+ }
+}
+
+TEST(Regress598319) {
+ // This test ensures that no white objects can cross the progress bar of large
+ // objects during incremental marking. It checks this by using Shift() during
+ // incremental marking.
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Heap* heap = CcTest::heap();
+ Isolate* isolate = heap->isolate();
+
+ const int kNumberOfObjects = Page::kMaxRegularHeapObjectSize / kPointerSize;
+
+ struct Arr {
+ Arr(Isolate* isolate, int number_of_objects) {
+ root = isolate->factory()->NewFixedArray(1, TENURED);
+ {
+ // Temporary scope to avoid getting any other objects into the root set.
+ v8::HandleScope scope(CcTest::isolate());
+ Handle<FixedArray> tmp =
+ isolate->factory()->NewFixedArray(number_of_objects);
+ root->set(0, *tmp);
+ for (int i = 0; i < get()->length(); i++) {
+ tmp = isolate->factory()->NewFixedArray(100, TENURED);
+ get()->set(i, *tmp);
+ }
+ }
+ }
+
+ FixedArray* get() { return FixedArray::cast(root->get(0)); }
+
+ Handle<FixedArray> root;
+ } arr(isolate, kNumberOfObjects);
+
+ CHECK_EQ(arr.get()->length(), kNumberOfObjects);
+ CHECK(heap->lo_space()->Contains(arr.get()));
+ LargePage* page = heap->lo_space()->FindPage(arr.get()->address());
+ CHECK_NOT_NULL(page);
+
+ // GC to cleanup state
+ heap->CollectGarbage(OLD_SPACE);
+ MarkCompactCollector* collector = heap->mark_compact_collector();
+ if (collector->sweeping_in_progress()) {
+ collector->EnsureSweepingCompleted();
+ }
+
+ CHECK(heap->lo_space()->Contains(arr.get()));
+ CHECK(Marking::IsWhite(Marking::MarkBitFrom(arr.get())));
+ for (int i = 0; i < arr.get()->length(); i++) {
+ CHECK(Marking::IsWhite(
+ Marking::MarkBitFrom(HeapObject::cast(arr.get()->get(i)))));
+ }
+
+ // Start incremental marking.
+ IncrementalMarking* marking = heap->incremental_marking();
+ CHECK(marking->IsMarking() || marking->IsStopped());
+ if (marking->IsStopped()) {
+ heap->StartIncrementalMarking();
+ }
+ CHECK(marking->IsMarking());
+
+ // Check that we have not marked the interesting array during root scanning.
+ for (int i = 0; i < arr.get()->length(); i++) {
+ CHECK(Marking::IsWhite(
+ Marking::MarkBitFrom(HeapObject::cast(arr.get()->get(i)))));
+ }
+
+ // Now we search for a state where we are in incremental marking and have
+ // only partially marked the large object.
+ while (!marking->IsComplete()) {
+ marking->Step(i::KB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
+ if (page->IsFlagSet(Page::HAS_PROGRESS_BAR) && page->progress_bar() > 0) {
+ CHECK_NE(page->progress_bar(), arr.get()->Size());
+ {
+ // Shift by 1, effectively moving one white object across the progress
+ // bar, meaning that we will miss marking it.
+ v8::HandleScope scope(CcTest::isolate());
+ Handle<JSArray> js_array = isolate->factory()->NewJSArrayWithElements(
+ Handle<FixedArray>(arr.get()));
+ js_array->GetElementsAccessor()->Shift(js_array);
+ }
+ break;
+ }
+ }
+
+ // Finish marking with bigger steps to speed up test.
+ while (!marking->IsComplete()) {
+ marking->Step(10 * i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
+ if (marking->IsReadyToOverApproximateWeakClosure()) {
+ marking->FinalizeIncrementally();
+ }
+ }
+ CHECK(marking->IsComplete());
+
+ // All objects need to be black after marking. If a white object crossed the
+ // progress bar, we would fail here.
+ for (int i = 0; i < arr.get()->length(); i++) {
+ CHECK(Marking::IsBlack(
+ Marking::MarkBitFrom(HeapObject::cast(arr.get()->get(i)))));
+ }
+}
+
TEST(Regress609761) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
diff --git a/test/cctest/heap/test-mark-compact.cc b/test/cctest/heap/test-mark-compact.cc
index cfcf149..2115f1c 100644
--- a/test/cctest/heap/test-mark-compact.cc
+++ b/test/cctest/heap/test-mark-compact.cc
@@ -236,8 +236,7 @@
static int NumberOfWeakCalls = 0;
-static void WeakPointerCallback(
- const v8::WeakCallbackData<v8::Value, void>& data) {
+static void WeakPointerCallback(const v8::WeakCallbackInfo<void>& data) {
std::pair<v8::Persistent<v8::Value>*, int>* p =
reinterpret_cast<std::pair<v8::Persistent<v8::Value>*, int>*>(
data.GetParameter());
@@ -262,17 +261,17 @@
Handle<Object> g1c1 =
global_handles->Create(heap->AllocateFixedArray(1).ToObjectChecked());
std::pair<Handle<Object>*, int> g1s1_and_id(&g1s1, 1234);
- GlobalHandles::MakeWeak(g1s1.location(),
- reinterpret_cast<void*>(&g1s1_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g1s1.location(), reinterpret_cast<void*>(&g1s1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
std::pair<Handle<Object>*, int> g1s2_and_id(&g1s2, 1234);
- GlobalHandles::MakeWeak(g1s2.location(),
- reinterpret_cast<void*>(&g1s2_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g1s2.location(), reinterpret_cast<void*>(&g1s2_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
std::pair<Handle<Object>*, int> g1c1_and_id(&g1c1, 1234);
- GlobalHandles::MakeWeak(g1c1.location(),
- reinterpret_cast<void*>(&g1c1_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g1c1.location(), reinterpret_cast<void*>(&g1c1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
Handle<Object> g2s1 =
global_handles->Create(heap->AllocateFixedArray(1).ToObjectChecked());
@@ -281,17 +280,17 @@
Handle<Object> g2c1 =
global_handles->Create(heap->AllocateFixedArray(1).ToObjectChecked());
std::pair<Handle<Object>*, int> g2s1_and_id(&g2s1, 1234);
- GlobalHandles::MakeWeak(g2s1.location(),
- reinterpret_cast<void*>(&g2s1_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g2s1.location(), reinterpret_cast<void*>(&g2s1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
std::pair<Handle<Object>*, int> g2s2_and_id(&g2s2, 1234);
- GlobalHandles::MakeWeak(g2s2.location(),
- reinterpret_cast<void*>(&g2s2_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g2s2.location(), reinterpret_cast<void*>(&g2s2_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
std::pair<Handle<Object>*, int> g2c1_and_id(&g2c1, 1234);
- GlobalHandles::MakeWeak(g2c1.location(),
- reinterpret_cast<void*>(&g2c1_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g2c1.location(), reinterpret_cast<void*>(&g2c1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
Handle<Object> root = global_handles->Create(*g1s1); // make a root.
@@ -317,9 +316,9 @@
// Weaken the root.
std::pair<Handle<Object>*, int> root_and_id(&root, 1234);
- GlobalHandles::MakeWeak(root.location(),
- reinterpret_cast<void*>(&root_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ root.location(), reinterpret_cast<void*>(&root_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
// But make children strong roots---all the objects (except for children)
// should be collectable now.
global_handles->ClearWeakness(g1c1.location());
@@ -343,12 +342,12 @@
CHECK_EQ(5, NumberOfWeakCalls);
// And now make children weak again and collect them.
- GlobalHandles::MakeWeak(g1c1.location(),
- reinterpret_cast<void*>(&g1c1_and_id),
- &WeakPointerCallback);
- GlobalHandles::MakeWeak(g2c1.location(),
- reinterpret_cast<void*>(&g2c1_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ g1c1.location(), reinterpret_cast<void*>(&g1c1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
+ GlobalHandles::MakeWeak(
+ g2c1.location(), reinterpret_cast<void*>(&g2c1_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
heap->CollectGarbage(OLD_SPACE);
CHECK_EQ(7, NumberOfWeakCalls);
diff --git a/test/cctest/heap/test-spaces.cc b/test/cctest/heap/test-spaces.cc
index a7cf161..da364c5 100644
--- a/test/cctest/heap/test-spaces.cc
+++ b/test/cctest/heap/test-spaces.cc
@@ -107,13 +107,12 @@
class TestMemoryAllocatorScope {
public:
TestMemoryAllocatorScope(Isolate* isolate, MemoryAllocator* allocator)
- : isolate_(isolate),
- old_allocator_(isolate->memory_allocator_) {
- isolate->memory_allocator_ = allocator;
+ : isolate_(isolate), old_allocator_(isolate->heap()->memory_allocator()) {
+ isolate->heap()->memory_allocator_ = allocator;
}
~TestMemoryAllocatorScope() {
- isolate_->memory_allocator_ = old_allocator_;
+ isolate_->heap()->memory_allocator_ = old_allocator_;
}
private:
@@ -129,12 +128,12 @@
public:
TestCodeRangeScope(Isolate* isolate, CodeRange* code_range)
: isolate_(isolate),
- old_code_range_(isolate->code_range_) {
- isolate->code_range_ = code_range;
+ old_code_range_(isolate->heap()->memory_allocator()->code_range()) {
+ isolate->heap()->memory_allocator()->code_range_ = code_range;
}
~TestCodeRangeScope() {
- isolate_->code_range_ = old_code_range_;
+ isolate_->heap()->memory_allocator()->code_range_ = old_code_range_;
}
private:
@@ -153,50 +152,49 @@
size_t second_commit_area_size,
Executability executable) {
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(),
- heap->MaxExecutableSize()));
- TestMemoryAllocatorScope test_allocator_scope(isolate, memory_allocator);
- TestCodeRangeScope test_code_range_scope(isolate, code_range);
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
+ {
+ TestMemoryAllocatorScope test_allocator_scope(isolate, memory_allocator);
+ TestCodeRangeScope test_code_range_scope(isolate, code_range);
- size_t header_size = (executable == EXECUTABLE)
- ? MemoryAllocator::CodePageGuardStartOffset()
- : MemoryChunk::kObjectStartOffset;
- size_t guard_size = (executable == EXECUTABLE)
- ? MemoryAllocator::CodePageGuardSize()
- : 0;
+ size_t header_size = (executable == EXECUTABLE)
+ ? MemoryAllocator::CodePageGuardStartOffset()
+ : MemoryChunk::kObjectStartOffset;
+ size_t guard_size =
+ (executable == EXECUTABLE) ? MemoryAllocator::CodePageGuardSize() : 0;
- MemoryChunk* memory_chunk = memory_allocator->AllocateChunk(reserve_area_size,
- commit_area_size,
- executable,
- NULL);
- size_t alignment = code_range != NULL && code_range->valid()
- ? MemoryChunk::kAlignment
- : base::OS::CommitPageSize();
- size_t reserved_size =
- ((executable == EXECUTABLE))
- ? RoundUp(header_size + guard_size + reserve_area_size + guard_size,
- alignment)
- : RoundUp(header_size + reserve_area_size,
- base::OS::CommitPageSize());
- CHECK(memory_chunk->size() == reserved_size);
- CHECK(memory_chunk->area_start() < memory_chunk->address() +
- memory_chunk->size());
- CHECK(memory_chunk->area_end() <= memory_chunk->address() +
- memory_chunk->size());
- CHECK(static_cast<size_t>(memory_chunk->area_size()) == commit_area_size);
+ MemoryChunk* memory_chunk = memory_allocator->AllocateChunk(
+ reserve_area_size, commit_area_size, executable, NULL);
+ size_t alignment = code_range != NULL && code_range->valid()
+ ? MemoryChunk::kAlignment
+ : base::OS::CommitPageSize();
+ size_t reserved_size =
+ ((executable == EXECUTABLE))
+ ? RoundUp(header_size + guard_size + reserve_area_size + guard_size,
+ alignment)
+ : RoundUp(header_size + reserve_area_size,
+ base::OS::CommitPageSize());
+ CHECK(memory_chunk->size() == reserved_size);
+ CHECK(memory_chunk->area_start() <
+ memory_chunk->address() + memory_chunk->size());
+ CHECK(memory_chunk->area_end() <=
+ memory_chunk->address() + memory_chunk->size());
+ CHECK(static_cast<size_t>(memory_chunk->area_size()) == commit_area_size);
- Address area_start = memory_chunk->area_start();
+ Address area_start = memory_chunk->area_start();
- memory_chunk->CommitArea(second_commit_area_size);
- CHECK(area_start == memory_chunk->area_start());
- CHECK(memory_chunk->area_start() < memory_chunk->address() +
- memory_chunk->size());
- CHECK(memory_chunk->area_end() <= memory_chunk->address() +
- memory_chunk->size());
- CHECK(static_cast<size_t>(memory_chunk->area_size()) ==
- second_commit_area_size);
+ memory_chunk->CommitArea(second_commit_area_size);
+ CHECK(area_start == memory_chunk->area_start());
+ CHECK(memory_chunk->area_start() <
+ memory_chunk->address() + memory_chunk->size());
+ CHECK(memory_chunk->area_end() <=
+ memory_chunk->address() + memory_chunk->size());
+ CHECK(static_cast<size_t>(memory_chunk->area_size()) ==
+ second_commit_area_size);
- memory_allocator->Free(memory_chunk);
+ memory_allocator->Free<MemoryAllocator::kFull>(memory_chunk);
+ }
memory_allocator->TearDown();
delete memory_allocator;
}
@@ -207,8 +205,8 @@
Heap* heap = isolate->heap();
const int pageSize = Page::kPageSize;
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(
- memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize()));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
TestMemoryAllocatorScope test_allocator_scope(isolate, memory_allocator);
CodeRange* code_range = new CodeRange(isolate);
const size_t code_range_size = 4 * pageSize;
@@ -310,19 +308,19 @@
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
CHECK(memory_allocator != nullptr);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(),
- heap->MaxExecutableSize()));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
{
int total_pages = 0;
OldSpace faked_space(heap, OLD_SPACE, NOT_EXECUTABLE);
- Page* first_page = memory_allocator->AllocatePage<Page>(
+ Page* first_page = memory_allocator->AllocatePage(
faked_space.AreaSize(), static_cast<PagedSpace*>(&faked_space),
NOT_EXECUTABLE);
first_page->InsertAfter(faked_space.anchor()->prev_page());
- CHECK(first_page->is_valid());
+ CHECK(Page::IsValid(first_page));
CHECK(first_page->next_page() == faked_space.anchor());
total_pages++;
@@ -331,10 +329,10 @@
}
// Again, we should get n or n - 1 pages.
- Page* other = memory_allocator->AllocatePage<Page>(
+ Page* other = memory_allocator->AllocatePage(
faked_space.AreaSize(), static_cast<PagedSpace*>(&faked_space),
NOT_EXECUTABLE);
- CHECK(other->is_valid());
+ CHECK(Page::IsValid(other));
total_pages++;
other->InsertAfter(first_page);
int page_count = 0;
@@ -345,7 +343,7 @@
CHECK(total_pages == page_count);
Page* second_page = first_page->next_page();
- CHECK(second_page->is_valid());
+ CHECK(Page::IsValid(second_page));
// OldSpace's destructor will tear down the space and free up all pages.
}
@@ -358,8 +356,8 @@
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(),
- heap->MaxExecutableSize()));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
NewSpace new_space(heap);
@@ -385,8 +383,8 @@
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(),
- heap->MaxExecutableSize()));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
OldSpace* s = new OldSpace(heap, OLD_SPACE, NOT_EXECUTABLE);
@@ -409,8 +407,8 @@
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
CHECK(memory_allocator != nullptr);
- CHECK(
- memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize()));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
+ 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
CompactionSpace* compaction_space =
diff --git a/test/cctest/heap/utils-inl.h b/test/cctest/heap/utils-inl.h
index 56033c1..0e943b4 100644
--- a/test/cctest/heap/utils-inl.h
+++ b/test/cctest/heap/utils-inl.h
@@ -63,37 +63,48 @@
// Helper function that simulates a full new-space in the heap.
-static inline bool FillUpOnePage(v8::internal::NewSpace* space) {
+static inline bool FillUpOnePage(
+ v8::internal::NewSpace* space,
+ std::vector<Handle<FixedArray>>* out_handles = nullptr) {
space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
if (space_remaining == 0) return false;
- CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
+ std::vector<Handle<FixedArray>> handles =
+ CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
+ if (out_handles != nullptr)
+ out_handles->insert(out_handles->end(), handles.begin(), handles.end());
return true;
}
// Helper function that simulates a fill new-space in the heap.
-static inline void AllocateAllButNBytes(v8::internal::NewSpace* space,
- int extra_bytes) {
+static inline void AllocateAllButNBytes(
+ v8::internal::NewSpace* space, int extra_bytes,
+ std::vector<Handle<FixedArray>>* out_handles = nullptr) {
space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
CHECK(space_remaining >= extra_bytes);
int new_linear_size = space_remaining - extra_bytes;
if (new_linear_size == 0) return;
- CreatePadding(space->heap(), new_linear_size, i::NOT_TENURED);
+ std::vector<Handle<FixedArray>> handles =
+ CreatePadding(space->heap(), new_linear_size, i::NOT_TENURED);
+ if (out_handles != nullptr)
+ out_handles->insert(out_handles->end(), handles.begin(), handles.end());
}
-
-static inline void FillCurrentPage(v8::internal::NewSpace* space) {
- AllocateAllButNBytes(space, 0);
+static inline void FillCurrentPage(
+ v8::internal::NewSpace* space,
+ std::vector<Handle<FixedArray>>* out_handles = nullptr) {
+ AllocateAllButNBytes(space, 0, out_handles);
}
-
-static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
- FillCurrentPage(space);
- while (FillUpOnePage(space)) {
+static inline void SimulateFullSpace(
+ v8::internal::NewSpace* space,
+ std::vector<Handle<FixedArray>>* out_handles = nullptr) {
+ FillCurrentPage(space, out_handles);
+ while (FillUpOnePage(space, out_handles) || space->AddFreshPage()) {
}
}
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.cc b/test/cctest/interpreter/bytecode-expectations-printer.cc
index bf43b95..b0f6236 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc
@@ -4,6 +4,7 @@
#include "test/cctest/interpreter/bytecode-expectations-printer.h"
+#include <iomanip>
#include <iostream>
#include <vector>
@@ -19,6 +20,7 @@
#include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/bytecodes.h"
#include "src/interpreter/interpreter.h"
+#include "src/interpreter/source-position-table.h"
namespace v8 {
namespace internal {
@@ -27,6 +29,7 @@
// static
const char* const BytecodeExpectationsPrinter::kDefaultTopFunctionName =
"__genbckexp_wrapper__";
+const char* const BytecodeExpectationsPrinter::kIndent = " ";
v8::Local<v8::String> BytecodeExpectationsPrinter::V8StringFromUTF8(
const char* data) const {
@@ -102,11 +105,11 @@
} // namespace
void BytecodeExpectationsPrinter::PrintBytecodeOperand(
- std::ostream& stream, const BytecodeArrayIterator& bytecode_iter,
+ std::ostream& stream, const BytecodeArrayIterator& bytecode_iterator,
const Bytecode& bytecode, int op_index, int parameter_count) const {
OperandType op_type = Bytecodes::GetOperandType(bytecode, op_index);
OperandSize op_size = Bytecodes::GetOperandSize(
- bytecode, op_index, bytecode_iter.current_operand_scale());
+ bytecode, op_index, bytecode_iterator.current_operand_scale());
const char* size_tag;
switch (op_size) {
@@ -125,7 +128,7 @@
}
if (Bytecodes::IsRegisterOperandType(op_type)) {
- Register register_value = bytecode_iter.GetRegisterOperand(op_index);
+ Register register_value = bytecode_iterator.GetRegisterOperand(op_index);
stream << 'R';
if (op_size != OperandSize::kByte) stream << size_tag;
if (register_value.is_new_target()) {
@@ -149,19 +152,19 @@
switch (op_type) {
case OperandType::kFlag8:
- stream << bytecode_iter.GetFlagOperand(op_index);
+ stream << bytecode_iterator.GetFlagOperand(op_index);
break;
case OperandType::kIdx:
- stream << bytecode_iter.GetIndexOperand(op_index);
+ stream << bytecode_iterator.GetIndexOperand(op_index);
break;
case OperandType::kImm:
- stream << bytecode_iter.GetImmediateOperand(op_index);
+ stream << bytecode_iterator.GetImmediateOperand(op_index);
break;
case OperandType::kRegCount:
- stream << bytecode_iter.GetRegisterCountOperand(op_index);
+ stream << bytecode_iterator.GetRegisterCountOperand(op_index);
break;
case OperandType::kRuntimeId: {
- uint32_t operand = bytecode_iter.GetRuntimeIdOperand(op_index);
+ uint32_t operand = bytecode_iterator.GetRuntimeIdOperand(op_index);
stream << "Runtime::k"
<< i::Runtime::FunctionForId(IndexToFunctionId(operand))->name;
break;
@@ -175,10 +178,10 @@
}
void BytecodeExpectationsPrinter::PrintBytecode(
- std::ostream& stream, const BytecodeArrayIterator& bytecode_iter,
+ std::ostream& stream, const BytecodeArrayIterator& bytecode_iterator,
int parameter_count) const {
- Bytecode bytecode = bytecode_iter.current_bytecode();
- OperandScale operand_scale = bytecode_iter.current_operand_scale();
+ Bytecode bytecode = bytecode_iterator.current_bytecode();
+ OperandScale operand_scale = bytecode_iterator.current_operand_scale();
if (Bytecodes::OperandScaleRequiresPrefixBytecode(operand_scale)) {
Bytecode prefix = Bytecodes::OperandScaleToPrefixBytecode(operand_scale);
stream << "B(" << Bytecodes::ToString(prefix) << "), ";
@@ -187,11 +190,30 @@
int operands_count = Bytecodes::NumberOfOperands(bytecode);
for (int op_index = 0; op_index < operands_count; ++op_index) {
stream << ", ";
- PrintBytecodeOperand(stream, bytecode_iter, bytecode, op_index,
+ PrintBytecodeOperand(stream, bytecode_iterator, bytecode, op_index,
parameter_count);
}
}
+void BytecodeExpectationsPrinter::PrintSourcePosition(
+ std::ostream& stream, SourcePositionTableIterator& source_iterator,
+ int bytecode_offset) const {
+ static const size_t kPositionWidth = 4;
+ if (!source_iterator.done() &&
+ source_iterator.bytecode_offset() == bytecode_offset) {
+ stream << "/* " << std::setw(kPositionWidth)
+ << source_iterator.source_position();
+ if (source_iterator.is_statement()) {
+ stream << " S> */ ";
+ } else {
+ stream << " E> */ ";
+ }
+ source_iterator.Advance();
+ } else {
+ stream << " " << std::setw(kPositionWidth) << ' ' << " ";
+ }
+}
+
void BytecodeExpectationsPrinter::PrintV8String(std::ostream& stream,
i::String* string) const {
stream << '"';
@@ -246,10 +268,15 @@
std::ostream& stream, i::Handle<i::BytecodeArray> bytecode_array) const {
stream << "bytecode array length: " << bytecode_array->length()
<< "\nbytecodes: [\n";
- BytecodeArrayIterator bytecode_iter(bytecode_array);
- for (; !bytecode_iter.done(); bytecode_iter.Advance()) {
- stream << " ";
- PrintBytecode(stream, bytecode_iter, bytecode_array->parameter_count());
+
+ SourcePositionTableIterator source_iterator(
+ bytecode_array->source_position_table());
+ BytecodeArrayIterator bytecode_iterator(bytecode_array);
+ for (; !bytecode_iterator.done(); bytecode_iterator.Advance()) {
+ stream << kIndent;
+ PrintSourcePosition(stream, source_iterator,
+ bytecode_iterator.current_offset());
+ PrintBytecode(stream, bytecode_iterator, bytecode_array->parameter_count());
stream << ",\n";
}
stream << "]\n";
@@ -261,7 +288,7 @@
int num_constants = constant_pool->length();
if (num_constants > 0) {
for (int i = 0; i < num_constants; ++i) {
- stream << " ";
+ stream << kIndent;
PrintConstant(stream, i::FixedArray::get(constant_pool, i, i_isolate()));
stream << ",\n";
}
@@ -275,7 +302,7 @@
std::stringstream body_stream(body);
std::string body_line;
while (std::getline(body_stream, body_line)) {
- stream << " ";
+ stream << kIndent;
PrintEscapedString(stream, body_line);
stream << '\n';
}
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.h b/test/cctest/interpreter/bytecode-expectations-printer.h
index 0fcead5..32b8ff4 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.h
+++ b/test/cctest/interpreter/bytecode-expectations-printer.h
@@ -20,6 +20,7 @@
namespace interpreter {
class BytecodeArrayIterator;
+class SourcePositionTableIterator;
class BytecodeExpectationsPrinter final {
public:
@@ -65,12 +66,15 @@
void PrintEscapedString(std::ostream& stream, // NOLINT
const std::string& string) const;
void PrintBytecodeOperand(std::ostream& stream, // NOLINT
- const BytecodeArrayIterator& bytecode_iter,
+ const BytecodeArrayIterator& bytecode_iterator,
const Bytecode& bytecode, int op_index,
int parameter_count) const;
void PrintBytecode(std::ostream& stream, // NOLINT
- const BytecodeArrayIterator& bytecode_iter,
+ const BytecodeArrayIterator& bytecode_iterator,
int parameter_count) const;
+ void PrintSourcePosition(std::ostream& stream, // NOLINT
+ SourcePositionTableIterator& source_iterator,
+ int bytecode_offset) const;
void PrintV8String(std::ostream& stream, // NOLINT
i::String* string) const;
void PrintConstant(std::ostream& stream, // NOLINT
@@ -111,6 +115,7 @@
std::string test_function_name_;
static const char* const kDefaultTopFunctionName;
+ static const char* const kIndent;
};
} // namespace interpreter
diff --git a/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden b/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
index 4c9753f..5dcb46b 100644
--- a/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ /* 51 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -33,24 +33,24 @@
parameter count: 1
bytecode array length: 39
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(2),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(0),
- B(KeyedStoreICSloppy), R(2), R(1), U8(1),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Add), R(3),
- B(KeyedStoreICSloppy), R(2), R(1), U8(1),
- B(Ldar), R(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ /* 54 E> */ B(Ldar), R(0),
+ B(KeyedStoreICSloppy), R(2), R(1), U8(1),
+ B(LdaSmi), U8(1),
+ B(Star), R(1),
+ /* 57 E> */ B(Ldar), R(0),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Add), R(3),
+ B(KeyedStoreICSloppy), R(2), R(1), U8(1),
+ B(Ldar), R(2),
+ /* 66 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -66,9 +66,9 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(CreateArrayLiteral), U8(0), U8(2), U8(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(2),
+ /* 62 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -84,36 +84,36 @@
parameter count: 1
bytecode array length: 69
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(0), U8(2), U8(2),
- B(Star), R(2),
- B(LdaZero),
- B(Star), R(1),
- B(CreateArrayLiteral), U8(1), U8(0), U8(3),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(3),
- B(Ldar), R(0),
- B(KeyedStoreICSloppy), R(4), R(3), U8(1),
- B(Ldar), R(4),
- B(KeyedStoreICSloppy), R(2), R(1), U8(5),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(CreateArrayLiteral), U8(2), U8(1), U8(3),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(3),
- B(Ldar), R(0),
- B(Star), R(5),
- B(LdaSmi), U8(2),
- B(Add), R(5),
- B(KeyedStoreICSloppy), R(4), R(3), U8(3),
- B(Ldar), R(4),
- B(KeyedStoreICSloppy), R(2), R(1), U8(5),
- B(Ldar), R(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(2),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(CreateArrayLiteral), U8(1), U8(0), U8(3),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ /* 56 E> */ B(Ldar), R(0),
+ B(KeyedStoreICSloppy), R(4), R(3), U8(1),
+ B(Ldar), R(4),
+ B(KeyedStoreICSloppy), R(2), R(1), U8(5),
+ B(LdaSmi), U8(1),
+ B(Star), R(1),
+ B(CreateArrayLiteral), U8(2), U8(1), U8(3),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ /* 66 E> */ B(Ldar), R(0),
+ B(Star), R(5),
+ B(LdaSmi), U8(2),
+ B(Add), R(5),
+ B(KeyedStoreICSloppy), R(4), R(3), U8(3),
+ B(Ldar), R(4),
+ B(KeyedStoreICSloppy), R(2), R(1), U8(5),
+ B(Ldar), R(2),
+ /* 77 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden b/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
index 2077b79..a852ad4 100644
--- a/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
@@ -272,521 +272,521 @@
parameter count: 1
bytecode array length: 1033
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(CreateArrayLiteral), U16(256), U16(0), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(LdaConstant), U8(0),
+ /* 43 E> */ B(Star), R(0),
+ /* 51 S> */ B(LdaConstant), U8(1),
+ /* 53 E> */ B(Star), R(0),
+ /* 61 S> */ B(LdaConstant), U8(2),
+ /* 63 E> */ B(Star), R(0),
+ /* 71 S> */ B(LdaConstant), U8(3),
+ /* 73 E> */ B(Star), R(0),
+ /* 81 S> */ B(LdaConstant), U8(4),
+ /* 83 E> */ B(Star), R(0),
+ /* 91 S> */ B(LdaConstant), U8(5),
+ /* 93 E> */ B(Star), R(0),
+ /* 101 S> */ B(LdaConstant), U8(6),
+ /* 103 E> */ B(Star), R(0),
+ /* 111 S> */ B(LdaConstant), U8(7),
+ /* 113 E> */ B(Star), R(0),
+ /* 121 S> */ B(LdaConstant), U8(8),
+ /* 123 E> */ B(Star), R(0),
+ /* 131 S> */ B(LdaConstant), U8(9),
+ /* 133 E> */ B(Star), R(0),
+ /* 141 S> */ B(LdaConstant), U8(10),
+ /* 143 E> */ B(Star), R(0),
+ /* 151 S> */ B(LdaConstant), U8(11),
+ /* 153 E> */ B(Star), R(0),
+ /* 161 S> */ B(LdaConstant), U8(12),
+ /* 163 E> */ B(Star), R(0),
+ /* 171 S> */ B(LdaConstant), U8(13),
+ /* 173 E> */ B(Star), R(0),
+ /* 181 S> */ B(LdaConstant), U8(14),
+ /* 183 E> */ B(Star), R(0),
+ /* 191 S> */ B(LdaConstant), U8(15),
+ /* 193 E> */ B(Star), R(0),
+ /* 201 S> */ B(LdaConstant), U8(16),
+ /* 203 E> */ B(Star), R(0),
+ /* 211 S> */ B(LdaConstant), U8(17),
+ /* 213 E> */ B(Star), R(0),
+ /* 221 S> */ B(LdaConstant), U8(18),
+ /* 223 E> */ B(Star), R(0),
+ /* 231 S> */ B(LdaConstant), U8(19),
+ /* 233 E> */ B(Star), R(0),
+ /* 241 S> */ B(LdaConstant), U8(20),
+ /* 243 E> */ B(Star), R(0),
+ /* 251 S> */ B(LdaConstant), U8(21),
+ /* 253 E> */ B(Star), R(0),
+ /* 261 S> */ B(LdaConstant), U8(22),
+ /* 263 E> */ B(Star), R(0),
+ /* 271 S> */ B(LdaConstant), U8(23),
+ /* 273 E> */ B(Star), R(0),
+ /* 281 S> */ B(LdaConstant), U8(24),
+ /* 283 E> */ B(Star), R(0),
+ /* 291 S> */ B(LdaConstant), U8(25),
+ /* 293 E> */ B(Star), R(0),
+ /* 301 S> */ B(LdaConstant), U8(26),
+ /* 303 E> */ B(Star), R(0),
+ /* 311 S> */ B(LdaConstant), U8(27),
+ /* 313 E> */ B(Star), R(0),
+ /* 321 S> */ B(LdaConstant), U8(28),
+ /* 323 E> */ B(Star), R(0),
+ /* 331 S> */ B(LdaConstant), U8(29),
+ /* 333 E> */ B(Star), R(0),
+ /* 341 S> */ B(LdaConstant), U8(30),
+ /* 343 E> */ B(Star), R(0),
+ /* 351 S> */ B(LdaConstant), U8(31),
+ /* 353 E> */ B(Star), R(0),
+ /* 361 S> */ B(LdaConstant), U8(32),
+ /* 363 E> */ B(Star), R(0),
+ /* 371 S> */ B(LdaConstant), U8(33),
+ /* 373 E> */ B(Star), R(0),
+ /* 381 S> */ B(LdaConstant), U8(34),
+ /* 383 E> */ B(Star), R(0),
+ /* 391 S> */ B(LdaConstant), U8(35),
+ /* 393 E> */ B(Star), R(0),
+ /* 401 S> */ B(LdaConstant), U8(36),
+ /* 403 E> */ B(Star), R(0),
+ /* 411 S> */ B(LdaConstant), U8(37),
+ /* 413 E> */ B(Star), R(0),
+ /* 421 S> */ B(LdaConstant), U8(38),
+ /* 423 E> */ B(Star), R(0),
+ /* 431 S> */ B(LdaConstant), U8(39),
+ /* 433 E> */ B(Star), R(0),
+ /* 441 S> */ B(LdaConstant), U8(40),
+ /* 443 E> */ B(Star), R(0),
+ /* 451 S> */ B(LdaConstant), U8(41),
+ /* 453 E> */ B(Star), R(0),
+ /* 461 S> */ B(LdaConstant), U8(42),
+ /* 463 E> */ B(Star), R(0),
+ /* 471 S> */ B(LdaConstant), U8(43),
+ /* 473 E> */ B(Star), R(0),
+ /* 481 S> */ B(LdaConstant), U8(44),
+ /* 483 E> */ B(Star), R(0),
+ /* 491 S> */ B(LdaConstant), U8(45),
+ /* 493 E> */ B(Star), R(0),
+ /* 501 S> */ B(LdaConstant), U8(46),
+ /* 503 E> */ B(Star), R(0),
+ /* 511 S> */ B(LdaConstant), U8(47),
+ /* 513 E> */ B(Star), R(0),
+ /* 521 S> */ B(LdaConstant), U8(48),
+ /* 523 E> */ B(Star), R(0),
+ /* 531 S> */ B(LdaConstant), U8(49),
+ /* 533 E> */ B(Star), R(0),
+ /* 541 S> */ B(LdaConstant), U8(50),
+ /* 543 E> */ B(Star), R(0),
+ /* 551 S> */ B(LdaConstant), U8(51),
+ /* 553 E> */ B(Star), R(0),
+ /* 561 S> */ B(LdaConstant), U8(52),
+ /* 563 E> */ B(Star), R(0),
+ /* 571 S> */ B(LdaConstant), U8(53),
+ /* 573 E> */ B(Star), R(0),
+ /* 581 S> */ B(LdaConstant), U8(54),
+ /* 583 E> */ B(Star), R(0),
+ /* 591 S> */ B(LdaConstant), U8(55),
+ /* 593 E> */ B(Star), R(0),
+ /* 601 S> */ B(LdaConstant), U8(56),
+ /* 603 E> */ B(Star), R(0),
+ /* 611 S> */ B(LdaConstant), U8(57),
+ /* 613 E> */ B(Star), R(0),
+ /* 621 S> */ B(LdaConstant), U8(58),
+ /* 623 E> */ B(Star), R(0),
+ /* 631 S> */ B(LdaConstant), U8(59),
+ /* 633 E> */ B(Star), R(0),
+ /* 641 S> */ B(LdaConstant), U8(60),
+ /* 643 E> */ B(Star), R(0),
+ /* 651 S> */ B(LdaConstant), U8(61),
+ /* 653 E> */ B(Star), R(0),
+ /* 661 S> */ B(LdaConstant), U8(62),
+ /* 663 E> */ B(Star), R(0),
+ /* 671 S> */ B(LdaConstant), U8(63),
+ /* 673 E> */ B(Star), R(0),
+ /* 681 S> */ B(LdaConstant), U8(64),
+ /* 683 E> */ B(Star), R(0),
+ /* 691 S> */ B(LdaConstant), U8(65),
+ /* 693 E> */ B(Star), R(0),
+ /* 701 S> */ B(LdaConstant), U8(66),
+ /* 703 E> */ B(Star), R(0),
+ /* 711 S> */ B(LdaConstant), U8(67),
+ /* 713 E> */ B(Star), R(0),
+ /* 721 S> */ B(LdaConstant), U8(68),
+ /* 723 E> */ B(Star), R(0),
+ /* 731 S> */ B(LdaConstant), U8(69),
+ /* 733 E> */ B(Star), R(0),
+ /* 741 S> */ B(LdaConstant), U8(70),
+ /* 743 E> */ B(Star), R(0),
+ /* 751 S> */ B(LdaConstant), U8(71),
+ /* 753 E> */ B(Star), R(0),
+ /* 761 S> */ B(LdaConstant), U8(72),
+ /* 763 E> */ B(Star), R(0),
+ /* 771 S> */ B(LdaConstant), U8(73),
+ /* 773 E> */ B(Star), R(0),
+ /* 781 S> */ B(LdaConstant), U8(74),
+ /* 783 E> */ B(Star), R(0),
+ /* 791 S> */ B(LdaConstant), U8(75),
+ /* 793 E> */ B(Star), R(0),
+ /* 801 S> */ B(LdaConstant), U8(76),
+ /* 803 E> */ B(Star), R(0),
+ /* 811 S> */ B(LdaConstant), U8(77),
+ /* 813 E> */ B(Star), R(0),
+ /* 821 S> */ B(LdaConstant), U8(78),
+ /* 823 E> */ B(Star), R(0),
+ /* 831 S> */ B(LdaConstant), U8(79),
+ /* 833 E> */ B(Star), R(0),
+ /* 841 S> */ B(LdaConstant), U8(80),
+ /* 843 E> */ B(Star), R(0),
+ /* 851 S> */ B(LdaConstant), U8(81),
+ /* 853 E> */ B(Star), R(0),
+ /* 861 S> */ B(LdaConstant), U8(82),
+ /* 863 E> */ B(Star), R(0),
+ /* 871 S> */ B(LdaConstant), U8(83),
+ /* 873 E> */ B(Star), R(0),
+ /* 881 S> */ B(LdaConstant), U8(84),
+ /* 883 E> */ B(Star), R(0),
+ /* 891 S> */ B(LdaConstant), U8(85),
+ /* 893 E> */ B(Star), R(0),
+ /* 901 S> */ B(LdaConstant), U8(86),
+ /* 903 E> */ B(Star), R(0),
+ /* 911 S> */ B(LdaConstant), U8(87),
+ /* 913 E> */ B(Star), R(0),
+ /* 921 S> */ B(LdaConstant), U8(88),
+ /* 923 E> */ B(Star), R(0),
+ /* 931 S> */ B(LdaConstant), U8(89),
+ /* 933 E> */ B(Star), R(0),
+ /* 941 S> */ B(LdaConstant), U8(90),
+ /* 943 E> */ B(Star), R(0),
+ /* 951 S> */ B(LdaConstant), U8(91),
+ /* 953 E> */ B(Star), R(0),
+ /* 961 S> */ B(LdaConstant), U8(92),
+ /* 963 E> */ B(Star), R(0),
+ /* 971 S> */ B(LdaConstant), U8(93),
+ /* 973 E> */ B(Star), R(0),
+ /* 981 S> */ B(LdaConstant), U8(94),
+ /* 983 E> */ B(Star), R(0),
+ /* 991 S> */ B(LdaConstant), U8(95),
+ /* 993 E> */ B(Star), R(0),
+ /* 1001 S> */ B(LdaConstant), U8(96),
+ /* 1003 E> */ B(Star), R(0),
+ /* 1011 S> */ B(LdaConstant), U8(97),
+ /* 1013 E> */ B(Star), R(0),
+ /* 1021 S> */ B(LdaConstant), U8(98),
+ /* 1023 E> */ B(Star), R(0),
+ /* 1031 S> */ B(LdaConstant), U8(99),
+ /* 1033 E> */ B(Star), R(0),
+ /* 1041 S> */ B(LdaConstant), U8(100),
+ /* 1043 E> */ B(Star), R(0),
+ /* 1051 S> */ B(LdaConstant), U8(101),
+ /* 1053 E> */ B(Star), R(0),
+ /* 1061 S> */ B(LdaConstant), U8(102),
+ /* 1063 E> */ B(Star), R(0),
+ /* 1071 S> */ B(LdaConstant), U8(103),
+ /* 1073 E> */ B(Star), R(0),
+ /* 1081 S> */ B(LdaConstant), U8(104),
+ /* 1083 E> */ B(Star), R(0),
+ /* 1091 S> */ B(LdaConstant), U8(105),
+ /* 1093 E> */ B(Star), R(0),
+ /* 1101 S> */ B(LdaConstant), U8(106),
+ /* 1103 E> */ B(Star), R(0),
+ /* 1111 S> */ B(LdaConstant), U8(107),
+ /* 1113 E> */ B(Star), R(0),
+ /* 1121 S> */ B(LdaConstant), U8(108),
+ /* 1123 E> */ B(Star), R(0),
+ /* 1131 S> */ B(LdaConstant), U8(109),
+ /* 1133 E> */ B(Star), R(0),
+ /* 1141 S> */ B(LdaConstant), U8(110),
+ /* 1143 E> */ B(Star), R(0),
+ /* 1151 S> */ B(LdaConstant), U8(111),
+ /* 1153 E> */ B(Star), R(0),
+ /* 1161 S> */ B(LdaConstant), U8(112),
+ /* 1163 E> */ B(Star), R(0),
+ /* 1171 S> */ B(LdaConstant), U8(113),
+ /* 1173 E> */ B(Star), R(0),
+ /* 1181 S> */ B(LdaConstant), U8(114),
+ /* 1183 E> */ B(Star), R(0),
+ /* 1191 S> */ B(LdaConstant), U8(115),
+ /* 1193 E> */ B(Star), R(0),
+ /* 1201 S> */ B(LdaConstant), U8(116),
+ /* 1203 E> */ B(Star), R(0),
+ /* 1211 S> */ B(LdaConstant), U8(117),
+ /* 1213 E> */ B(Star), R(0),
+ /* 1221 S> */ B(LdaConstant), U8(118),
+ /* 1223 E> */ B(Star), R(0),
+ /* 1231 S> */ B(LdaConstant), U8(119),
+ /* 1233 E> */ B(Star), R(0),
+ /* 1241 S> */ B(LdaConstant), U8(120),
+ /* 1243 E> */ B(Star), R(0),
+ /* 1251 S> */ B(LdaConstant), U8(121),
+ /* 1253 E> */ B(Star), R(0),
+ /* 1261 S> */ B(LdaConstant), U8(122),
+ /* 1263 E> */ B(Star), R(0),
+ /* 1271 S> */ B(LdaConstant), U8(123),
+ /* 1273 E> */ B(Star), R(0),
+ /* 1281 S> */ B(LdaConstant), U8(124),
+ /* 1283 E> */ B(Star), R(0),
+ /* 1291 S> */ B(LdaConstant), U8(125),
+ /* 1293 E> */ B(Star), R(0),
+ /* 1301 S> */ B(LdaConstant), U8(126),
+ /* 1303 E> */ B(Star), R(0),
+ /* 1311 S> */ B(LdaConstant), U8(127),
+ /* 1313 E> */ B(Star), R(0),
+ /* 1321 S> */ B(LdaConstant), U8(128),
+ /* 1323 E> */ B(Star), R(0),
+ /* 1331 S> */ B(LdaConstant), U8(129),
+ /* 1333 E> */ B(Star), R(0),
+ /* 1341 S> */ B(LdaConstant), U8(130),
+ /* 1343 E> */ B(Star), R(0),
+ /* 1351 S> */ B(LdaConstant), U8(131),
+ /* 1353 E> */ B(Star), R(0),
+ /* 1361 S> */ B(LdaConstant), U8(132),
+ /* 1363 E> */ B(Star), R(0),
+ /* 1371 S> */ B(LdaConstant), U8(133),
+ /* 1373 E> */ B(Star), R(0),
+ /* 1381 S> */ B(LdaConstant), U8(134),
+ /* 1383 E> */ B(Star), R(0),
+ /* 1391 S> */ B(LdaConstant), U8(135),
+ /* 1393 E> */ B(Star), R(0),
+ /* 1401 S> */ B(LdaConstant), U8(136),
+ /* 1403 E> */ B(Star), R(0),
+ /* 1411 S> */ B(LdaConstant), U8(137),
+ /* 1413 E> */ B(Star), R(0),
+ /* 1421 S> */ B(LdaConstant), U8(138),
+ /* 1423 E> */ B(Star), R(0),
+ /* 1431 S> */ B(LdaConstant), U8(139),
+ /* 1433 E> */ B(Star), R(0),
+ /* 1441 S> */ B(LdaConstant), U8(140),
+ /* 1443 E> */ B(Star), R(0),
+ /* 1451 S> */ B(LdaConstant), U8(141),
+ /* 1453 E> */ B(Star), R(0),
+ /* 1461 S> */ B(LdaConstant), U8(142),
+ /* 1463 E> */ B(Star), R(0),
+ /* 1471 S> */ B(LdaConstant), U8(143),
+ /* 1473 E> */ B(Star), R(0),
+ /* 1481 S> */ B(LdaConstant), U8(144),
+ /* 1483 E> */ B(Star), R(0),
+ /* 1491 S> */ B(LdaConstant), U8(145),
+ /* 1493 E> */ B(Star), R(0),
+ /* 1501 S> */ B(LdaConstant), U8(146),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1511 S> */ B(LdaConstant), U8(147),
+ /* 1513 E> */ B(Star), R(0),
+ /* 1521 S> */ B(LdaConstant), U8(148),
+ /* 1523 E> */ B(Star), R(0),
+ /* 1531 S> */ B(LdaConstant), U8(149),
+ /* 1533 E> */ B(Star), R(0),
+ /* 1541 S> */ B(LdaConstant), U8(150),
+ /* 1543 E> */ B(Star), R(0),
+ /* 1551 S> */ B(LdaConstant), U8(151),
+ /* 1553 E> */ B(Star), R(0),
+ /* 1561 S> */ B(LdaConstant), U8(152),
+ /* 1563 E> */ B(Star), R(0),
+ /* 1571 S> */ B(LdaConstant), U8(153),
+ /* 1573 E> */ B(Star), R(0),
+ /* 1581 S> */ B(LdaConstant), U8(154),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1591 S> */ B(LdaConstant), U8(155),
+ /* 1593 E> */ B(Star), R(0),
+ /* 1601 S> */ B(LdaConstant), U8(156),
+ /* 1603 E> */ B(Star), R(0),
+ /* 1611 S> */ B(LdaConstant), U8(157),
+ /* 1613 E> */ B(Star), R(0),
+ /* 1621 S> */ B(LdaConstant), U8(158),
+ /* 1623 E> */ B(Star), R(0),
+ /* 1631 S> */ B(LdaConstant), U8(159),
+ /* 1633 E> */ B(Star), R(0),
+ /* 1641 S> */ B(LdaConstant), U8(160),
+ /* 1643 E> */ B(Star), R(0),
+ /* 1651 S> */ B(LdaConstant), U8(161),
+ /* 1653 E> */ B(Star), R(0),
+ /* 1661 S> */ B(LdaConstant), U8(162),
+ /* 1663 E> */ B(Star), R(0),
+ /* 1671 S> */ B(LdaConstant), U8(163),
+ /* 1673 E> */ B(Star), R(0),
+ /* 1681 S> */ B(LdaConstant), U8(164),
+ /* 1683 E> */ B(Star), R(0),
+ /* 1691 S> */ B(LdaConstant), U8(165),
+ /* 1693 E> */ B(Star), R(0),
+ /* 1701 S> */ B(LdaConstant), U8(166),
+ /* 1703 E> */ B(Star), R(0),
+ /* 1711 S> */ B(LdaConstant), U8(167),
+ /* 1713 E> */ B(Star), R(0),
+ /* 1721 S> */ B(LdaConstant), U8(168),
+ /* 1723 E> */ B(Star), R(0),
+ /* 1731 S> */ B(LdaConstant), U8(169),
+ /* 1733 E> */ B(Star), R(0),
+ /* 1741 S> */ B(LdaConstant), U8(170),
+ /* 1743 E> */ B(Star), R(0),
+ /* 1751 S> */ B(LdaConstant), U8(171),
+ /* 1753 E> */ B(Star), R(0),
+ /* 1761 S> */ B(LdaConstant), U8(172),
+ /* 1763 E> */ B(Star), R(0),
+ /* 1771 S> */ B(LdaConstant), U8(173),
+ /* 1773 E> */ B(Star), R(0),
+ /* 1781 S> */ B(LdaConstant), U8(174),
+ /* 1783 E> */ B(Star), R(0),
+ /* 1791 S> */ B(LdaConstant), U8(175),
+ /* 1793 E> */ B(Star), R(0),
+ /* 1801 S> */ B(LdaConstant), U8(176),
+ /* 1803 E> */ B(Star), R(0),
+ /* 1811 S> */ B(LdaConstant), U8(177),
+ /* 1813 E> */ B(Star), R(0),
+ /* 1821 S> */ B(LdaConstant), U8(178),
+ /* 1823 E> */ B(Star), R(0),
+ /* 1831 S> */ B(LdaConstant), U8(179),
+ /* 1833 E> */ B(Star), R(0),
+ /* 1841 S> */ B(LdaConstant), U8(180),
+ /* 1843 E> */ B(Star), R(0),
+ /* 1851 S> */ B(LdaConstant), U8(181),
+ /* 1853 E> */ B(Star), R(0),
+ /* 1861 S> */ B(LdaConstant), U8(182),
+ /* 1863 E> */ B(Star), R(0),
+ /* 1871 S> */ B(LdaConstant), U8(183),
+ /* 1873 E> */ B(Star), R(0),
+ /* 1881 S> */ B(LdaConstant), U8(184),
+ /* 1883 E> */ B(Star), R(0),
+ /* 1891 S> */ B(LdaConstant), U8(185),
+ /* 1893 E> */ B(Star), R(0),
+ /* 1901 S> */ B(LdaConstant), U8(186),
+ /* 1903 E> */ B(Star), R(0),
+ /* 1911 S> */ B(LdaConstant), U8(187),
+ /* 1913 E> */ B(Star), R(0),
+ /* 1921 S> */ B(LdaConstant), U8(188),
+ /* 1923 E> */ B(Star), R(0),
+ /* 1931 S> */ B(LdaConstant), U8(189),
+ /* 1933 E> */ B(Star), R(0),
+ /* 1941 S> */ B(LdaConstant), U8(190),
+ /* 1943 E> */ B(Star), R(0),
+ /* 1951 S> */ B(LdaConstant), U8(191),
+ /* 1953 E> */ B(Star), R(0),
+ /* 1961 S> */ B(LdaConstant), U8(192),
+ /* 1963 E> */ B(Star), R(0),
+ /* 1971 S> */ B(LdaConstant), U8(193),
+ /* 1973 E> */ B(Star), R(0),
+ /* 1981 S> */ B(LdaConstant), U8(194),
+ /* 1983 E> */ B(Star), R(0),
+ /* 1991 S> */ B(LdaConstant), U8(195),
+ /* 1993 E> */ B(Star), R(0),
+ /* 2001 S> */ B(LdaConstant), U8(196),
+ /* 2003 E> */ B(Star), R(0),
+ /* 2011 S> */ B(LdaConstant), U8(197),
+ /* 2013 E> */ B(Star), R(0),
+ /* 2021 S> */ B(LdaConstant), U8(198),
+ /* 2023 E> */ B(Star), R(0),
+ /* 2031 S> */ B(LdaConstant), U8(199),
+ /* 2033 E> */ B(Star), R(0),
+ /* 2041 S> */ B(LdaConstant), U8(200),
+ /* 2043 E> */ B(Star), R(0),
+ /* 2051 S> */ B(LdaConstant), U8(201),
+ /* 2053 E> */ B(Star), R(0),
+ /* 2061 S> */ B(LdaConstant), U8(202),
+ /* 2063 E> */ B(Star), R(0),
+ /* 2071 S> */ B(LdaConstant), U8(203),
+ /* 2073 E> */ B(Star), R(0),
+ /* 2081 S> */ B(LdaConstant), U8(204),
+ /* 2083 E> */ B(Star), R(0),
+ /* 2091 S> */ B(LdaConstant), U8(205),
+ /* 2093 E> */ B(Star), R(0),
+ /* 2101 S> */ B(LdaConstant), U8(206),
+ /* 2103 E> */ B(Star), R(0),
+ /* 2111 S> */ B(LdaConstant), U8(207),
+ /* 2113 E> */ B(Star), R(0),
+ /* 2121 S> */ B(LdaConstant), U8(208),
+ /* 2123 E> */ B(Star), R(0),
+ /* 2131 S> */ B(LdaConstant), U8(209),
+ /* 2133 E> */ B(Star), R(0),
+ /* 2141 S> */ B(LdaConstant), U8(210),
+ /* 2143 E> */ B(Star), R(0),
+ /* 2151 S> */ B(LdaConstant), U8(211),
+ /* 2153 E> */ B(Star), R(0),
+ /* 2161 S> */ B(LdaConstant), U8(212),
+ /* 2163 E> */ B(Star), R(0),
+ /* 2171 S> */ B(LdaConstant), U8(213),
+ /* 2173 E> */ B(Star), R(0),
+ /* 2181 S> */ B(LdaConstant), U8(214),
+ /* 2183 E> */ B(Star), R(0),
+ /* 2191 S> */ B(LdaConstant), U8(215),
+ /* 2193 E> */ B(Star), R(0),
+ /* 2201 S> */ B(LdaConstant), U8(216),
+ /* 2203 E> */ B(Star), R(0),
+ /* 2211 S> */ B(LdaConstant), U8(217),
+ /* 2213 E> */ B(Star), R(0),
+ /* 2221 S> */ B(LdaConstant), U8(218),
+ /* 2223 E> */ B(Star), R(0),
+ /* 2231 S> */ B(LdaConstant), U8(219),
+ /* 2233 E> */ B(Star), R(0),
+ /* 2241 S> */ B(LdaConstant), U8(220),
+ /* 2243 E> */ B(Star), R(0),
+ /* 2251 S> */ B(LdaConstant), U8(221),
+ /* 2253 E> */ B(Star), R(0),
+ /* 2261 S> */ B(LdaConstant), U8(222),
+ /* 2263 E> */ B(Star), R(0),
+ /* 2271 S> */ B(LdaConstant), U8(223),
+ /* 2273 E> */ B(Star), R(0),
+ /* 2281 S> */ B(LdaConstant), U8(224),
+ /* 2283 E> */ B(Star), R(0),
+ /* 2291 S> */ B(LdaConstant), U8(225),
+ /* 2293 E> */ B(Star), R(0),
+ /* 2301 S> */ B(LdaConstant), U8(226),
+ /* 2303 E> */ B(Star), R(0),
+ /* 2311 S> */ B(LdaConstant), U8(227),
+ /* 2313 E> */ B(Star), R(0),
+ /* 2321 S> */ B(LdaConstant), U8(228),
+ /* 2323 E> */ B(Star), R(0),
+ /* 2331 S> */ B(LdaConstant), U8(229),
+ /* 2333 E> */ B(Star), R(0),
+ /* 2341 S> */ B(LdaConstant), U8(230),
+ /* 2343 E> */ B(Star), R(0),
+ /* 2351 S> */ B(LdaConstant), U8(231),
+ /* 2353 E> */ B(Star), R(0),
+ /* 2361 S> */ B(LdaConstant), U8(232),
+ /* 2363 E> */ B(Star), R(0),
+ /* 2371 S> */ B(LdaConstant), U8(233),
+ /* 2373 E> */ B(Star), R(0),
+ /* 2381 S> */ B(LdaConstant), U8(234),
+ /* 2383 E> */ B(Star), R(0),
+ /* 2391 S> */ B(LdaConstant), U8(235),
+ /* 2393 E> */ B(Star), R(0),
+ /* 2401 S> */ B(LdaConstant), U8(236),
+ /* 2403 E> */ B(Star), R(0),
+ /* 2411 S> */ B(LdaConstant), U8(237),
+ /* 2413 E> */ B(Star), R(0),
+ /* 2421 S> */ B(LdaConstant), U8(238),
+ /* 2423 E> */ B(Star), R(0),
+ /* 2431 S> */ B(LdaConstant), U8(239),
+ /* 2433 E> */ B(Star), R(0),
+ /* 2441 S> */ B(LdaConstant), U8(240),
+ /* 2443 E> */ B(Star), R(0),
+ /* 2451 S> */ B(LdaConstant), U8(241),
+ /* 2453 E> */ B(Star), R(0),
+ /* 2461 S> */ B(LdaConstant), U8(242),
+ /* 2463 E> */ B(Star), R(0),
+ /* 2471 S> */ B(LdaConstant), U8(243),
+ /* 2473 E> */ B(Star), R(0),
+ /* 2481 S> */ B(LdaConstant), U8(244),
+ /* 2483 E> */ B(Star), R(0),
+ /* 2491 S> */ B(LdaConstant), U8(245),
+ /* 2493 E> */ B(Star), R(0),
+ /* 2501 S> */ B(LdaConstant), U8(246),
+ /* 2503 E> */ B(Star), R(0),
+ /* 2511 S> */ B(LdaConstant), U8(247),
+ /* 2513 E> */ B(Star), R(0),
+ /* 2521 S> */ B(LdaConstant), U8(248),
+ /* 2523 E> */ B(Star), R(0),
+ /* 2531 S> */ B(LdaConstant), U8(249),
+ /* 2533 E> */ B(Star), R(0),
+ /* 2541 S> */ B(LdaConstant), U8(250),
+ /* 2543 E> */ B(Star), R(0),
+ /* 2551 S> */ B(LdaConstant), U8(251),
+ /* 2553 E> */ B(Star), R(0),
+ /* 2561 S> */ B(LdaConstant), U8(252),
+ /* 2563 E> */ B(Star), R(0),
+ /* 2571 S> */ B(LdaConstant), U8(253),
+ /* 2573 E> */ B(Star), R(0),
+ /* 2581 S> */ B(LdaConstant), U8(254),
+ /* 2583 E> */ B(Star), R(0),
+ /* 2591 S> */ B(LdaConstant), U8(255),
+ /* 2593 E> */ B(Star), R(0),
+ /* 2601 S> */ B(Wide), B(CreateArrayLiteral), U16(256), U16(0), U8(3),
+ /* 2619 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden b/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
index f569bab..c80469b 100644
--- a/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
+++ b/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
@@ -16,20 +16,20 @@
parameter count: 1
bytecode array length: 25
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(LdaSmi), U8(4),
- B(Star), R(0),
- B(LdaSmi), U8(5),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 49 S> */ B(LdaSmi), U8(1),
+ /* 49 E> */ B(Star), R(1),
+ /* 52 S> */ B(LdaSmi), U8(2),
+ /* 62 E> */ B(Star), R(0),
+ B(LdaSmi), U8(3),
+ /* 69 E> */ B(Star), R(1),
+ B(LdaSmi), U8(4),
+ /* 76 E> */ B(Star), R(0),
+ B(LdaSmi), U8(5),
+ /* 83 E> */ B(Star), R(1),
+ /* 89 S> */ B(Return),
]
constant pool: [
]
@@ -46,13 +46,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(55),
- B(Star), R(0),
- B(LdaSmi), U8(100),
- B(Star), R(0),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(55),
+ /* 42 E> */ B(Star), R(0),
+ /* 57 S> */ B(LdaSmi), U8(100),
+ /* 57 E> */ B(Star), R(0),
+ /* 57 E> */ B(Star), R(1),
+ /* 75 S> */ B(Return),
]
constant pool: [
]
@@ -69,19 +69,19 @@
parameter count: 1
bytecode array length: 24
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(55),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(100),
- B(Star), R(0),
- B(Add), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(101),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(55),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(100),
+ /* 57 E> */ B(Star), R(0),
+ B(Add), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(101),
+ /* 69 E> */ B(Star), R(0),
+ B(Add), R(2),
+ /* 48 E> */ B(Star), R(0),
+ /* 87 S> */ B(Return),
]
constant pool: [
]
@@ -99,24 +99,24 @@
parameter count: 1
bytecode array length: 32
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(55),
- B(Star), R(0),
- B(LdaSmi), U8(56),
- B(Star), R(0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Sub), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(57),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(0),
- B(ToNumber),
- B(Star), R(1),
- B(Inc),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(55),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaSmi), U8(56),
+ /* 53 E> */ B(Star), R(0),
+ B(Star), R(1),
+ /* 61 E> */ B(Ldar), R(0),
+ B(Sub), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(57),
+ /* 68 E> */ B(Star), R(0),
+ B(Add), R(2),
+ /* 48 E> */ B(Star), R(0),
+ /* 75 S> */ B(ToNumber),
+ B(Star), R(1),
+ B(Inc),
+ /* 76 E> */ B(Star), R(0),
+ /* 90 S> */ B(Return),
]
constant pool: [
]
@@ -133,23 +133,23 @@
parameter count: 1
bytecode array length: 32
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(55),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(3),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(Add), R(3),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(55),
+ /* 42 E> */ B(Star), R(0),
+ /* 76 S> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 61 E> */ B(Star), R(0),
+ B(Add), R(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(2),
+ /* 71 E> */ B(Star), R(0),
+ B(Add), R(3),
+ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 81 E> */ B(Star), R(0),
+ B(Add), R(2),
+ /* 76 E> */ B(Star), R(1),
+ /* 97 S> */ B(Return),
]
constant pool: [
]
@@ -166,23 +166,23 @@
parameter count: 1
bytecode array length: 32
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(55),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Add), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(Add), R(1),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(55),
+ /* 42 E> */ B(Star), R(0),
+ /* 76 S> */ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 61 E> */ B(Star), R(0),
+ B(Add), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ /* 71 E> */ B(Star), R(0),
+ B(Add), R(2),
+ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ /* 81 E> */ B(Star), R(0),
+ B(Add), R(1),
+ /* 76 E> */ B(Star), R(0),
+ /* 97 S> */ B(Return),
]
constant pool: [
]
@@ -198,42 +198,42 @@
parameter count: 1
bytecode array length: 70
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Add), R(2),
- B(Star), R(3),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(4),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(Mul), R(4),
- B(Add), R(3),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Add), R(2),
- B(Star), R(3),
- B(LdaSmi), U8(4),
- B(Star), R(0),
- B(Add), R(3),
- B(Star), R(2),
- B(LdaSmi), U8(5),
- B(Star), R(1),
- B(Add), R(2),
- B(Star), R(3),
- B(Ldar), R(1),
- B(Add), R(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 50 S> */ B(LdaSmi), U8(20),
+ /* 50 E> */ B(Star), R(1),
+ /* 54 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 68 E> */ B(Star), R(0),
+ B(Add), R(2),
+ B(Star), R(3),
+ /* 76 E> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ B(Star), R(4),
+ B(LdaSmi), U8(2),
+ /* 88 E> */ B(Star), R(1),
+ B(Mul), R(4),
+ B(Add), R(3),
+ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 98 E> */ B(Star), R(1),
+ B(Add), R(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(4),
+ /* 108 E> */ B(Star), R(0),
+ B(Add), R(3),
+ B(Star), R(2),
+ B(LdaSmi), U8(5),
+ /* 118 E> */ B(Star), R(1),
+ B(Add), R(2),
+ B(Star), R(3),
+ /* 125 E> */ B(Ldar), R(1),
+ B(Add), R(3),
+ /* 128 S> */ B(Return),
]
constant pool: [
]
@@ -247,30 +247,29 @@
"
frame size: 4
parameter count: 1
-bytecode array length: 38
+bytecode array length: 37
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(17),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Add), R(1),
- B(Star), R(2),
- B(Ldar), R(0),
- B(ToNumber),
- B(Star), R(1),
- B(Inc),
- B(Star), R(0),
- B(Ldar), R(1),
- B(Add), R(2),
- B(Star), R(3),
- B(Ldar), R(0),
- B(ToNumber),
- B(Inc),
- B(Star), R(0),
- B(Add), R(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(17),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaSmi), U8(1),
+ B(Star), R(1),
+ /* 57 E> */ B(Ldar), R(0),
+ B(Add), R(1),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(ToNumber),
+ B(Star), R(1),
+ B(Inc),
+ /* 63 E> */ B(Star), R(0),
+ B(Ldar), R(1),
+ B(Add), R(2),
+ B(Star), R(3),
+ B(Ldar), R(0),
+ B(Inc),
+ /* 72 E> */ B(Star), R(0),
+ B(Add), R(3),
+ /* 76 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden b/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
index ee98e5a..6aa50ef 100644
--- a/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
+++ b/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
@@ -15,19 +15,19 @@
parameter count: 1
bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanTrue), U8(9),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(TestLessThan), R(1),
- B(JumpIfToBooleanFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanTrue), U8(9),
+ /* 54 E> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaZero),
+ /* 56 E> */ B(TestLessThan), R(1),
+ B(JumpIfToBooleanFalse), U8(5),
+ /* 63 S> */ B(LdaSmi), U8(1),
+ /* 75 S> */ B(Return),
+ B(LdaUndefined),
+ /* 75 S> */ B(Return),
]
constant pool: [
]
@@ -42,19 +42,19 @@
parameter count: 1
bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(9),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(TestLessThan), R(1),
- B(JumpIfToBooleanFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanFalse), U8(9),
+ /* 54 E> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaZero),
+ /* 56 E> */ B(TestLessThan), R(1),
+ B(JumpIfToBooleanFalse), U8(5),
+ /* 63 S> */ B(LdaSmi), U8(1),
+ /* 75 S> */ B(Return),
+ B(LdaUndefined),
+ /* 75 S> */ B(Return),
]
constant pool: [
]
@@ -69,21 +69,21 @@
parameter count: 1
bytecode array length: 26
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanTrue), U8(9),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(TestLessThan), R(1),
- B(JumpIfToBooleanFalse), U8(6),
- B(LdaSmi), U8(2),
- B(Jump), U8(4),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanTrue), U8(9),
+ /* 55 E> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaZero),
+ /* 57 E> */ B(TestLessThan), R(1),
+ B(JumpIfToBooleanFalse), U8(6),
+ B(LdaSmi), U8(2),
+ B(Jump), U8(4),
+ B(LdaSmi), U8(3),
+ /* 47 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 71 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
index 05ee657..7936736 100644
--- a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
+++ b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
@@ -17,10 +17,10 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 98 S> */ B(Return),
]
constant pool: [
]
@@ -39,10 +39,10 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 87 S> */ B(Return),
]
constant pool: [
]
@@ -65,41 +65,41 @@
parameter count: 1
bytecode array length: 66
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(10),
- B(TestLessThan), R(2),
- B(JumpIfFalse), U8(47),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(12),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-39),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(4),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(4),
- B(Jump), U8(-53),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(1),
+ /* 53 E> */ B(Star), R(1),
+ /* 65 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(10),
+ /* 65 E> */ B(TestLessThan), R(2),
+ B(JumpIfFalse), U8(47),
+ /* 56 E> */ B(StackCheck),
+ /* 75 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(12),
+ B(Mul), R(2),
+ /* 77 E> */ B(Star), R(1),
+ /* 89 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 91 E> */ B(Star), R(0),
+ /* 102 S> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 108 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 114 S> */ B(Jump), U8(14),
+ /* 126 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(4),
+ /* 132 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 138 S> */ B(Jump), U8(4),
+ B(Jump), U8(-53),
+ /* 147 S> */ B(Ldar), R(1),
+ /* 157 S> */ B(Return),
]
constant pool: [
]
@@ -123,48 +123,48 @@
parameter count: 1
bytecode array length: 79
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(TestLessThan), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-10),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(50),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(4),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(38),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(10),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-46),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(5),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(14),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-70),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 E> */ B(StackCheck),
+ /* 62 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaZero),
+ /* 68 E> */ B(TestLessThan), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 73 S> */ B(Jump), U8(60),
+ /* 85 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ /* 91 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 97 S> */ B(Jump), U8(50),
+ /* 106 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(4),
+ /* 112 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 118 S> */ B(Jump), U8(38),
+ /* 127 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(10),
+ /* 133 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 140 S> */ B(Jump), U8(24),
+ /* 152 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(5),
+ /* 158 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 164 S> */ B(Jump), U8(14),
+ /* 173 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 175 E> */ B(Star), R(0),
+ B(Jump), U8(-70),
+ /* 186 S> */ B(Ldar), R(0),
+ /* 196 S> */ B(Return),
]
constant pool: [
]
@@ -188,37 +188,37 @@
parameter count: 1
bytecode array length: 57
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(TestLessThan), R(1),
- B(JumpIfFalse), U8(27),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(14),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-33),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(4),
- B(Jump), U8(-48),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 E> */ B(StackCheck),
+ /* 71 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ /* 71 E> */ B(TestLessThan), R(1),
+ B(JumpIfFalse), U8(27),
+ /* 62 E> */ B(StackCheck),
+ /* 82 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 88 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 94 S> */ B(Jump), U8(14),
+ /* 105 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 107 E> */ B(Star), R(0),
+ B(Jump), U8(-33),
+ /* 122 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 124 E> */ B(Star), R(0),
+ /* 135 S> */ B(Jump), U8(4),
+ B(Jump), U8(-48),
+ /* 144 S> */ B(Ldar), R(0),
+ /* 154 S> */ B(Return),
]
constant pool: [
]
@@ -239,27 +239,27 @@
parameter count: 1
bytecode array length: 39
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfToBooleanFalse), U8(25),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(12),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Sub), R(2),
- B(Star), R(0),
- B(Jump), U8(-25),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(LdaSmi), U8(1),
+ /* 54 E> */ B(Star), R(1),
+ /* 64 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanFalse), U8(25),
+ /* 57 E> */ B(StackCheck),
+ /* 71 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(12),
+ B(Mul), R(2),
+ /* 73 E> */ B(Star), R(1),
+ /* 85 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Sub), R(2),
+ /* 87 E> */ B(Star), R(0),
+ B(Jump), U8(-25),
+ /* 98 S> */ B(Ldar), R(1),
+ /* 108 S> */ B(Return),
]
constant pool: [
]
@@ -281,41 +281,41 @@
parameter count: 1
bytecode array length: 66
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(10),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(5),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(34),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(6),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(12),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(10),
- B(TestLessThan), R(2),
- B(JumpIfTrue), U8(-53),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(1),
+ /* 53 E> */ B(Star), R(1),
+ /* 56 E> */ B(StackCheck),
+ /* 63 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(10),
+ B(Mul), R(2),
+ /* 65 E> */ B(Star), R(1),
+ /* 77 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(5),
+ /* 83 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 89 S> */ B(Jump), U8(34),
+ /* 98 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(6),
+ /* 104 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 110 S> */ B(Jump), U8(12),
+ /* 122 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 124 E> */ B(Star), R(0),
+ /* 144 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(10),
+ /* 144 E> */ B(TestLessThan), R(2),
+ B(JumpIfTrue), U8(-53),
+ /* 151 S> */ B(Ldar), R(1),
+ /* 161 S> */ B(Return),
]
constant pool: [
]
@@ -336,26 +336,26 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(12),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Sub), R(2),
- B(Star), R(0),
- B(Ldar), R(0),
- B(JumpIfToBooleanTrue), U8(-23),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(LdaSmi), U8(1),
+ /* 54 E> */ B(Star), R(1),
+ /* 57 E> */ B(StackCheck),
+ /* 64 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(12),
+ B(Mul), R(2),
+ /* 66 E> */ B(Star), R(1),
+ /* 78 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Sub), R(2),
+ /* 80 E> */ B(Star), R(0),
+ /* 98 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanTrue), U8(-23),
+ /* 102 S> */ B(Ldar), R(1),
+ /* 112 S> */ B(Return),
]
constant pool: [
]
@@ -377,35 +377,35 @@
parameter count: 1
bytecode array length: 54
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(10),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(5),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(22),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(6),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(2),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(1),
+ /* 53 E> */ B(Star), R(1),
+ /* 56 E> */ B(StackCheck),
+ /* 63 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(10),
+ B(Mul), R(2),
+ /* 65 E> */ B(Star), R(1),
+ /* 77 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(5),
+ /* 83 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 89 S> */ B(Jump), U8(22),
+ /* 98 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 100 E> */ B(Star), R(0),
+ /* 111 S> */ B(Star), R(2),
+ B(LdaSmi), U8(6),
+ /* 117 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 123 S> */ B(Jump), U8(2),
+ /* 150 S> */ B(Ldar), R(1),
+ /* 160 S> */ B(Return),
]
constant pool: [
]
@@ -427,36 +427,36 @@
parameter count: 1
bytecode array length: 56
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(10),
- B(Mul), R(2),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(5),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(24),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(6),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-41),
- B(Jump), U8(-43),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(1),
+ /* 53 E> */ B(Star), R(1),
+ /* 56 E> */ B(StackCheck),
+ /* 63 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(10),
+ B(Mul), R(2),
+ /* 65 E> */ B(Star), R(1),
+ /* 77 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(5),
+ /* 83 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 89 S> */ B(Jump), U8(24),
+ /* 98 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 100 E> */ B(Star), R(0),
+ /* 111 S> */ B(Star), R(2),
+ B(LdaSmi), U8(6),
+ /* 117 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 123 S> */ B(Jump), U8(2),
+ B(Jump), U8(-43),
+ /* 149 S> */ B(Ldar), R(1),
+ /* 159 S> */ B(Return),
]
constant pool: [
]
@@ -476,30 +476,30 @@
parameter count: 1
bytecode array length: 43
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(26),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-23),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-35),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 E> */ B(StackCheck),
+ /* 58 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 64 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 70 S> */ B(Jump), U8(26),
+ /* 79 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 85 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 91 S> */ B(Jump), U8(12),
+ /* 103 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 105 E> */ B(Star), R(0),
+ B(Jump), U8(-35),
+ B(LdaUndefined),
+ /* 116 S> */ B(Return),
]
constant pool: [
]
@@ -518,30 +518,30 @@
parameter count: 1
bytecode array length: 43
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(26),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-23),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-35),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 47 S> */ B(LdaZero),
+ /* 47 E> */ B(Star), R(0),
+ /* 34 E> */ B(StackCheck),
+ /* 56 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 62 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 68 S> */ B(Jump), U8(26),
+ /* 77 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 83 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 89 S> */ B(Jump), U8(12),
+ /* 101 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 103 E> */ B(Star), R(0),
+ B(Jump), U8(-35),
+ B(LdaUndefined),
+ /* 114 S> */ B(Return),
]
constant pool: [
]
@@ -560,30 +560,30 @@
parameter count: 1
bytecode array length: 43
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(26),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(2),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-35),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 E> */ B(StackCheck),
+ /* 68 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 74 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 80 S> */ B(Jump), U8(26),
+ /* 89 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 95 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 101 S> */ B(Jump), U8(2),
+ /* 55 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 55 E> */ B(Star), R(0),
+ B(Jump), U8(-35),
+ B(LdaUndefined),
+ /* 113 S> */ B(Return),
]
constant pool: [
]
@@ -601,30 +601,30 @@
parameter count: 1
bytecode array length: 43
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(26),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(2),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-35),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 47 S> */ B(LdaZero),
+ /* 47 E> */ B(Star), R(0),
+ /* 34 E> */ B(StackCheck),
+ /* 66 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 72 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 78 S> */ B(Jump), U8(26),
+ /* 87 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 93 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 99 S> */ B(Jump), U8(2),
+ /* 53 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 53 E> */ B(Star), R(0),
+ B(Jump), U8(-35),
+ B(LdaUndefined),
+ /* 111 S> */ B(Return),
]
constant pool: [
]
@@ -643,31 +643,31 @@
parameter count: 1
bytecode array length: 44
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(100),
- B(TestLessThan), R(2),
- B(JumpIfFalse), U8(27),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Jump), U8(2),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(1),
- B(Jump), U8(-33),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaZero),
+ /* 58 E> */ B(Star), R(1),
+ /* 63 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(100),
+ /* 63 E> */ B(TestLessThan), R(2),
+ B(JumpIfFalse), U8(27),
+ /* 45 E> */ B(StackCheck),
+ /* 85 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 87 E> */ B(Star), R(0),
+ /* 98 S> */ B(Jump), U8(2),
+ /* 72 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 72 E> */ B(Star), R(1),
+ B(Jump), U8(-33),
+ B(LdaUndefined),
+ /* 110 S> */ B(Return),
]
constant pool: [
]
@@ -684,28 +684,27 @@
"
frame size: 3
parameter count: 1
-bytecode array length: 35
+bytecode array length: 34
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(10),
- B(Star), R(1),
- B(Ldar), R(1),
- B(JumpIfToBooleanFalse), U8(21),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(12),
- B(Mul), R(2),
- B(Star), R(0),
- B(Ldar), R(1),
- B(ToNumber),
- B(Dec),
- B(Star), R(1),
- B(Jump), U8(-21),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaSmi), U8(10),
+ /* 58 E> */ B(Star), R(1),
+ /* 62 S> */ B(Ldar), R(1),
+ B(JumpIfToBooleanFalse), U8(20),
+ /* 45 E> */ B(StackCheck),
+ /* 74 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(12),
+ B(Mul), R(2),
+ /* 76 E> */ B(Star), R(0),
+ /* 67 S> */ B(Ldar), R(1),
+ B(Dec),
+ /* 67 E> */ B(Star), R(1),
+ B(Jump), U8(-20),
+ /* 88 S> */ B(Ldar), R(0),
+ /* 98 S> */ B(Return),
]
constant pool: [
]
@@ -724,13 +723,13 @@
parameter count: 1
bytecode array length: 10
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaZero),
+ /* 58 E> */ B(Star), R(1),
+ /* 91 S> */ B(Ldar), R(0),
+ /* 101 S> */ B(Return),
]
constant pool: [
]
@@ -748,31 +747,30 @@
"
frame size: 3
parameter count: 1
-bytecode array length: 39
+bytecode array length: 38
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(20),
- B(TestEqual), R(2),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(10),
- B(Ldar), R(1),
- B(ToNumber),
- B(Inc),
- B(Star), R(1),
- B(Jump), U8(-27),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaZero),
+ /* 58 E> */ B(Star), R(1),
+ /* 45 E> */ B(StackCheck),
+ /* 76 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ /* 78 E> */ B(Star), R(0),
+ /* 89 S> */ B(Star), R(2),
+ B(LdaSmi), U8(20),
+ /* 95 E> */ B(TestEqual), R(2),
+ B(JumpIfFalse), U8(4),
+ /* 102 S> */ B(Jump), U8(9),
+ /* 69 S> */ B(Ldar), R(1),
+ B(Inc),
+ /* 69 E> */ B(Star), R(1),
+ B(Jump), U8(-26),
+ /* 112 S> */ B(Ldar), R(0),
+ /* 122 S> */ B(Return),
]
constant pool: [
]
@@ -795,59 +793,59 @@
parameter count: 1
bytecode array length: 120
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(1),
- B(JumpIfToBooleanFalse), U8(112),
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(4),
- B(Ldar), R(closure),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
- B(PushContext), R(3),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(1), U8(0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(3),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(JumpIfToBooleanFalse), U8(8),
- B(PopContext), R(3),
- B(PopContext), R(3),
- B(Jump), U8(-69),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(3),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(ToNumber),
- B(Star), R(4),
- B(Inc),
- B(Star), R(5),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(3),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
- B(Ldar), R(5),
- B(StaContextSlot), R(context), U8(4),
- B(PopContext), R(3),
- B(Jump), U8(-112),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 S> */ B(Ldar), R(1),
+ B(JumpIfToBooleanFalse), U8(112),
+ /* 45 E> */ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(4),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
+ B(PushContext), R(3),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(Star), R(0),
+ /* 73 S> */ B(LdaSmi), U8(1),
+ /* 73 E> */ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(2),
+ /* 106 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(JumpIfToBooleanFalse), U8(8),
+ /* 113 S> */ B(PopContext), R(3),
+ B(PopContext), R(3),
+ B(Jump), U8(43),
+ /* 126 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(ToNumber),
+ B(Star), R(4),
+ B(Inc),
+ /* 127 E> */ B(Star), R(5),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
+ B(Ldar), R(5),
+ B(StaContextSlot), R(context), U8(4),
+ B(PopContext), R(3),
+ B(Jump), U8(-112),
+ B(LdaUndefined),
+ /* 137 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
index 162297d..8573a1a 100644
--- a/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
+++ b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
@@ -21,16 +21,16 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(2),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 56 S> */ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 58 E> */ B(Star), R(0),
+ /* 69 S> */ B(Jump), U8(2),
+ /* 97 S> */ B(Ldar), R(0),
+ /* 107 S> */ B(Return),
]
constant pool: [
]
@@ -52,52 +52,49 @@
"
frame size: 5
parameter count: 1
-bytecode array length: 75
+bytecode array length: 72
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(3),
- B(LdaSmi), U8(10),
- B(TestLessThan), R(3),
- B(JumpIfFalse), U8(57),
- B(StackCheck),
- B(LdaZero),
- B(Star), R(2),
- B(Ldar), R(2),
- B(Star), R(3),
- B(LdaSmi), U8(3),
- B(TestLessThan), R(3),
- B(JumpIfFalse), U8(35),
- B(StackCheck),
- B(Ldar), R(0),
- B(ToNumber),
- B(Inc),
- B(Star), R(0),
- B(Ldar), R(1),
- B(Star), R(3),
- B(Ldar), R(2),
- B(Add), R(3),
- B(Star), R(4),
- B(LdaSmi), U8(12),
- B(TestEqual), R(4),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(18),
- B(Ldar), R(2),
- B(ToNumber),
- B(Inc),
- B(Star), R(2),
- B(Jump), U8(-41),
- B(Ldar), R(1),
- B(ToNumber),
- B(Inc),
- B(Star), R(1),
- B(Jump), U8(-63),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaZero),
+ /* 44 E> */ B(Star), R(0),
+ /* 71 S> */ B(LdaZero),
+ /* 71 E> */ B(Star), R(1),
+ /* 76 S> */ B(Ldar), R(1),
+ B(Star), R(3),
+ B(LdaSmi), U8(10),
+ /* 76 E> */ B(TestLessThan), R(3),
+ B(JumpIfFalse), U8(54),
+ /* 58 E> */ B(StackCheck),
+ /* 106 S> */ B(LdaZero),
+ /* 106 E> */ B(Star), R(2),
+ /* 111 S> */ B(Ldar), R(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(3),
+ /* 111 E> */ B(TestLessThan), R(3),
+ B(JumpIfFalse), U8(33),
+ /* 93 E> */ B(StackCheck),
+ /* 129 S> */ B(Ldar), R(0),
+ B(Inc),
+ /* 131 E> */ B(Star), R(0),
+ /* 142 S> */ B(Ldar), R(1),
+ B(Star), R(3),
+ /* 150 E> */ B(Ldar), R(2),
+ B(Add), R(3),
+ B(Star), R(4),
+ B(LdaSmi), U8(12),
+ /* 152 E> */ B(TestEqual), R(4),
+ B(JumpIfFalse), U8(4),
+ /* 161 S> */ B(Jump), U8(16),
+ /* 118 S> */ B(Ldar), R(2),
+ B(Inc),
+ /* 118 E> */ B(Star), R(2),
+ B(Jump), U8(-39),
+ /* 84 S> */ B(Ldar), R(1),
+ B(Inc),
+ /* 84 E> */ B(Star), R(1),
+ B(Jump), U8(-60),
+ /* 188 S> */ B(Ldar), R(0),
+ /* 200 S> */ B(Return),
]
constant pool: [
]
@@ -116,29 +113,29 @@
parameter count: 1
bytecode array length: 51
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(Ldar), R(closure),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
- B(PushContext), R(2),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(1), U8(0),
- B(Star), R(0),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Star), R(1),
- B(Jump), U8(2),
- B(PopContext), R(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(Ldar), R(closure),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(10),
+ /* 53 E> */ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(1),
+ /* 88 S> */ B(Jump), U8(2),
+ B(PopContext), R(2),
+ B(LdaUndefined),
+ /* 103 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -165,60 +162,60 @@
parameter count: 1
bytecode array length: 131
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(2),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(LdaConstant), U8(0),
- B(Star), R(4),
- B(Ldar), R(closure),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
- B(PushContext), R(3),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(1), U8(0),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(StaContextSlot), R(context), U8(4),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(Star), R(1),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(3),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(JumpIfToBooleanFalse), U8(6),
- B(PopContext), R(3),
- B(Jump), U8(27),
- B(LdaSmi), U8(3),
- B(Star), R(4),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(3),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
- B(Ldar), R(4),
- B(StaContextSlot), R(context), U8(4),
- B(PopContext), R(3),
- B(LdaSmi), U8(4),
- B(Star), R(4),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(4),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
- B(Ldar), R(4),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaConstant), U8(0),
+ B(Star), R(4),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
+ B(PushContext), R(3),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(Star), R(0),
+ /* 76 S> */ B(LdaSmi), U8(2),
+ /* 76 E> */ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(1),
+ /* 118 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(JumpIfToBooleanFalse), U8(6),
+ /* 125 S> */ B(PopContext), R(3),
+ B(Jump), U8(27),
+ /* 142 S> */ B(LdaSmi), U8(3),
+ /* 144 E> */ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Ldar), R(4),
+ B(StaContextSlot), R(context), U8(4),
+ B(PopContext), R(3),
+ /* 155 S> */ B(LdaSmi), U8(4),
+ /* 157 E> */ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(4),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Ldar), R(4),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 162 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden b/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
index 04bc3a9..0d8624b 100644
--- a/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
@@ -18,13 +18,13 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(1),
- B(LdaGlobal), U8(0), U8(3),
- B(Star), R(0),
- B(Call), R(0), R(1), U8(1), U8(1),
- B(Return),
+ /* 27 E> */ B(StackCheck),
+ /* 32 S> */ B(LdaUndefined),
+ B(Star), R(1),
+ B(LdaGlobal), U8(0), U8(3),
+ B(Star), R(0),
+ /* 39 E> */ B(Call), R(0), R(1), U8(1), U8(1),
+ /* 44 S> */ B(Return),
]
constant pool: [
"t",
@@ -42,19 +42,19 @@
parameter count: 1
bytecode array length: 27
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(1),
- B(LdaGlobal), U8(0), U8(3),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(Star), R(3),
- B(LdaSmi), U8(3),
- B(Star), R(4),
- B(Call), R(0), R(1), U8(4), U8(1),
- B(Return),
+ /* 34 E> */ B(StackCheck),
+ /* 39 S> */ B(LdaUndefined),
+ B(Star), R(1),
+ B(LdaGlobal), U8(0), U8(3),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(3),
+ B(Star), R(4),
+ /* 46 E> */ B(Call), R(0), R(1), U8(4), U8(1),
+ /* 58 S> */ B(Return),
]
constant pool: [
"t",
diff --git a/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden b/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
index 30b69d3..0ab5fcb 100644
--- a/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
@@ -11,41 +11,43 @@
snippet: "
g = function(){}; eval(''); return g();
"
-frame size: 9
+frame size: 10
parameter count: 1
-bytecode array length: 85
+bytecode array length: 89
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(StaLookupSlotSloppy), U8(1),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(LdaConstant), U8(3),
- B(Star), R(3),
- B(Mov), R(1), R(4),
- B(Mov), R(3), R(5),
- B(Mov), R(closure), R(6),
- B(LdaZero),
- B(Star), R(7),
- B(LdaSmi), U8(30),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(5),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(2), U8(0),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(Call), R(1), R(2), U8(1), U8(3),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 36 E> */ B(StaLookupSlotSloppy), U8(1),
+ /* 52 S> */ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ B(LdaConstant), U8(3),
+ B(Star), R(3),
+ B(Mov), R(1), R(4),
+ B(Mov), R(3), R(5),
+ B(Mov), R(closure), R(6),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaSmi), U8(30),
+ B(Star), R(8),
+ B(LdaSmi), U8(52),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
+ B(Star), R(1),
+ /* 52 E> */ B(Call), R(1), R(2), U8(2), U8(0),
+ /* 62 S> */ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ /* 69 E> */ B(Call), R(1), R(2), U8(1), U8(3),
+ /* 74 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CallNew.golden b/test/cctest/interpreter/bytecode_expectations/CallNew.golden
index 4952c73..79dd5c1 100644
--- a/test/cctest/interpreter/bytecode_expectations/CallNew.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CallNew.golden
@@ -18,11 +18,11 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(2),
- B(Star), R(0),
- B(New), R(0), R(0), U8(0),
- B(Return),
+ /* 45 E> */ B(StackCheck),
+ /* 50 S> */ B(LdaGlobal), U8(0), U8(2),
+ B(Star), R(0),
+ /* 57 E> */ B(New), R(0), R(0), U8(0),
+ /* 68 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -40,14 +40,14 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(2),
- B(Star), R(0),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Ldar), R(0),
- B(New), R(0), R(1), U8(1),
- B(Return),
+ /* 58 E> */ B(StackCheck),
+ /* 63 S> */ B(LdaGlobal), U8(0), U8(2),
+ B(Star), R(0),
+ B(LdaSmi), U8(3),
+ B(Star), R(1),
+ /* 70 E> */ B(Ldar), R(0),
+ B(New), R(0), R(1), U8(1),
+ /* 82 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -70,18 +70,18 @@
parameter count: 1
bytecode array length: 25
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(2),
- B(Star), R(0),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(LdaSmi), U8(4),
- B(Star), R(2),
- B(LdaSmi), U8(5),
- B(Star), R(3),
- B(Ldar), R(0),
- B(New), R(0), R(1), U8(3),
- B(Return),
+ /* 100 E> */ B(StackCheck),
+ /* 105 S> */ B(LdaGlobal), U8(0), U8(2),
+ B(Star), R(0),
+ B(LdaSmi), U8(3),
+ B(Star), R(1),
+ B(LdaSmi), U8(4),
+ B(Star), R(2),
+ B(LdaSmi), U8(5),
+ B(Star), R(3),
+ /* 112 E> */ B(Ldar), R(0),
+ B(New), R(0), R(1), U8(3),
+ /* 130 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden b/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
index ec10e67..69edecc 100644
--- a/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
@@ -17,10 +17,10 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0),
+ B(LdaUndefined),
+ /* 26 S> */ B(Return),
]
constant pool: [
]
@@ -36,11 +36,11 @@
parameter count: 2
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kIsArray), R(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kIsArray), R(0), U8(1),
+ /* 35 S> */ B(Return),
]
constant pool: [
]
@@ -56,13 +56,13 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kAdd), R(0), U8(2),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaSmi), U8(1),
+ B(Star), R(0),
+ B(LdaSmi), U8(2),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kAdd), R(0), U8(2),
+ /* 33 S> */ B(Return),
]
constant pool: [
]
@@ -78,13 +78,13 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(1),
- B(CallJSRuntime), U8(115), R(0), U8(2),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaUndefined),
+ B(Star), R(0),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(1),
+ B(CallJSRuntime), U8(122), R(0), U8(2),
+ /* 44 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden b/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
index 6869c5b..abe5b29 100644
--- a/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
@@ -26,30 +26,30 @@
parameter count: 1
bytecode array length: 57
bytecodes: [
- B(Ldar), R(closure),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(this),
- B(Star), R(3),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
- B(Star), R(6),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(6), U8(3),
- B(Star), R(4),
- B(LdaConstant), U8(2),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
- B(Mov), R(3), R(2),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(1), U8(1),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Add), R(3),
- B(Return),
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ /* 99 E> */ B(StackCheck),
+ /* 104 S> */ B(Ldar), R(this),
+ B(Star), R(3),
+ /* 111 E> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
+ B(Star), R(6),
+ /* 111 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(6), U8(3),
+ B(Star), R(4),
+ B(LdaConstant), U8(2),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
+ B(Mov), R(3), R(2),
+ B(Star), R(1),
+ /* 117 E> */ B(Call), R(1), R(2), U8(1), U8(1),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Add), R(3),
+ /* 131 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -78,40 +78,40 @@
parameter count: 1
bytecode array length: 80
bytecodes: [
- B(Ldar), R(closure),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(this),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
- B(Star), R(5),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(5), U8(1),
- B(Star), R(2),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(LdaSmi), U8(2),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
- B(Ldar), R(this),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(Star), R(4),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(4), U8(3),
- B(Star), R(2),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3),
- B(Return),
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ /* 125 E> */ B(StackCheck),
+ /* 130 S> */ B(Ldar), R(this),
+ B(Star), R(1),
+ /* 130 E> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Star), R(5),
+ /* 130 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(5), U8(1),
+ B(Star), R(2),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(2),
+ /* 138 E> */ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
+ /* 143 S> */ B(Ldar), R(this),
+ B(Star), R(1),
+ /* 150 E> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(4),
+ /* 150 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(4), U8(3),
+ B(Star), R(2),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3),
+ /* 159 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -138,49 +138,49 @@
parameter count: 1
bytecode array length: 106
bytecodes: [
- B(Ldar), R(closure),
- B(Star), R(1),
- B(Ldar), R(new_target),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(1),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(New), R(2), R(3), U8(1),
- B(Star), R(2),
- B(Ldar), R(this),
- B(JumpIfNotHole), U8(4),
- B(Jump), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Ldar), R(2),
- B(Star), R(this),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(StoreICStrict), R(2), U8(3), U8(4),
- B(Ldar), R(this),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Return),
+ B(Ldar), R(closure),
+ B(Star), R(1),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ /* 113 E> */ B(StackCheck),
+ /* 118 S> */ B(Ldar), R(1),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ /* 118 E> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ /* 118 E> */ B(New), R(2), R(3), U8(1),
+ /* 118 E> */ B(Star), R(2),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(4),
+ B(Jump), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(this),
+ /* 128 S> */ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ /* 136 E> */ B(StoreICStrict), R(2), U8(3), U8(4),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ /* 141 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -208,47 +208,47 @@
parameter count: 1
bytecode array length: 102
bytecodes: [
- B(Ldar), R(closure),
- B(Star), R(1),
- B(Ldar), R(new_target),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(1),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
- B(Star), R(2),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(New), R(2), R(0), U8(0),
- B(Star), R(2),
- B(Ldar), R(this),
- B(JumpIfNotHole), U8(4),
- B(Jump), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Ldar), R(2),
- B(Star), R(this),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(StoreICStrict), R(2), U8(3), U8(4),
- B(Ldar), R(this),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Return),
+ B(Ldar), R(closure),
+ B(Star), R(1),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ /* 112 E> */ B(StackCheck),
+ /* 117 S> */ B(Ldar), R(1),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
+ B(Star), R(2),
+ /* 117 E> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ /* 117 E> */ B(New), R(2), R(0), U8(0),
+ /* 117 E> */ B(Star), R(2),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(4),
+ B(Jump), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(this),
+ /* 126 S> */ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ /* 134 E> */ B(StoreICStrict), R(2), U8(3), U8(4),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ /* 139 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
index db42c50..6947a27 100644
--- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
@@ -18,38 +18,38 @@
parameter count: 1
bytecode array length: 73
bytecodes: [
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(LdaTheHole),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(2),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(3),
- B(LdaSmi), U8(34),
- B(Star), R(4),
- B(Wide), B(LdaSmi), U16(148),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
- B(Star), R(2),
- B(LoadIC), R(2), U8(1), U8(1),
- B(Star), R(3),
- B(Mov), R(3), R(4),
- B(LdaConstant), U8(2),
- B(Star), R(5),
- B(CreateClosure), U8(3), U8(0),
- B(Star), R(6),
- B(LdaSmi), U8(2),
- B(Star), R(7),
- B(LdaZero),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
- B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(2), U8(2),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 30 E> */ B(StackCheck),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(3),
+ B(LdaSmi), U8(34),
+ B(Star), R(4),
+ B(Wide), B(LdaSmi), U16(148),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
+ B(Star), R(2),
+ B(LoadIC), R(2), U8(1), U8(1),
+ B(Star), R(3),
+ B(Mov), R(3), R(4),
+ B(LdaConstant), U8(2),
+ B(Star), R(5),
+ B(CreateClosure), U8(3), U8(0),
+ B(Star), R(6),
+ B(LdaSmi), U8(2),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
+ B(Star), R(0),
+ /* 34 E> */ B(Star), R(1),
+ B(LdaUndefined),
+ /* 149 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -71,38 +71,38 @@
parameter count: 1
bytecode array length: 73
bytecodes: [
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(LdaTheHole),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(2),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(3),
- B(LdaSmi), U8(34),
- B(Star), R(4),
- B(Wide), B(LdaSmi), U16(148),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
- B(Star), R(2),
- B(LoadIC), R(2), U8(1), U8(1),
- B(Star), R(3),
- B(Mov), R(3), R(4),
- B(LdaConstant), U8(2),
- B(Star), R(5),
- B(CreateClosure), U8(3), U8(0),
- B(Star), R(6),
- B(LdaSmi), U8(2),
- B(Star), R(7),
- B(LdaZero),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
- B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(2), U8(2),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 30 E> */ B(StackCheck),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(3),
+ B(LdaSmi), U8(34),
+ B(Star), R(4),
+ B(Wide), B(LdaSmi), U16(148),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
+ B(Star), R(2),
+ B(LoadIC), R(2), U8(1), U8(1),
+ B(Star), R(3),
+ B(Mov), R(3), R(4),
+ B(LdaConstant), U8(2),
+ B(Star), R(5),
+ B(CreateClosure), U8(3), U8(0),
+ B(Star), R(6),
+ B(LdaSmi), U8(2),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
+ B(Star), R(0),
+ /* 34 E> */ B(Star), R(1),
+ B(LdaUndefined),
+ /* 149 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -126,58 +126,58 @@
parameter count: 1
bytecode array length: 127
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(2),
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(StaContextSlot), R(context), U8(4),
- B(LdaConstant), U8(1),
- B(StaContextSlot), R(context), U8(5),
- B(LdaTheHole),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(3),
- B(CreateClosure), U8(2), U8(0),
- B(Star), R(4),
- B(LdaSmi), U8(62),
- B(Star), R(5),
- B(Wide), B(LdaSmi), U16(128),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
- B(Star), R(3),
- B(LoadIC), R(3), U8(3), U8(1),
- B(Star), R(4),
- B(Mov), R(4), R(5),
- B(LdaContextSlot), R(context), U8(4),
- B(ToName),
- B(Star), R(6),
- B(CreateClosure), U8(4), U8(0),
- B(Star), R(7),
- B(LdaSmi), U8(2),
- B(Star), R(8),
- B(LdaSmi), U8(1),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
- B(Mov), R(3), R(5),
- B(LdaContextSlot), R(context), U8(5),
- B(ToName),
- B(Star), R(6),
- B(LdaConstant), U8(3),
- B(TestEqualStrict), R(6),
- B(JumpIfFalse), U8(7),
- B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
- B(CreateClosure), U8(5), U8(0),
- B(Star), R(7),
- B(LdaSmi), U8(1),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
- B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 30 E> */ B(StackCheck),
+ /* 43 S> */ B(LdaConstant), U8(0),
+ /* 43 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 57 S> */ B(LdaConstant), U8(1),
+ /* 57 E> */ B(StaContextSlot), R(context), U8(5),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(3),
+ B(CreateClosure), U8(2), U8(0),
+ B(Star), R(4),
+ B(LdaSmi), U8(62),
+ B(Star), R(5),
+ B(Wide), B(LdaSmi), U16(128),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(3), U8(1),
+ B(Star), R(4),
+ B(Mov), R(4), R(5),
+ /* 75 E> */ B(LdaContextSlot), R(context), U8(4),
+ B(ToName),
+ B(Star), R(6),
+ B(CreateClosure), U8(4), U8(0),
+ B(Star), R(7),
+ B(LdaSmi), U8(2),
+ B(Star), R(8),
+ B(LdaSmi), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
+ B(Mov), R(3), R(5),
+ /* 106 E> */ B(LdaContextSlot), R(context), U8(5),
+ B(ToName),
+ B(Star), R(6),
+ B(LdaConstant), U8(3),
+ B(TestEqualStrict), R(6),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+ B(CreateClosure), U8(5), U8(0),
+ B(Star), R(7),
+ B(LdaSmi), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(0),
+ /* 62 E> */ B(Star), R(1),
+ B(LdaUndefined),
+ /* 129 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -196,41 +196,41 @@
class C { constructor() { count++; }}
return new C();
"
-frame size: 10
+frame size: 7
parameter count: 1
bytecode array length: 74
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(2),
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(4),
- B(LdaTheHole),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(3),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(4),
- B(LdaSmi), U8(49),
- B(Star), R(5),
- B(LdaSmi), U8(86),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
- B(Star), R(3),
- B(LoadIC), R(3), U8(1), U8(1),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2),
- B(Star), R(0),
- B(Star), R(1),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(2),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
- B(Star), R(3),
- B(New), R(3), R(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 30 E> */ B(StackCheck),
+ /* 46 S> */ B(LdaZero),
+ /* 46 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(3),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(4),
+ B(LdaSmi), U8(49),
+ B(Star), R(5),
+ B(LdaSmi), U8(86),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(1), U8(1),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(0),
+ /* 49 E> */ B(Star), R(1),
+ /* 87 S> */ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(3),
+ /* 94 E> */ B(New), R(3), R(0), U8(0),
+ /* 103 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden b/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
index ccabedc..374a203 100644
--- a/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
@@ -15,15 +15,15 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Add), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(Add), R(1),
+ /* 47 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 53 S> */ B(Return),
]
constant pool: [
]
@@ -38,15 +38,15 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Div), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(Div), R(1),
+ /* 47 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 53 S> */ B(Return),
]
constant pool: [
]
@@ -61,18 +61,18 @@
parameter count: 1
bytecode array length: 27
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(1), U8(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(Mul), R(2),
- B(StoreICSloppy), R(1), U8(1), U8(3),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(Star), R(1),
+ B(LoadIC), R(1), U8(1), U8(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ B(Mul), R(2),
+ /* 61 E> */ B(StoreICSloppy), R(1), U8(1), U8(3),
+ B(LdaUndefined),
+ /* 67 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -89,20 +89,20 @@
parameter count: 1
bytecode array length: 30
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(KeyedLoadIC), R(1), U8(1),
- B(Star), R(3),
- B(LdaSmi), U8(2),
- B(BitwiseXor), R(3),
- B(KeyedStoreICSloppy), R(1), R(2), U8(3),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 52 S> */ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ B(KeyedLoadIC), R(1), U8(1),
+ B(Star), R(3),
+ B(LdaSmi), U8(2),
+ B(BitwiseXor), R(3),
+ /* 57 E> */ B(KeyedStoreICSloppy), R(1), R(2), U8(3),
+ B(LdaUndefined),
+ /* 63 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -118,19 +118,19 @@
parameter count: 1
bytecode array length: 30
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(1),
- B(LdaSmi), U8(24),
- B(BitwiseOr), R(1),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 45 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 75 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(1),
+ B(LdaSmi), U8(24),
+ B(BitwiseOr), R(1),
+ /* 77 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 84 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/Conditional.golden b/test/cctest/interpreter/bytecode_expectations/Conditional.golden
index 17327a5..e051d45 100644
--- a/test/cctest/interpreter/bytecode_expectations/Conditional.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Conditional.golden
@@ -15,13 +15,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(JumpIfToBooleanFalse), U8(6),
- B(LdaSmi), U8(2),
- B(Jump), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(1),
+ B(JumpIfToBooleanFalse), U8(6),
+ B(LdaSmi), U8(2),
+ B(Jump), U8(4),
+ B(LdaSmi), U8(3),
+ /* 52 S> */ B(Return),
]
constant pool: [
]
@@ -36,17 +36,17 @@
parameter count: 1
bytecode array length: 20
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(JumpIfToBooleanFalse), U8(14),
- B(LdaSmi), U8(2),
- B(JumpIfToBooleanFalse), U8(6),
- B(LdaSmi), U8(3),
- B(Jump), U8(4),
- B(LdaSmi), U8(4),
- B(Jump), U8(4),
- B(LdaSmi), U8(5),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(1),
+ B(JumpIfToBooleanFalse), U8(14),
+ B(LdaSmi), U8(2),
+ B(JumpIfToBooleanFalse), U8(6),
+ B(LdaSmi), U8(3),
+ B(Jump), U8(4),
+ B(LdaSmi), U8(4),
+ B(Jump), U8(4),
+ B(LdaSmi), U8(5),
+ /* 60 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden b/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
index d3fb484..505d3e8 100644
--- a/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
@@ -15,13 +15,13 @@
parameter count: 1
bytecode array length: 10
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 48 S> */ B(Return),
]
constant pool: [
]
@@ -36,16 +36,16 @@
parameter count: 1
bytecode array length: 20
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(Star), R(0),
+ /* 48 S> */ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
+ /* 58 S> */ B(Return),
]
constant pool: [
"x",
@@ -61,21 +61,21 @@
parameter count: 1
bytecode array length: 32
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
- B(Ldar), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 48 S> */ B(LdaSmi), U8(20),
+ /* 48 E> */ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
+ B(Ldar), R(1),
+ B(Star), R(0),
+ /* 48 E> */ B(LdaUndefined),
+ /* 55 S> */ B(Return),
]
constant pool: [
"x",
@@ -91,23 +91,23 @@
parameter count: 1
bytecode array length: 36
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
- B(Ldar), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(Star), R(0),
+ /* 48 S> */ B(LdaSmi), U8(20),
+ /* 50 E> */ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
+ B(Ldar), R(1),
+ B(Star), R(0),
+ B(LdaUndefined),
+ /* 56 S> */ B(Return),
]
constant pool: [
"x",
diff --git a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
index 3b445c1..6087101 100644
--- a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
@@ -15,17 +15,17 @@
parameter count: 1
bytecode array length: 24
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 74 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -41,21 +41,21 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 74 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ /* 84 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -72,26 +72,26 @@
parameter count: 1
bytecode array length: 50
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(20),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
- B(Ldar), R(2),
- B(StaContextSlot), R(context), U8(4),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 47 S> */ B(LdaSmi), U8(20),
+ /* 47 E> */ B(Star), R(2),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
+ B(Ldar), R(2),
+ B(StaContextSlot), R(context), U8(4),
+ /* 47 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -108,27 +108,27 @@
parameter count: 1
bytecode array length: 52
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaSmi), U8(20),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
- B(Ldar), R(2),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(10),
+ /* 44 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 48 S> */ B(LdaSmi), U8(20),
+ /* 50 E> */ B(Star), R(2),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
+ B(Ldar), R(2),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 82 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden b/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
index fb74600..72b731e 100644
--- a/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
@@ -17,13 +17,13 @@
parameter count: 2
bytecode array length: 17
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(arg0),
- B(StaContextSlot), R(context), U8(4),
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(arg0),
+ B(StaContextSlot), R(context), U8(4),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 52 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -40,15 +40,15 @@
parameter count: 2
bytecode array length: 22
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(Ldar), R(arg0),
- B(StaContextSlot), R(context), U8(4),
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(LdaContextSlot), R(context), U8(4),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(Ldar), R(arg0),
+ B(StaContextSlot), R(context), U8(4),
+ /* 10 E> */ B(StackCheck),
+ /* 27 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 27 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaContextSlot), R(context), U8(4),
+ /* 66 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -65,15 +65,15 @@
parameter count: 5
bytecode array length: 22
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(arg0),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(arg2),
- B(StaContextSlot), R(context), U8(4),
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(arg0),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(arg2),
+ B(StaContextSlot), R(context), U8(4),
+ /* 10 E> */ B(StackCheck),
+ /* 29 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 61 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -90,13 +90,13 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 26 S> */ B(Ldar), R(this),
+ /* 26 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 32 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 65 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
index b86e22b..ac5c042 100644
--- a/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
@@ -15,11 +15,11 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 71 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -35,13 +35,13 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 45 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 75 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -57,15 +57,15 @@
parameter count: 1
bytecode array length: 22
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(LdaSmi), U8(2),
- B(StaContextSlot), R(context), U8(5),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 53 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(StaContextSlot), R(context), U8(5),
+ /* 56 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 92 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -81,16 +81,16 @@
parameter count: 1
bytecode array length: 25
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(2),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(1), U8(1),
- B(LdaContextSlot), R(context), U8(4),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(LdaUndefined),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(1),
+ /* 64 E> */ B(Call), R(1), R(2), U8(1), U8(1),
+ /* 68 S> */ B(LdaContextSlot), R(context), U8(4),
+ /* 78 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -108,26 +108,26 @@
parameter count: 1
bytecode array length: 47
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(Ldar), R(closure),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kPushBlockContext), R(2), U8(2),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(LdaSmi), U8(2),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(1), U8(0),
- B(PopContext), R(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ /* 30 E> */ B(StackCheck),
+ /* 56 S> */ B(LdaSmi), U8(1),
+ /* 56 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(Ldar), R(closure),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(2), U8(2),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ /* 69 S> */ B(LdaSmi), U8(2),
+ /* 69 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 72 S> */ B(CreateClosure), U8(1), U8(0),
+ B(PopContext), R(0),
+ /* 104 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -396,522 +396,522 @@
parameter count: 1
bytecode array length: 1046
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateUnmappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(7),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(8),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(9),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(10),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(11),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(12),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(13),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(14),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(15),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(16),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(17),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(18),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(19),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(20),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(21),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(22),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(23),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(24),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(25),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(26),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(27),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(28),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(29),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(30),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(31),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(32),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(33),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(34),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(35),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(36),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(37),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(38),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(39),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(40),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(41),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(42),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(43),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(44),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(45),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(46),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(47),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(48),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(49),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(50),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(51),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(52),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(53),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(54),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(55),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(56),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(57),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(58),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(59),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(60),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(61),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(62),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(63),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(64),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(65),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(66),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(67),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(68),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(69),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(70),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(71),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(72),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(73),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(74),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(75),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(76),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(77),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(78),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(79),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(80),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(81),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(82),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(83),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(84),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(85),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(86),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(87),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(88),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(89),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(90),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(91),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(92),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(93),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(94),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(95),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(96),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(97),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(98),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(99),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(100),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(101),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(102),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(103),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(104),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(105),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(106),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(107),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(108),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(109),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(110),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(111),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(112),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(113),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(114),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(115),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(116),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(117),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(118),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(119),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(120),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(121),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(122),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(123),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(124),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(125),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(126),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(127),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(128),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(129),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(130),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(131),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(132),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(133),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(134),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(135),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(136),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(137),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(138),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(139),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(140),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(141),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(142),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(143),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(144),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(145),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(146),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(147),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(148),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(149),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(150),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(151),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(152),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(153),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(154),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(155),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(156),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(157),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(158),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(159),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(160),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(161),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(162),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(163),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(164),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(165),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(166),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(167),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(168),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(169),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(170),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(171),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(172),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(173),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(174),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(175),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(176),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(177),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(178),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(179),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(180),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(181),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(182),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(183),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(184),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(185),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(186),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(187),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(188),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(189),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(190),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(191),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(192),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(193),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(194),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(195),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(196),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(197),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(198),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(199),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(200),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(201),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(202),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(203),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(204),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(205),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(206),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(207),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(208),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(209),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(210),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(211),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(212),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(213),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(214),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(215),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(216),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(217),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(218),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(219),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(220),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(221),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(222),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(223),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(224),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(225),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(226),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(227),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(228),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(229),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(230),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(231),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(232),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(233),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(234),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(235),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(236),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(237),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(238),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(239),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(240),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(241),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(242),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(243),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(244),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(245),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(246),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(247),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(248),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(249),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(250),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(251),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(252),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(253),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(254),
- B(LdaZero),
- B(StaContextSlot), R(context), U8(255),
- B(LdaUndefined),
- B(Star), R(2),
- B(LdaGlobal), U8(0), U8(1),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(1), U8(0),
- B(LdaSmi), U8(100),
- B(Wide), B(StaContextSlot), R16(context), U16(256),
- B(Wide), B(LdaContextSlot), R16(context), U16(256),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateUnmappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 57 S> */ B(LdaZero),
+ /* 57 E> */ B(StaContextSlot), R(context), U8(7),
+ /* 69 S> */ B(LdaZero),
+ /* 69 E> */ B(StaContextSlot), R(context), U8(8),
+ /* 81 S> */ B(LdaZero),
+ /* 81 E> */ B(StaContextSlot), R(context), U8(9),
+ /* 93 S> */ B(LdaZero),
+ /* 93 E> */ B(StaContextSlot), R(context), U8(10),
+ /* 105 S> */ B(LdaZero),
+ /* 105 E> */ B(StaContextSlot), R(context), U8(11),
+ /* 117 S> */ B(LdaZero),
+ /* 117 E> */ B(StaContextSlot), R(context), U8(12),
+ /* 129 S> */ B(LdaZero),
+ /* 129 E> */ B(StaContextSlot), R(context), U8(13),
+ /* 141 S> */ B(LdaZero),
+ /* 141 E> */ B(StaContextSlot), R(context), U8(14),
+ /* 153 S> */ B(LdaZero),
+ /* 153 E> */ B(StaContextSlot), R(context), U8(15),
+ /* 165 S> */ B(LdaZero),
+ /* 165 E> */ B(StaContextSlot), R(context), U8(16),
+ /* 178 S> */ B(LdaZero),
+ /* 178 E> */ B(StaContextSlot), R(context), U8(17),
+ /* 191 S> */ B(LdaZero),
+ /* 191 E> */ B(StaContextSlot), R(context), U8(18),
+ /* 204 S> */ B(LdaZero),
+ /* 204 E> */ B(StaContextSlot), R(context), U8(19),
+ /* 217 S> */ B(LdaZero),
+ /* 217 E> */ B(StaContextSlot), R(context), U8(20),
+ /* 230 S> */ B(LdaZero),
+ /* 230 E> */ B(StaContextSlot), R(context), U8(21),
+ /* 243 S> */ B(LdaZero),
+ /* 243 E> */ B(StaContextSlot), R(context), U8(22),
+ /* 256 S> */ B(LdaZero),
+ /* 256 E> */ B(StaContextSlot), R(context), U8(23),
+ /* 269 S> */ B(LdaZero),
+ /* 269 E> */ B(StaContextSlot), R(context), U8(24),
+ /* 282 S> */ B(LdaZero),
+ /* 282 E> */ B(StaContextSlot), R(context), U8(25),
+ /* 295 S> */ B(LdaZero),
+ /* 295 E> */ B(StaContextSlot), R(context), U8(26),
+ /* 308 S> */ B(LdaZero),
+ /* 308 E> */ B(StaContextSlot), R(context), U8(27),
+ /* 321 S> */ B(LdaZero),
+ /* 321 E> */ B(StaContextSlot), R(context), U8(28),
+ /* 334 S> */ B(LdaZero),
+ /* 334 E> */ B(StaContextSlot), R(context), U8(29),
+ /* 347 S> */ B(LdaZero),
+ /* 347 E> */ B(StaContextSlot), R(context), U8(30),
+ /* 360 S> */ B(LdaZero),
+ /* 360 E> */ B(StaContextSlot), R(context), U8(31),
+ /* 373 S> */ B(LdaZero),
+ /* 373 E> */ B(StaContextSlot), R(context), U8(32),
+ /* 386 S> */ B(LdaZero),
+ /* 386 E> */ B(StaContextSlot), R(context), U8(33),
+ /* 399 S> */ B(LdaZero),
+ /* 399 E> */ B(StaContextSlot), R(context), U8(34),
+ /* 412 S> */ B(LdaZero),
+ /* 412 E> */ B(StaContextSlot), R(context), U8(35),
+ /* 425 S> */ B(LdaZero),
+ /* 425 E> */ B(StaContextSlot), R(context), U8(36),
+ /* 438 S> */ B(LdaZero),
+ /* 438 E> */ B(StaContextSlot), R(context), U8(37),
+ /* 451 S> */ B(LdaZero),
+ /* 451 E> */ B(StaContextSlot), R(context), U8(38),
+ /* 464 S> */ B(LdaZero),
+ /* 464 E> */ B(StaContextSlot), R(context), U8(39),
+ /* 477 S> */ B(LdaZero),
+ /* 477 E> */ B(StaContextSlot), R(context), U8(40),
+ /* 490 S> */ B(LdaZero),
+ /* 490 E> */ B(StaContextSlot), R(context), U8(41),
+ /* 503 S> */ B(LdaZero),
+ /* 503 E> */ B(StaContextSlot), R(context), U8(42),
+ /* 516 S> */ B(LdaZero),
+ /* 516 E> */ B(StaContextSlot), R(context), U8(43),
+ /* 529 S> */ B(LdaZero),
+ /* 529 E> */ B(StaContextSlot), R(context), U8(44),
+ /* 542 S> */ B(LdaZero),
+ /* 542 E> */ B(StaContextSlot), R(context), U8(45),
+ /* 555 S> */ B(LdaZero),
+ /* 555 E> */ B(StaContextSlot), R(context), U8(46),
+ /* 568 S> */ B(LdaZero),
+ /* 568 E> */ B(StaContextSlot), R(context), U8(47),
+ /* 581 S> */ B(LdaZero),
+ /* 581 E> */ B(StaContextSlot), R(context), U8(48),
+ /* 594 S> */ B(LdaZero),
+ /* 594 E> */ B(StaContextSlot), R(context), U8(49),
+ /* 607 S> */ B(LdaZero),
+ /* 607 E> */ B(StaContextSlot), R(context), U8(50),
+ /* 620 S> */ B(LdaZero),
+ /* 620 E> */ B(StaContextSlot), R(context), U8(51),
+ /* 633 S> */ B(LdaZero),
+ /* 633 E> */ B(StaContextSlot), R(context), U8(52),
+ /* 646 S> */ B(LdaZero),
+ /* 646 E> */ B(StaContextSlot), R(context), U8(53),
+ /* 659 S> */ B(LdaZero),
+ /* 659 E> */ B(StaContextSlot), R(context), U8(54),
+ /* 672 S> */ B(LdaZero),
+ /* 672 E> */ B(StaContextSlot), R(context), U8(55),
+ /* 685 S> */ B(LdaZero),
+ /* 685 E> */ B(StaContextSlot), R(context), U8(56),
+ /* 698 S> */ B(LdaZero),
+ /* 698 E> */ B(StaContextSlot), R(context), U8(57),
+ /* 711 S> */ B(LdaZero),
+ /* 711 E> */ B(StaContextSlot), R(context), U8(58),
+ /* 724 S> */ B(LdaZero),
+ /* 724 E> */ B(StaContextSlot), R(context), U8(59),
+ /* 737 S> */ B(LdaZero),
+ /* 737 E> */ B(StaContextSlot), R(context), U8(60),
+ /* 750 S> */ B(LdaZero),
+ /* 750 E> */ B(StaContextSlot), R(context), U8(61),
+ /* 763 S> */ B(LdaZero),
+ /* 763 E> */ B(StaContextSlot), R(context), U8(62),
+ /* 776 S> */ B(LdaZero),
+ /* 776 E> */ B(StaContextSlot), R(context), U8(63),
+ /* 789 S> */ B(LdaZero),
+ /* 789 E> */ B(StaContextSlot), R(context), U8(64),
+ /* 802 S> */ B(LdaZero),
+ /* 802 E> */ B(StaContextSlot), R(context), U8(65),
+ /* 815 S> */ B(LdaZero),
+ /* 815 E> */ B(StaContextSlot), R(context), U8(66),
+ /* 828 S> */ B(LdaZero),
+ /* 828 E> */ B(StaContextSlot), R(context), U8(67),
+ /* 841 S> */ B(LdaZero),
+ /* 841 E> */ B(StaContextSlot), R(context), U8(68),
+ /* 854 S> */ B(LdaZero),
+ /* 854 E> */ B(StaContextSlot), R(context), U8(69),
+ /* 867 S> */ B(LdaZero),
+ /* 867 E> */ B(StaContextSlot), R(context), U8(70),
+ /* 880 S> */ B(LdaZero),
+ /* 880 E> */ B(StaContextSlot), R(context), U8(71),
+ /* 893 S> */ B(LdaZero),
+ /* 893 E> */ B(StaContextSlot), R(context), U8(72),
+ /* 906 S> */ B(LdaZero),
+ /* 906 E> */ B(StaContextSlot), R(context), U8(73),
+ /* 919 S> */ B(LdaZero),
+ /* 919 E> */ B(StaContextSlot), R(context), U8(74),
+ /* 932 S> */ B(LdaZero),
+ /* 932 E> */ B(StaContextSlot), R(context), U8(75),
+ /* 945 S> */ B(LdaZero),
+ /* 945 E> */ B(StaContextSlot), R(context), U8(76),
+ /* 958 S> */ B(LdaZero),
+ /* 958 E> */ B(StaContextSlot), R(context), U8(77),
+ /* 971 S> */ B(LdaZero),
+ /* 971 E> */ B(StaContextSlot), R(context), U8(78),
+ /* 984 S> */ B(LdaZero),
+ /* 984 E> */ B(StaContextSlot), R(context), U8(79),
+ /* 997 S> */ B(LdaZero),
+ /* 997 E> */ B(StaContextSlot), R(context), U8(80),
+ /* 1010 S> */ B(LdaZero),
+ /* 1010 E> */ B(StaContextSlot), R(context), U8(81),
+ /* 1023 S> */ B(LdaZero),
+ /* 1023 E> */ B(StaContextSlot), R(context), U8(82),
+ /* 1036 S> */ B(LdaZero),
+ /* 1036 E> */ B(StaContextSlot), R(context), U8(83),
+ /* 1049 S> */ B(LdaZero),
+ /* 1049 E> */ B(StaContextSlot), R(context), U8(84),
+ /* 1062 S> */ B(LdaZero),
+ /* 1062 E> */ B(StaContextSlot), R(context), U8(85),
+ /* 1075 S> */ B(LdaZero),
+ /* 1075 E> */ B(StaContextSlot), R(context), U8(86),
+ /* 1088 S> */ B(LdaZero),
+ /* 1088 E> */ B(StaContextSlot), R(context), U8(87),
+ /* 1101 S> */ B(LdaZero),
+ /* 1101 E> */ B(StaContextSlot), R(context), U8(88),
+ /* 1114 S> */ B(LdaZero),
+ /* 1114 E> */ B(StaContextSlot), R(context), U8(89),
+ /* 1127 S> */ B(LdaZero),
+ /* 1127 E> */ B(StaContextSlot), R(context), U8(90),
+ /* 1140 S> */ B(LdaZero),
+ /* 1140 E> */ B(StaContextSlot), R(context), U8(91),
+ /* 1153 S> */ B(LdaZero),
+ /* 1153 E> */ B(StaContextSlot), R(context), U8(92),
+ /* 1166 S> */ B(LdaZero),
+ /* 1166 E> */ B(StaContextSlot), R(context), U8(93),
+ /* 1179 S> */ B(LdaZero),
+ /* 1179 E> */ B(StaContextSlot), R(context), U8(94),
+ /* 1192 S> */ B(LdaZero),
+ /* 1192 E> */ B(StaContextSlot), R(context), U8(95),
+ /* 1205 S> */ B(LdaZero),
+ /* 1205 E> */ B(StaContextSlot), R(context), U8(96),
+ /* 1218 S> */ B(LdaZero),
+ /* 1218 E> */ B(StaContextSlot), R(context), U8(97),
+ /* 1231 S> */ B(LdaZero),
+ /* 1231 E> */ B(StaContextSlot), R(context), U8(98),
+ /* 1244 S> */ B(LdaZero),
+ /* 1244 E> */ B(StaContextSlot), R(context), U8(99),
+ /* 1257 S> */ B(LdaZero),
+ /* 1257 E> */ B(StaContextSlot), R(context), U8(100),
+ /* 1270 S> */ B(LdaZero),
+ /* 1270 E> */ B(StaContextSlot), R(context), U8(101),
+ /* 1283 S> */ B(LdaZero),
+ /* 1283 E> */ B(StaContextSlot), R(context), U8(102),
+ /* 1296 S> */ B(LdaZero),
+ /* 1296 E> */ B(StaContextSlot), R(context), U8(103),
+ /* 1309 S> */ B(LdaZero),
+ /* 1309 E> */ B(StaContextSlot), R(context), U8(104),
+ /* 1322 S> */ B(LdaZero),
+ /* 1322 E> */ B(StaContextSlot), R(context), U8(105),
+ /* 1335 S> */ B(LdaZero),
+ /* 1335 E> */ B(StaContextSlot), R(context), U8(106),
+ /* 1349 S> */ B(LdaZero),
+ /* 1349 E> */ B(StaContextSlot), R(context), U8(107),
+ /* 1363 S> */ B(LdaZero),
+ /* 1363 E> */ B(StaContextSlot), R(context), U8(108),
+ /* 1377 S> */ B(LdaZero),
+ /* 1377 E> */ B(StaContextSlot), R(context), U8(109),
+ /* 1391 S> */ B(LdaZero),
+ /* 1391 E> */ B(StaContextSlot), R(context), U8(110),
+ /* 1405 S> */ B(LdaZero),
+ /* 1405 E> */ B(StaContextSlot), R(context), U8(111),
+ /* 1419 S> */ B(LdaZero),
+ /* 1419 E> */ B(StaContextSlot), R(context), U8(112),
+ /* 1433 S> */ B(LdaZero),
+ /* 1433 E> */ B(StaContextSlot), R(context), U8(113),
+ /* 1447 S> */ B(LdaZero),
+ /* 1447 E> */ B(StaContextSlot), R(context), U8(114),
+ /* 1461 S> */ B(LdaZero),
+ /* 1461 E> */ B(StaContextSlot), R(context), U8(115),
+ /* 1475 S> */ B(LdaZero),
+ /* 1475 E> */ B(StaContextSlot), R(context), U8(116),
+ /* 1489 S> */ B(LdaZero),
+ /* 1489 E> */ B(StaContextSlot), R(context), U8(117),
+ /* 1503 S> */ B(LdaZero),
+ /* 1503 E> */ B(StaContextSlot), R(context), U8(118),
+ /* 1517 S> */ B(LdaZero),
+ /* 1517 E> */ B(StaContextSlot), R(context), U8(119),
+ /* 1531 S> */ B(LdaZero),
+ /* 1531 E> */ B(StaContextSlot), R(context), U8(120),
+ /* 1545 S> */ B(LdaZero),
+ /* 1545 E> */ B(StaContextSlot), R(context), U8(121),
+ /* 1559 S> */ B(LdaZero),
+ /* 1559 E> */ B(StaContextSlot), R(context), U8(122),
+ /* 1573 S> */ B(LdaZero),
+ /* 1573 E> */ B(StaContextSlot), R(context), U8(123),
+ /* 1587 S> */ B(LdaZero),
+ /* 1587 E> */ B(StaContextSlot), R(context), U8(124),
+ /* 1601 S> */ B(LdaZero),
+ /* 1601 E> */ B(StaContextSlot), R(context), U8(125),
+ /* 1615 S> */ B(LdaZero),
+ /* 1615 E> */ B(StaContextSlot), R(context), U8(126),
+ /* 1629 S> */ B(LdaZero),
+ /* 1629 E> */ B(StaContextSlot), R(context), U8(127),
+ /* 1643 S> */ B(LdaZero),
+ /* 1643 E> */ B(StaContextSlot), R(context), U8(128),
+ /* 1657 S> */ B(LdaZero),
+ /* 1657 E> */ B(StaContextSlot), R(context), U8(129),
+ /* 1671 S> */ B(LdaZero),
+ /* 1671 E> */ B(StaContextSlot), R(context), U8(130),
+ /* 1685 S> */ B(LdaZero),
+ /* 1685 E> */ B(StaContextSlot), R(context), U8(131),
+ /* 1699 S> */ B(LdaZero),
+ /* 1699 E> */ B(StaContextSlot), R(context), U8(132),
+ /* 1713 S> */ B(LdaZero),
+ /* 1713 E> */ B(StaContextSlot), R(context), U8(133),
+ /* 1727 S> */ B(LdaZero),
+ /* 1727 E> */ B(StaContextSlot), R(context), U8(134),
+ /* 1741 S> */ B(LdaZero),
+ /* 1741 E> */ B(StaContextSlot), R(context), U8(135),
+ /* 1755 S> */ B(LdaZero),
+ /* 1755 E> */ B(StaContextSlot), R(context), U8(136),
+ /* 1769 S> */ B(LdaZero),
+ /* 1769 E> */ B(StaContextSlot), R(context), U8(137),
+ /* 1783 S> */ B(LdaZero),
+ /* 1783 E> */ B(StaContextSlot), R(context), U8(138),
+ /* 1797 S> */ B(LdaZero),
+ /* 1797 E> */ B(StaContextSlot), R(context), U8(139),
+ /* 1811 S> */ B(LdaZero),
+ /* 1811 E> */ B(StaContextSlot), R(context), U8(140),
+ /* 1825 S> */ B(LdaZero),
+ /* 1825 E> */ B(StaContextSlot), R(context), U8(141),
+ /* 1839 S> */ B(LdaZero),
+ /* 1839 E> */ B(StaContextSlot), R(context), U8(142),
+ /* 1853 S> */ B(LdaZero),
+ /* 1853 E> */ B(StaContextSlot), R(context), U8(143),
+ /* 1867 S> */ B(LdaZero),
+ /* 1867 E> */ B(StaContextSlot), R(context), U8(144),
+ /* 1881 S> */ B(LdaZero),
+ /* 1881 E> */ B(StaContextSlot), R(context), U8(145),
+ /* 1895 S> */ B(LdaZero),
+ /* 1895 E> */ B(StaContextSlot), R(context), U8(146),
+ /* 1909 S> */ B(LdaZero),
+ /* 1909 E> */ B(StaContextSlot), R(context), U8(147),
+ /* 1923 S> */ B(LdaZero),
+ /* 1923 E> */ B(StaContextSlot), R(context), U8(148),
+ /* 1937 S> */ B(LdaZero),
+ /* 1937 E> */ B(StaContextSlot), R(context), U8(149),
+ /* 1951 S> */ B(LdaZero),
+ /* 1951 E> */ B(StaContextSlot), R(context), U8(150),
+ /* 1965 S> */ B(LdaZero),
+ /* 1965 E> */ B(StaContextSlot), R(context), U8(151),
+ /* 1979 S> */ B(LdaZero),
+ /* 1979 E> */ B(StaContextSlot), R(context), U8(152),
+ /* 1993 S> */ B(LdaZero),
+ /* 1993 E> */ B(StaContextSlot), R(context), U8(153),
+ /* 2007 S> */ B(LdaZero),
+ /* 2007 E> */ B(StaContextSlot), R(context), U8(154),
+ /* 2021 S> */ B(LdaZero),
+ /* 2021 E> */ B(StaContextSlot), R(context), U8(155),
+ /* 2035 S> */ B(LdaZero),
+ /* 2035 E> */ B(StaContextSlot), R(context), U8(156),
+ /* 2049 S> */ B(LdaZero),
+ /* 2049 E> */ B(StaContextSlot), R(context), U8(157),
+ /* 2063 S> */ B(LdaZero),
+ /* 2063 E> */ B(StaContextSlot), R(context), U8(158),
+ /* 2077 S> */ B(LdaZero),
+ /* 2077 E> */ B(StaContextSlot), R(context), U8(159),
+ /* 2091 S> */ B(LdaZero),
+ /* 2091 E> */ B(StaContextSlot), R(context), U8(160),
+ /* 2105 S> */ B(LdaZero),
+ /* 2105 E> */ B(StaContextSlot), R(context), U8(161),
+ /* 2119 S> */ B(LdaZero),
+ /* 2119 E> */ B(StaContextSlot), R(context), U8(162),
+ /* 2133 S> */ B(LdaZero),
+ /* 2133 E> */ B(StaContextSlot), R(context), U8(163),
+ /* 2147 S> */ B(LdaZero),
+ /* 2147 E> */ B(StaContextSlot), R(context), U8(164),
+ /* 2161 S> */ B(LdaZero),
+ /* 2161 E> */ B(StaContextSlot), R(context), U8(165),
+ /* 2175 S> */ B(LdaZero),
+ /* 2175 E> */ B(StaContextSlot), R(context), U8(166),
+ /* 2189 S> */ B(LdaZero),
+ /* 2189 E> */ B(StaContextSlot), R(context), U8(167),
+ /* 2203 S> */ B(LdaZero),
+ /* 2203 E> */ B(StaContextSlot), R(context), U8(168),
+ /* 2217 S> */ B(LdaZero),
+ /* 2217 E> */ B(StaContextSlot), R(context), U8(169),
+ /* 2231 S> */ B(LdaZero),
+ /* 2231 E> */ B(StaContextSlot), R(context), U8(170),
+ /* 2245 S> */ B(LdaZero),
+ /* 2245 E> */ B(StaContextSlot), R(context), U8(171),
+ /* 2259 S> */ B(LdaZero),
+ /* 2259 E> */ B(StaContextSlot), R(context), U8(172),
+ /* 2273 S> */ B(LdaZero),
+ /* 2273 E> */ B(StaContextSlot), R(context), U8(173),
+ /* 2287 S> */ B(LdaZero),
+ /* 2287 E> */ B(StaContextSlot), R(context), U8(174),
+ /* 2301 S> */ B(LdaZero),
+ /* 2301 E> */ B(StaContextSlot), R(context), U8(175),
+ /* 2315 S> */ B(LdaZero),
+ /* 2315 E> */ B(StaContextSlot), R(context), U8(176),
+ /* 2329 S> */ B(LdaZero),
+ /* 2329 E> */ B(StaContextSlot), R(context), U8(177),
+ /* 2343 S> */ B(LdaZero),
+ /* 2343 E> */ B(StaContextSlot), R(context), U8(178),
+ /* 2357 S> */ B(LdaZero),
+ /* 2357 E> */ B(StaContextSlot), R(context), U8(179),
+ /* 2371 S> */ B(LdaZero),
+ /* 2371 E> */ B(StaContextSlot), R(context), U8(180),
+ /* 2385 S> */ B(LdaZero),
+ /* 2385 E> */ B(StaContextSlot), R(context), U8(181),
+ /* 2399 S> */ B(LdaZero),
+ /* 2399 E> */ B(StaContextSlot), R(context), U8(182),
+ /* 2413 S> */ B(LdaZero),
+ /* 2413 E> */ B(StaContextSlot), R(context), U8(183),
+ /* 2427 S> */ B(LdaZero),
+ /* 2427 E> */ B(StaContextSlot), R(context), U8(184),
+ /* 2441 S> */ B(LdaZero),
+ /* 2441 E> */ B(StaContextSlot), R(context), U8(185),
+ /* 2455 S> */ B(LdaZero),
+ /* 2455 E> */ B(StaContextSlot), R(context), U8(186),
+ /* 2469 S> */ B(LdaZero),
+ /* 2469 E> */ B(StaContextSlot), R(context), U8(187),
+ /* 2483 S> */ B(LdaZero),
+ /* 2483 E> */ B(StaContextSlot), R(context), U8(188),
+ /* 2497 S> */ B(LdaZero),
+ /* 2497 E> */ B(StaContextSlot), R(context), U8(189),
+ /* 2511 S> */ B(LdaZero),
+ /* 2511 E> */ B(StaContextSlot), R(context), U8(190),
+ /* 2525 S> */ B(LdaZero),
+ /* 2525 E> */ B(StaContextSlot), R(context), U8(191),
+ /* 2539 S> */ B(LdaZero),
+ /* 2539 E> */ B(StaContextSlot), R(context), U8(192),
+ /* 2553 S> */ B(LdaZero),
+ /* 2553 E> */ B(StaContextSlot), R(context), U8(193),
+ /* 2567 S> */ B(LdaZero),
+ /* 2567 E> */ B(StaContextSlot), R(context), U8(194),
+ /* 2581 S> */ B(LdaZero),
+ /* 2581 E> */ B(StaContextSlot), R(context), U8(195),
+ /* 2595 S> */ B(LdaZero),
+ /* 2595 E> */ B(StaContextSlot), R(context), U8(196),
+ /* 2609 S> */ B(LdaZero),
+ /* 2609 E> */ B(StaContextSlot), R(context), U8(197),
+ /* 2623 S> */ B(LdaZero),
+ /* 2623 E> */ B(StaContextSlot), R(context), U8(198),
+ /* 2637 S> */ B(LdaZero),
+ /* 2637 E> */ B(StaContextSlot), R(context), U8(199),
+ /* 2651 S> */ B(LdaZero),
+ /* 2651 E> */ B(StaContextSlot), R(context), U8(200),
+ /* 2665 S> */ B(LdaZero),
+ /* 2665 E> */ B(StaContextSlot), R(context), U8(201),
+ /* 2679 S> */ B(LdaZero),
+ /* 2679 E> */ B(StaContextSlot), R(context), U8(202),
+ /* 2693 S> */ B(LdaZero),
+ /* 2693 E> */ B(StaContextSlot), R(context), U8(203),
+ /* 2707 S> */ B(LdaZero),
+ /* 2707 E> */ B(StaContextSlot), R(context), U8(204),
+ /* 2721 S> */ B(LdaZero),
+ /* 2721 E> */ B(StaContextSlot), R(context), U8(205),
+ /* 2735 S> */ B(LdaZero),
+ /* 2735 E> */ B(StaContextSlot), R(context), U8(206),
+ /* 2749 S> */ B(LdaZero),
+ /* 2749 E> */ B(StaContextSlot), R(context), U8(207),
+ /* 2763 S> */ B(LdaZero),
+ /* 2763 E> */ B(StaContextSlot), R(context), U8(208),
+ /* 2777 S> */ B(LdaZero),
+ /* 2777 E> */ B(StaContextSlot), R(context), U8(209),
+ /* 2791 S> */ B(LdaZero),
+ /* 2791 E> */ B(StaContextSlot), R(context), U8(210),
+ /* 2805 S> */ B(LdaZero),
+ /* 2805 E> */ B(StaContextSlot), R(context), U8(211),
+ /* 2819 S> */ B(LdaZero),
+ /* 2819 E> */ B(StaContextSlot), R(context), U8(212),
+ /* 2833 S> */ B(LdaZero),
+ /* 2833 E> */ B(StaContextSlot), R(context), U8(213),
+ /* 2847 S> */ B(LdaZero),
+ /* 2847 E> */ B(StaContextSlot), R(context), U8(214),
+ /* 2861 S> */ B(LdaZero),
+ /* 2861 E> */ B(StaContextSlot), R(context), U8(215),
+ /* 2875 S> */ B(LdaZero),
+ /* 2875 E> */ B(StaContextSlot), R(context), U8(216),
+ /* 2889 S> */ B(LdaZero),
+ /* 2889 E> */ B(StaContextSlot), R(context), U8(217),
+ /* 2903 S> */ B(LdaZero),
+ /* 2903 E> */ B(StaContextSlot), R(context), U8(218),
+ /* 2917 S> */ B(LdaZero),
+ /* 2917 E> */ B(StaContextSlot), R(context), U8(219),
+ /* 2931 S> */ B(LdaZero),
+ /* 2931 E> */ B(StaContextSlot), R(context), U8(220),
+ /* 2945 S> */ B(LdaZero),
+ /* 2945 E> */ B(StaContextSlot), R(context), U8(221),
+ /* 2959 S> */ B(LdaZero),
+ /* 2959 E> */ B(StaContextSlot), R(context), U8(222),
+ /* 2973 S> */ B(LdaZero),
+ /* 2973 E> */ B(StaContextSlot), R(context), U8(223),
+ /* 2987 S> */ B(LdaZero),
+ /* 2987 E> */ B(StaContextSlot), R(context), U8(224),
+ /* 3001 S> */ B(LdaZero),
+ /* 3001 E> */ B(StaContextSlot), R(context), U8(225),
+ /* 3015 S> */ B(LdaZero),
+ /* 3015 E> */ B(StaContextSlot), R(context), U8(226),
+ /* 3029 S> */ B(LdaZero),
+ /* 3029 E> */ B(StaContextSlot), R(context), U8(227),
+ /* 3043 S> */ B(LdaZero),
+ /* 3043 E> */ B(StaContextSlot), R(context), U8(228),
+ /* 3057 S> */ B(LdaZero),
+ /* 3057 E> */ B(StaContextSlot), R(context), U8(229),
+ /* 3071 S> */ B(LdaZero),
+ /* 3071 E> */ B(StaContextSlot), R(context), U8(230),
+ /* 3085 S> */ B(LdaZero),
+ /* 3085 E> */ B(StaContextSlot), R(context), U8(231),
+ /* 3099 S> */ B(LdaZero),
+ /* 3099 E> */ B(StaContextSlot), R(context), U8(232),
+ /* 3113 S> */ B(LdaZero),
+ /* 3113 E> */ B(StaContextSlot), R(context), U8(233),
+ /* 3127 S> */ B(LdaZero),
+ /* 3127 E> */ B(StaContextSlot), R(context), U8(234),
+ /* 3141 S> */ B(LdaZero),
+ /* 3141 E> */ B(StaContextSlot), R(context), U8(235),
+ /* 3155 S> */ B(LdaZero),
+ /* 3155 E> */ B(StaContextSlot), R(context), U8(236),
+ /* 3169 S> */ B(LdaZero),
+ /* 3169 E> */ B(StaContextSlot), R(context), U8(237),
+ /* 3183 S> */ B(LdaZero),
+ /* 3183 E> */ B(StaContextSlot), R(context), U8(238),
+ /* 3197 S> */ B(LdaZero),
+ /* 3197 E> */ B(StaContextSlot), R(context), U8(239),
+ /* 3211 S> */ B(LdaZero),
+ /* 3211 E> */ B(StaContextSlot), R(context), U8(240),
+ /* 3225 S> */ B(LdaZero),
+ /* 3225 E> */ B(StaContextSlot), R(context), U8(241),
+ /* 3239 S> */ B(LdaZero),
+ /* 3239 E> */ B(StaContextSlot), R(context), U8(242),
+ /* 3253 S> */ B(LdaZero),
+ /* 3253 E> */ B(StaContextSlot), R(context), U8(243),
+ /* 3267 S> */ B(LdaZero),
+ /* 3267 E> */ B(StaContextSlot), R(context), U8(244),
+ /* 3281 S> */ B(LdaZero),
+ /* 3281 E> */ B(StaContextSlot), R(context), U8(245),
+ /* 3295 S> */ B(LdaZero),
+ /* 3295 E> */ B(StaContextSlot), R(context), U8(246),
+ /* 3309 S> */ B(LdaZero),
+ /* 3309 E> */ B(StaContextSlot), R(context), U8(247),
+ /* 3323 S> */ B(LdaZero),
+ /* 3323 E> */ B(StaContextSlot), R(context), U8(248),
+ /* 3337 S> */ B(LdaZero),
+ /* 3337 E> */ B(StaContextSlot), R(context), U8(249),
+ /* 3351 S> */ B(LdaZero),
+ /* 3351 E> */ B(StaContextSlot), R(context), U8(250),
+ /* 3365 S> */ B(LdaZero),
+ /* 3365 E> */ B(StaContextSlot), R(context), U8(251),
+ /* 3379 S> */ B(LdaZero),
+ /* 3379 E> */ B(StaContextSlot), R(context), U8(252),
+ /* 3393 S> */ B(LdaZero),
+ /* 3393 E> */ B(StaContextSlot), R(context), U8(253),
+ /* 3407 S> */ B(LdaZero),
+ /* 3407 E> */ B(StaContextSlot), R(context), U8(254),
+ /* 3421 S> */ B(LdaZero),
+ /* 3421 E> */ B(StaContextSlot), R(context), U8(255),
+ /* 3424 S> */ B(LdaUndefined),
+ B(Star), R(2),
+ /* 3424 E> */ B(LdaGlobal), U8(0), U8(1),
+ B(Star), R(1),
+ /* 3424 E> */ B(Call), R(1), R(2), U8(1), U8(0),
+ /* 3440 S> */ B(LdaSmi), U8(100),
+ /* 3440 E> */ B(Wide), B(StaContextSlot), R16(context), U16(256),
+ /* 3445 S> */ B(Wide), B(LdaContextSlot), R16(context), U16(256),
+ /* 3454 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CountOperators.golden b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
index 8857789..db9dcf3 100644
--- a/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
@@ -13,15 +13,14 @@
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(ToNumber),
- B(Inc),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Inc),
+ /* 54 E> */ B(Star), R(0),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -36,15 +35,15 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(ToNumber),
- B(Star), R(1),
- B(Inc),
- B(Star), R(0),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(ToNumber),
+ B(Star), R(1),
+ B(Inc),
+ /* 53 E> */ B(Star), R(0),
+ B(Ldar), R(1),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -57,15 +56,14 @@
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(ToNumber),
- B(Dec),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Dec),
+ /* 54 E> */ B(Star), R(0),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -80,15 +78,15 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(ToNumber),
- B(Star), R(1),
- B(Dec),
- B(Star), R(0),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(ToNumber),
+ B(Star), R(1),
+ B(Dec),
+ /* 53 E> */ B(Star), R(0),
+ B(Ldar), R(1),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -103,18 +101,18 @@
parameter count: 1
bytecode array length: 26
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(1), U8(1),
- B(ToNumber),
- B(Star), R(2),
- B(Inc),
- B(StoreICSloppy), R(1), U8(1), U8(3),
- B(Ldar), R(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(Star), R(1),
+ B(LoadIC), R(1), U8(1), U8(1),
+ B(ToNumber),
+ B(Star), R(2),
+ B(Inc),
+ /* 66 E> */ B(StoreICSloppy), R(1), U8(1), U8(3),
+ B(Ldar), R(2),
+ /* 70 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -129,18 +127,17 @@
"
frame size: 2
parameter count: 1
-bytecode array length: 22
+bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(1), U8(1),
- B(ToNumber),
- B(Dec),
- B(StoreICSloppy), R(1), U8(1), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(Star), R(1),
+ B(LoadIC), R(1), U8(1), U8(1),
+ B(Dec),
+ /* 65 E> */ B(StoreICSloppy), R(1), U8(1), U8(3),
+ /* 70 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -157,22 +154,22 @@
parameter count: 1
bytecode array length: 33
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(0), U8(5),
- B(Star), R(2),
- B(Star), R(1),
- B(Star), R(2),
- B(Ldar), R(0),
- B(Star), R(3),
- B(KeyedLoadIC), R(2), U8(1),
- B(ToNumber),
- B(Star), R(4),
- B(Dec),
- B(KeyedStoreICSloppy), R(2), R(3), U8(3),
- B(Ldar), R(4),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaConstant), U8(0),
+ /* 45 E> */ B(Star), R(0),
+ /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
+ B(Star), R(2),
+ /* 60 E> */ B(Star), R(1),
+ /* 72 S> */ B(Star), R(2),
+ /* 81 E> */ B(Ldar), R(0),
+ B(Star), R(3),
+ B(KeyedLoadIC), R(2), U8(1),
+ B(ToNumber),
+ B(Star), R(4),
+ B(Dec),
+ /* 86 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
+ B(Ldar), R(4),
+ /* 90 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -187,22 +184,21 @@
"
frame size: 4
parameter count: 1
-bytecode array length: 29
+bytecode array length: 28
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(0), U8(5),
- B(Star), R(2),
- B(Star), R(1),
- B(Star), R(2),
- B(Ldar), R(0),
- B(Star), R(3),
- B(KeyedLoadIC), R(2), U8(1),
- B(ToNumber),
- B(Inc),
- B(KeyedStoreICSloppy), R(2), R(3), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaConstant), U8(0),
+ /* 45 E> */ B(Star), R(0),
+ /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
+ B(Star), R(2),
+ /* 60 E> */ B(Star), R(1),
+ /* 72 S> */ B(Star), R(2),
+ /* 83 E> */ B(Ldar), R(0),
+ B(Star), R(3),
+ B(KeyedLoadIC), R(2), U8(1),
+ B(Inc),
+ /* 87 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
+ /* 90 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -217,20 +213,19 @@
"
frame size: 2
parameter count: 1
-bytecode array length: 27
+bytecode array length: 26
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(LdaContextSlot), R(context), U8(4),
- B(ToNumber),
- B(Inc),
- B(StaContextSlot), R(context), U8(4),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 53 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 53 E> */ B(Star), R(0),
+ /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(Inc),
+ /* 87 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 90 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -246,20 +241,20 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(LdaContextSlot), R(context), U8(4),
- B(ToNumber),
- B(Star), R(2),
- B(Dec),
- B(StaContextSlot), R(context), U8(4),
- B(Ldar), R(2),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 53 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 53 E> */ B(Star), R(0),
+ /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(ToNumber),
+ B(Star), R(2),
+ B(Dec),
+ /* 86 E> */ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(2),
+ /* 90 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -275,20 +270,20 @@
parameter count: 1
bytecode array length: 28
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(1),
- B(Star), R(2),
- B(Ldar), R(0),
- B(ToNumber),
- B(Star), R(3),
- B(Inc),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(KeyedStoreICSloppy), R(2), R(3), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 44 S> */ B(LdaSmi), U8(1),
+ /* 44 E> */ B(Star), R(0),
+ /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ /* 55 E> */ B(Star), R(1),
+ /* 63 S> */ B(Star), R(2),
+ B(Ldar), R(0),
+ B(ToNumber),
+ B(Star), R(3),
+ B(Inc),
+ /* 75 E> */ B(Star), R(0),
+ B(LdaSmi), U8(2),
+ /* 79 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(1),
+ /* 84 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden b/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
index ab60ba4..6788a7c 100644
--- a/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
@@ -17,11 +17,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(CreateMappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Return),
+ B(CreateMappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(Ldar), R(0),
+ /* 33 S> */ B(Return),
]
constant pool: [
]
@@ -37,14 +37,14 @@
parameter count: 1
bytecode array length: 13
bytecodes: [
- B(CreateMappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(KeyedLoadIC), R(1), U8(1),
- B(Return),
+ B(CreateMappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ /* 31 E> */ B(LdaZero),
+ B(KeyedLoadIC), R(1), U8(1),
+ /* 36 S> */ B(Return),
]
constant pool: [
]
@@ -60,11 +60,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(CreateUnmappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Return),
+ B(CreateUnmappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 29 S> */ B(Ldar), R(0),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -80,18 +80,18 @@
parameter count: 2
bytecode array length: 25
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(Ldar), R(arg0),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaZero),
- B(KeyedLoadIC), R(2), U8(1),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(Ldar), R(arg0),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ /* 32 E> */ B(LdaZero),
+ B(KeyedLoadIC), R(2), U8(1),
+ /* 37 S> */ B(Return),
]
constant pool: [
]
@@ -107,19 +107,19 @@
parameter count: 4
bytecode array length: 29
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(Ldar), R(arg0),
- B(StaContextSlot), R(context), U8(6),
- B(Ldar), R(arg1),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(arg2),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(Ldar), R(arg0),
+ B(StaContextSlot), R(context), U8(6),
+ B(Ldar), R(arg1),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(arg2),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 22 S> */ B(Ldar), R(0),
+ /* 40 S> */ B(Return),
]
constant pool: [
]
@@ -135,11 +135,11 @@
parameter count: 4
bytecode array length: 7
bytecodes: [
- B(CreateUnmappedArguments),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Return),
+ B(CreateUnmappedArguments),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 36 S> */ B(Ldar), R(0),
+ /* 54 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden b/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
index e43a8cd..341ad9c 100644
--- a/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
+++ b/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
@@ -17,11 +17,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(CreateRestParameter),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Return),
+ B(CreateRestParameter),
+ B(Star), R(0),
+ /* 10 E> */ B(StackCheck),
+ /* 26 S> */ B(Ldar), R(0),
+ /* 43 S> */ B(Return),
]
constant pool: [
]
@@ -37,15 +37,15 @@
parameter count: 2
bytecode array length: 14
bytecodes: [
- B(CreateRestParameter),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Return),
+ B(CreateRestParameter),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 10 E> */ B(StackCheck),
+ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 29 S> */ B(Ldar), R(0),
+ /* 46 S> */ B(Return),
]
constant pool: [
]
@@ -61,18 +61,18 @@
parameter count: 2
bytecode array length: 20
bytecodes: [
- B(CreateRestParameter),
- B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaZero),
- B(KeyedLoadIC), R(2), U8(1),
- B(Return),
+ B(CreateRestParameter),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(1),
+ /* 10 E> */ B(StackCheck),
+ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 29 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ /* 44 E> */ B(LdaZero),
+ B(KeyedLoadIC), R(2), U8(1),
+ /* 49 S> */ B(Return),
]
constant pool: [
]
@@ -88,26 +88,26 @@
parameter count: 2
bytecode array length: 35
bytecodes: [
- B(CreateUnmappedArguments),
- B(Star), R(0),
- B(CreateRestParameter),
- B(Star), R(1),
- B(LdaTheHole),
- B(Star), R(2),
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(2),
- B(Ldar), R(1),
- B(Star), R(3),
- B(LdaZero),
- B(KeyedLoadIC), R(3), U8(1),
- B(Star), R(4),
- B(Ldar), R(0),
- B(Star), R(3),
- B(LdaZero),
- B(KeyedLoadIC), R(3), U8(3),
- B(Add), R(4),
- B(Return),
+ B(CreateUnmappedArguments),
+ B(Star), R(0),
+ B(CreateRestParameter),
+ B(Star), R(1),
+ B(LdaTheHole),
+ B(Star), R(2),
+ /* 10 E> */ B(StackCheck),
+ B(Ldar), R(arg0),
+ B(Star), R(2),
+ /* 29 S> */ B(Ldar), R(1),
+ B(Star), R(3),
+ /* 44 E> */ B(LdaZero),
+ B(KeyedLoadIC), R(3), U8(1),
+ B(Star), R(4),
+ /* 50 E> */ B(Ldar), R(0),
+ B(Star), R(3),
+ /* 59 E> */ B(LdaZero),
+ B(KeyedLoadIC), R(3), U8(3),
+ B(Add), R(4),
+ /* 64 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/DeadCodeRemoval.golden b/test/cctest/interpreter/bytecode_expectations/DeadCodeRemoval.golden
index 0c7c176..29f101a 100644
--- a/test/cctest/interpreter/bytecode_expectations/DeadCodeRemoval.golden
+++ b/test/cctest/interpreter/bytecode_expectations/DeadCodeRemoval.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaUndefined),
+ /* 58 S> */ B(Return),
]
constant pool: [
]
@@ -32,11 +32,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 66 S> */ B(LdaSmi), U8(1),
+ /* 66 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 69 S> */ B(Return),
]
constant pool: [
]
@@ -51,9 +51,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 46 S> */ B(LdaSmi), U8(1),
+ /* 78 S> */ B(Return),
]
constant pool: [
]
@@ -68,14 +68,14 @@
parameter count: 1
bytecode array length: 13
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(LdaSmi), U8(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanFalse), U8(5),
+ /* 54 S> */ B(LdaSmi), U8(1),
+ /* 77 S> */ B(Return),
+ /* 67 S> */ B(LdaSmi), U8(2),
+ /* 77 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden b/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
index bedbe31..a1505f0 100644
--- a/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
@@ -16,21 +16,21 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
- B(StackCheck),
- B(LdaConstant), U8(1),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
- B(LdaUndefined),
- B(Return),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
+ /* 0 E> */ B(StackCheck),
+ /* 8 S> */ B(LdaConstant), U8(1),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
+ B(LdaUndefined),
+ /* 10 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -47,14 +47,14 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(2),
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(LdaZero),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(2),
+ /* 0 E> */ B(StackCheck),
+ B(LdaUndefined),
+ /* 15 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -71,23 +71,23 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
- B(StackCheck),
- B(LdaConstant), U8(1),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
- B(LdaSmi), U8(2),
- B(StaGlobalSloppy), U8(1), U8(3),
- B(Star), R(0),
- B(Return),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
+ /* 0 E> */ B(StackCheck),
+ /* 8 S> */ B(LdaConstant), U8(1),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
+ /* 11 S> */ B(LdaSmi), U8(2),
+ /* 12 E> */ B(StaGlobalSloppy), U8(1), U8(3),
+ B(Star), R(0),
+ /* 15 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -105,19 +105,19 @@
parameter count: 1
bytecode array length: 29
bytecodes: [
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(2),
- B(LdaGlobal), U8(1), U8(1),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(1), U8(3),
- B(Star), R(0),
- B(Return),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
+ /* 0 E> */ B(StackCheck),
+ /* 16 S> */ B(LdaUndefined),
+ B(Star), R(2),
+ B(LdaGlobal), U8(1), U8(1),
+ B(Star), R(1),
+ /* 16 E> */ B(Call), R(1), R(2), U8(1), U8(3),
+ B(Star), R(0),
+ /* 20 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/Delete.golden b/test/cctest/interpreter/bytecode_expectations/Delete.golden
index 369c158..2a355ab 100644
--- a/test/cctest/interpreter/bytecode_expectations/Delete.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Delete.golden
@@ -15,14 +15,14 @@
parameter count: 1
bytecode array length: 16
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaConstant), U8(1),
- B(DeletePropertySloppy), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 56 S> */ B(Star), R(1),
+ B(LdaConstant), U8(1),
+ B(DeletePropertySloppy), R(1),
+ /* 75 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -39,14 +39,14 @@
parameter count: 1
bytecode array length: 16
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaConstant), U8(1),
- B(DeletePropertyStrict), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 56 E> */ B(Star), R(0),
+ /* 70 S> */ B(Star), R(1),
+ B(LdaConstant), U8(1),
+ B(DeletePropertyStrict), R(1),
+ /* 89 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -63,14 +63,14 @@
parameter count: 1
bytecode array length: 16
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(DeletePropertySloppy), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 56 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(DeletePropertySloppy), R(1),
+ /* 76 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -86,11 +86,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaFalse),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaFalse),
+ /* 63 S> */ B(Return),
]
constant pool: [
]
@@ -108,18 +108,18 @@
parameter count: 1
bytecode array length: 30
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(1), U8(0),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(DeletePropertyStrict), R(1),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 56 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 64 S> */ B(CreateClosure), U8(1), U8(0),
+ /* 93 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(DeletePropertyStrict), R(1),
+ /* 113 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -136,9 +136,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaTrue),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaTrue),
+ /* 56 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/DeleteLookupSlotInEval.golden b/test/cctest/interpreter/bytecode_expectations/DeleteLookupSlotInEval.golden
index b36f421..dcc7213 100644
--- a/test/cctest/interpreter/bytecode_expectations/DeleteLookupSlotInEval.golden
+++ b/test/cctest/interpreter/bytecode_expectations/DeleteLookupSlotInEval.golden
@@ -23,12 +23,12 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
+ B(LdaUndefined),
+ /* 25 S> */ B(Return),
]
constant pool: [
"x",
@@ -51,9 +51,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaFalse),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaFalse),
+ /* 32 S> */ B(Return),
]
constant pool: [
]
@@ -75,11 +75,11 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kDeleteLookupSlot), R(0), U8(1),
+ /* 32 S> */ B(Return),
]
constant pool: [
"z",
diff --git a/test/cctest/interpreter/bytecode_expectations/DoDebugger.golden b/test/cctest/interpreter/bytecode_expectations/DoDebugger.golden
index ca26065..ac0b2ee 100644
--- a/test/cctest/interpreter/bytecode_expectations/DoDebugger.golden
+++ b/test/cctest/interpreter/bytecode_expectations/DoDebugger.golden
@@ -15,10 +15,10 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Debugger),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(Debugger),
+ B(LdaUndefined),
+ /* 44 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/DoExpression.golden b/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
index b46fa57..68f264f 100644
--- a/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
+++ b/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
@@ -16,10 +16,10 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(Ldar), R(0),
+ /* 42 E> */ B(Star), R(1),
+ /* 60 S> */ B(Return),
]
constant pool: [
]
@@ -34,13 +34,13 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(100),
- B(Star), R(1),
- B(LdaUndefined),
- B(Star), R(0),
- B(Star), R(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 55 S> */ B(LdaSmi), U8(100),
+ /* 55 E> */ B(Star), R(1),
+ /* 42 S> */ B(LdaUndefined),
+ B(Star), R(0),
+ /* 42 E> */ B(Star), R(2),
+ /* 73 S> */ B(Return),
]
constant pool: [
]
@@ -53,24 +53,23 @@
"
frame size: 2
parameter count: 1
-bytecode array length: 26
+bytecode array length: 25
bytecodes: [
- B(StackCheck),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(1),
- B(ToNumber),
- B(Inc),
- B(Star), R(1),
- B(Star), R(0),
- B(Jump), U8(12),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Jump), U8(-21),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 E> */ B(StackCheck),
+ /* 56 S> */ B(LdaSmi), U8(10),
+ /* 56 E> */ B(Star), R(1),
+ /* 69 S> */ B(Inc),
+ /* 71 E> */ B(Star), R(1),
+ B(Star), R(0),
+ /* 74 S> */ B(Jump), U8(12),
+ /* 64 E> */ B(Ldar), R(0),
+ /* 62 E> */ B(Star), R(1),
+ /* 84 S> */ B(LdaSmi), U8(20),
+ /* 86 E> */ B(Star), R(1),
+ B(Jump), U8(-20),
+ B(LdaUndefined),
+ /* 94 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/Eval.golden b/test/cctest/interpreter/bytecode_expectations/Eval.golden
index e3e48bc..7c3915c 100644
--- a/test/cctest/interpreter/bytecode_expectations/Eval.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Eval.golden
@@ -11,35 +11,37 @@
snippet: "
return eval('1;');
"
-frame size: 9
+frame size: 10
parameter count: 1
-bytecode array length: 65
+bytecode array length: 69
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(Mov), R(1), R(4),
- B(Mov), R(3), R(5),
- B(Mov), R(closure), R(6),
- B(LdaZero),
- B(Star), R(7),
- B(LdaSmi), U8(30),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(5),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(2), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(Mov), R(1), R(4),
+ B(Mov), R(3), R(5),
+ B(Mov), R(closure), R(6),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaSmi), U8(30),
+ B(Star), R(8),
+ B(LdaSmi), U8(41),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
+ B(Star), R(1),
+ /* 41 E> */ B(Call), R(1), R(2), U8(2), U8(0),
+ /* 53 S> */ B(Return),
]
constant pool: [
"eval",
diff --git a/test/cctest/interpreter/bytecode_expectations/ForIn.golden b/test/cctest/interpreter/bytecode_expectations/ForIn.golden
index 9f0c64a..2b61b64 100644
--- a/test/cctest/interpreter/bytecode_expectations/ForIn.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ForIn.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -32,9 +32,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ /* 62 S> */ B(Return),
]
constant pool: [
]
@@ -49,9 +49,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ /* 62 S> */ B(Return),
]
constant pool: [
]
@@ -67,30 +67,30 @@
parameter count: 1
bytecode array length: 45
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(JumpIfUndefined), U8(38),
- B(JumpIfNull), U8(36),
- B(ToObject),
- B(Star), R(3),
- B(ForInPrepare), R(4),
- B(LdaZero),
- B(Star), R(7),
- B(ForInDone), R(7), R(6),
- B(JumpIfTrue), U8(23),
- B(ForInNext), R(3), R(7), R(4), U8(1),
- B(JumpIfUndefined), U8(10),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(Return),
- B(ForInStep), R(7),
- B(Star), R(7),
- B(Jump), U8(-24),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(1),
+ /* 68 S> */ B(JumpIfUndefined), U8(38),
+ B(JumpIfNull), U8(36),
+ B(ToObject),
+ B(Star), R(3),
+ B(ForInPrepare), R(4),
+ B(LdaZero),
+ B(Star), R(7),
+ /* 63 S> */ B(ForInDone), R(7), R(6),
+ B(JumpIfTrue), U8(23),
+ B(ForInNext), R(3), R(7), R(4), U8(1),
+ B(JumpIfUndefined), U8(10),
+ B(Star), R(0),
+ /* 54 E> */ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(2),
+ /* 85 S> */ B(Return),
+ B(ForInStep), R(7),
+ B(Star), R(7),
+ B(Jump), U8(-24),
+ B(LdaUndefined),
+ /* 85 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -107,35 +107,35 @@
parameter count: 1
bytecode array length: 57
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(1),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(JumpIfUndefined), U8(47),
- B(JumpIfNull), U8(45),
- B(ToObject),
- B(Star), R(3),
- B(ForInPrepare), R(4),
- B(LdaZero),
- B(Star), R(7),
- B(ForInDone), R(7), R(6),
- B(JumpIfTrue), U8(32),
- B(ForInNext), R(3), R(7), R(4), U8(1),
- B(JumpIfUndefined), U8(19),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(2),
- B(Ldar), R(1),
- B(Star), R(8),
- B(Ldar), R(2),
- B(Add), R(8),
- B(Star), R(1),
- B(ForInStep), R(7),
- B(Star), R(7),
- B(Jump), U8(-33),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(1),
+ /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(JumpIfUndefined), U8(47),
+ B(JumpIfNull), U8(45),
+ B(ToObject),
+ B(Star), R(3),
+ B(ForInPrepare), R(4),
+ B(LdaZero),
+ B(Star), R(7),
+ /* 54 S> */ B(ForInDone), R(7), R(6),
+ B(JumpIfTrue), U8(32),
+ B(ForInNext), R(3), R(7), R(4), U8(1),
+ B(JumpIfUndefined), U8(19),
+ B(Star), R(0),
+ /* 45 E> */ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(2),
+ /* 70 S> */ B(Ldar), R(1),
+ B(Star), R(8),
+ /* 75 E> */ B(Ldar), R(2),
+ B(Add), R(8),
+ /* 72 E> */ B(Star), R(1),
+ B(ForInStep), R(7),
+ B(Star), R(7),
+ B(Jump), U8(-33),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -155,49 +155,49 @@
parameter count: 1
bytecode array length: 94
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(1), U8(1), U8(3),
- B(JumpIfUndefined), U8(79),
- B(JumpIfNull), U8(77),
- B(ToObject),
- B(Star), R(1),
- B(ForInPrepare), R(2),
- B(LdaZero),
- B(Star), R(5),
- B(ForInDone), R(5), R(4),
- B(JumpIfTrue), U8(64),
- B(ForInNext), R(1), R(5), R(2), U8(9),
- B(JumpIfUndefined), U8(51),
- B(Star), R(6),
- B(Ldar), R(0),
- B(Star), R(7),
- B(Ldar), R(6),
- B(StoreICSloppy), R(7), U8(2), U8(7),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(6),
- B(LoadIC), R(6), U8(2), U8(3),
- B(Star), R(7),
- B(LdaSmi), U8(10),
- B(TestEqual), R(7),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(20),
- B(Ldar), R(0),
- B(Star), R(6),
- B(LoadIC), R(6), U8(2), U8(5),
- B(Star), R(7),
- B(LdaSmi), U8(20),
- B(TestEqual), R(7),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(8),
- B(ForInStep), R(5),
- B(Star), R(5),
- B(Jump), U8(-65),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(JumpIfUndefined), U8(79),
+ B(JumpIfNull), U8(77),
+ B(ToObject),
+ B(Star), R(1),
+ B(ForInPrepare), R(2),
+ B(LdaZero),
+ B(Star), R(5),
+ /* 68 S> */ B(ForInDone), R(5), R(4),
+ B(JumpIfTrue), U8(64),
+ B(ForInNext), R(1), R(5), R(2), U8(9),
+ B(JumpIfUndefined), U8(51),
+ B(Star), R(6),
+ /* 67 E> */ B(Ldar), R(0),
+ B(Star), R(7),
+ B(Ldar), R(6),
+ B(StoreICSloppy), R(7), U8(2), U8(7),
+ /* 62 E> */ B(StackCheck),
+ /* 95 S> */ B(Ldar), R(0),
+ B(Star), R(6),
+ /* 100 E> */ B(LoadIC), R(6), U8(2), U8(3),
+ B(Star), R(7),
+ B(LdaSmi), U8(10),
+ /* 106 E> */ B(TestEqual), R(7),
+ B(JumpIfFalse), U8(4),
+ /* 113 S> */ B(Jump), U8(20),
+ /* 125 S> */ B(Ldar), R(0),
+ B(Star), R(6),
+ /* 130 E> */ B(LoadIC), R(6), U8(2), U8(5),
+ B(Star), R(7),
+ B(LdaSmi), U8(20),
+ /* 136 E> */ B(TestEqual), R(7),
+ B(JumpIfFalse), U8(4),
+ /* 143 S> */ B(Jump), U8(8),
+ B(ForInStep), R(5),
+ B(Star), R(5),
+ B(Jump), U8(-65),
+ B(LdaUndefined),
+ /* 152 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -216,39 +216,39 @@
parameter count: 1
bytecode array length: 69
bytecodes: [
- B(StackCheck),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(0),
- B(CreateArrayLiteral), U8(1), U8(1), U8(3),
- B(JumpIfUndefined), U8(56),
- B(JumpIfNull), U8(54),
- B(ToObject),
- B(Star), R(1),
- B(ForInPrepare), R(2),
- B(LdaZero),
- B(Star), R(5),
- B(ForInDone), R(5), R(4),
- B(JumpIfTrue), U8(41),
- B(ForInNext), R(1), R(5), R(2), U8(7),
- B(JumpIfUndefined), U8(28),
- B(Star), R(6),
- B(Ldar), R(0),
- B(Star), R(7),
- B(LdaZero),
- B(Star), R(8),
- B(Ldar), R(6),
- B(KeyedStoreICSloppy), R(7), R(8), U8(5),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(6),
- B(LdaSmi), U8(3),
- B(KeyedLoadIC), R(6), U8(3),
- B(Return),
- B(ForInStep), R(5),
- B(Star), R(5),
- B(Jump), U8(-42),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ /* 42 E> */ B(Star), R(0),
+ /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(JumpIfUndefined), U8(56),
+ B(JumpIfNull), U8(54),
+ B(ToObject),
+ B(Star), R(1),
+ B(ForInPrepare), R(2),
+ B(LdaZero),
+ B(Star), R(5),
+ /* 65 S> */ B(ForInDone), R(5), R(4),
+ B(JumpIfTrue), U8(41),
+ B(ForInNext), R(1), R(5), R(2), U8(7),
+ B(JumpIfUndefined), U8(28),
+ B(Star), R(6),
+ /* 64 E> */ B(Ldar), R(0),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(Ldar), R(6),
+ B(KeyedStoreICSloppy), R(7), R(8), U8(5),
+ /* 59 E> */ B(StackCheck),
+ /* 83 S> */ B(Ldar), R(0),
+ B(Star), R(6),
+ /* 91 E> */ B(LdaSmi), U8(3),
+ B(KeyedLoadIC), R(6), U8(3),
+ /* 98 S> */ B(Return),
+ B(ForInStep), R(5),
+ B(Star), R(5),
+ B(Jump), U8(-42),
+ B(LdaUndefined),
+ /* 98 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/test/cctest/interpreter/bytecode_expectations/ForOf.golden
index 9b10f41..6fb1c4b 100644
--- a/test/cctest/interpreter/bytecode_expectations/ForOf.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ForOf.golden
@@ -15,157 +15,157 @@
parameter count: 1
bytecode array length: 347
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(3),
- B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(14),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(14), U8(3),
- B(Star), R(13),
- B(Call), R(13), R(14), U8(1), U8(1),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(15),
- B(LoadIC), R(15), U8(2), U8(7),
- B(Star), R(14),
- B(Call), R(14), R(15), U8(1), U8(5),
- B(Star), R(2),
- B(Star), R(13),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
- B(LogicalNot),
- B(JumpIfFalse), U8(11),
- B(Ldar), R(2),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(Ldar), R(2),
- B(Star), R(13),
- B(LoadIC), R(13), U8(3), U8(9),
- B(JumpIfToBooleanTrue), U8(28),
- B(LdaSmi), U8(2),
- B(Star), R(3),
- B(Ldar), R(2),
- B(Star), R(13),
- B(LoadIC), R(13), U8(4), U8(11),
- B(Star), R(0),
- B(Ldar), R(4),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(7),
- B(LdaZero),
- B(Star), R(3),
- B(Jump), U8(-70),
- B(Jump), U8(47),
- B(Star), R(14),
- B(LdaConstant), U8(5),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
- B(Star), R(12),
- B(PushContext), R(8),
- B(Ldar), R(3),
- B(Star), R(13),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(13),
- B(JumpIfFalse), U8(6),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(8),
- B(LdaSmi), U8(-1),
- B(Star), R(9),
- B(Jump), U8(7),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(11),
- B(Ldar), R(3),
- B(Star), R(12),
- B(LdaZero),
- B(TestEqualStrict), R(12),
- B(JumpIfTrue), U8(9),
- B(Ldar), R(1),
- B(Star), R(12),
- B(LdaUndefined),
- B(TestEqualStrict), R(12),
- B(LogicalNot),
- B(JumpIfFalseConstant), U8(9),
- B(Ldar), R(1),
- B(Star), R(12),
- B(LoadIC), R(12), U8(6), U8(13),
- B(Star), R(5),
- B(Star), R(12),
- B(LdaNull),
- B(TestEqual), R(12),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(124),
- B(Ldar), R(3),
- B(Star), R(12),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(12),
- B(JumpIfFalse), U8(79),
- B(Ldar), R(5),
- B(TypeOf),
- B(Star), R(12),
- B(LdaConstant), U8(7),
- B(TestEqualStrict), R(12),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(18),
- B(Wide), B(LdaSmi), U16(139),
- B(Star), R(12),
- B(LdaConstant), U8(8),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
- B(Throw),
- B(Mov), R(context), R(12),
- B(Ldar), R(5),
- B(Star), R(13),
- B(Ldar), R(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
- B(Jump), U8(30),
- B(Star), R(14),
- B(LdaConstant), U8(5),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(12),
- B(PushContext), R(8),
- B(PopContext), R(8),
- B(Jump), U8(37),
- B(Ldar), R(5),
- B(Star), R(12),
- B(Ldar), R(1),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
- B(Star), R(6),
- B(Star), R(12),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
- B(JumpIfToBooleanFalse), U8(4),
- B(Jump), U8(11),
- B(Ldar), R(6),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(11), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(9),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(10),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(context), R(11),
+ B(Mov), R(context), R(12),
+ /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(14),
+ /* 48 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(14), U8(3),
+ B(Star), R(13),
+ /* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1),
+ /* 48 E> */ B(Star), R(1),
+ /* 45 S> */ B(Ldar), R(1),
+ B(Star), R(15),
+ B(LoadIC), R(15), U8(2), U8(7),
+ B(Star), R(14),
+ /* 45 E> */ B(Call), R(14), R(15), U8(1), U8(5),
+ /* 45 E> */ B(Star), R(2),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(28),
+ B(LdaSmi), U8(2),
+ B(Star), R(3),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(4), U8(11),
+ B(Star), R(0),
+ B(Ldar), R(4),
+ /* 34 E> */ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(-70),
+ B(Jump), U8(47),
+ B(Star), R(14),
+ B(LdaConstant), U8(5),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
+ B(Star), R(12),
+ B(PushContext), R(8),
+ B(Ldar), R(3),
+ B(Star), R(13),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(13),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
+ B(PopContext), R(8),
+ B(LdaSmi), U8(-1),
+ B(Star), R(9),
+ B(Jump), U8(7),
+ B(Star), R(10),
+ B(LdaZero),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(11),
+ B(Ldar), R(3),
+ B(Star), R(12),
+ B(LdaZero),
+ B(TestEqualStrict), R(12),
+ B(JumpIfTrue), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(LdaUndefined),
+ B(TestEqualStrict), R(12),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalseConstant), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(LoadIC), R(12), U8(6), U8(13),
+ B(Star), R(5),
+ B(Star), R(12),
+ B(LdaNull),
+ B(TestEqual), R(12),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(124),
+ B(Ldar), R(3),
+ B(Star), R(12),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(12),
+ B(JumpIfFalse), U8(79),
+ B(Ldar), R(5),
+ B(TypeOf),
+ B(Star), R(12),
+ B(LdaConstant), U8(7),
+ B(TestEqualStrict), R(12),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), U16(129),
+ B(Star), R(12),
+ B(LdaConstant), U8(8),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(12),
+ B(Ldar), R(5),
+ B(Star), R(13),
+ B(Ldar), R(1),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
+ B(Jump), U8(30),
+ B(Star), R(14),
+ B(LdaConstant), U8(5),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(12),
+ B(PushContext), R(8),
+ B(PopContext), R(8),
+ B(Jump), U8(37),
+ B(Ldar), R(5),
+ B(Star), R(12),
+ B(Ldar), R(1),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
+ B(Star), R(6),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(11),
+ B(Ldar), R(6),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(11), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(9),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(5),
+ B(Ldar), R(10),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 62 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -194,166 +194,166 @@
parameter count: 1
bytecode array length: 363
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(7),
- B(LdaUndefined),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(3),
- B(Mov), R(context), R(12),
- B(Mov), R(context), R(13),
- B(Ldar), R(7),
- B(Star), R(15),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(15), U8(3),
- B(Star), R(14),
- B(Call), R(14), R(15), U8(1), U8(1),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(16),
- B(LoadIC), R(16), U8(2), U8(7),
- B(Star), R(15),
- B(Call), R(15), R(16), U8(1), U8(5),
- B(Star), R(2),
- B(Star), R(14),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(14), U8(1),
- B(LogicalNot),
- B(JumpIfFalse), U8(11),
- B(Ldar), R(2),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
- B(Ldar), R(2),
- B(Star), R(14),
- B(LoadIC), R(14), U8(3), U8(9),
- B(JumpIfToBooleanTrue), U8(32),
- B(LdaSmi), U8(2),
- B(Star), R(3),
- B(Ldar), R(2),
- B(Star), R(14),
- B(LoadIC), R(14), U8(4), U8(11),
- B(Star), R(0),
- B(Ldar), R(4),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(8),
- B(Star), R(11),
- B(LdaZero),
- B(Star), R(10),
- B(Jump), U8(63),
- B(Jump), U8(-74),
- B(Jump), U8(47),
- B(Star), R(15),
- B(LdaConstant), U8(5),
- B(Star), R(14),
- B(Ldar), R(closure),
- B(Star), R(16),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(14), U8(3),
- B(Star), R(13),
- B(PushContext), R(9),
- B(Ldar), R(3),
- B(Star), R(14),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(14),
- B(JumpIfFalse), U8(6),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
- B(PopContext), R(9),
- B(LdaSmi), U8(-1),
- B(Star), R(10),
- B(Jump), U8(8),
- B(Star), R(11),
- B(LdaSmi), U8(1),
- B(Star), R(10),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(12),
- B(Ldar), R(3),
- B(Star), R(13),
- B(LdaZero),
- B(TestEqualStrict), R(13),
- B(JumpIfTrue), U8(9),
- B(Ldar), R(1),
- B(Star), R(13),
- B(LdaUndefined),
- B(TestEqualStrict), R(13),
- B(LogicalNot),
- B(JumpIfFalseConstant), U8(9),
- B(Ldar), R(1),
- B(Star), R(13),
- B(LoadIC), R(13), U8(6), U8(13),
- B(Star), R(5),
- B(Star), R(13),
- B(LdaNull),
- B(TestEqual), R(13),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(124),
- B(Ldar), R(3),
- B(Star), R(13),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(13),
- B(JumpIfFalse), U8(79),
- B(Ldar), R(5),
- B(TypeOf),
- B(Star), R(13),
- B(LdaConstant), U8(7),
- B(TestEqualStrict), R(13),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(18),
- B(Wide), B(LdaSmi), U16(139),
- B(Star), R(13),
- B(LdaConstant), U8(8),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
- B(Throw),
- B(Mov), R(context), R(13),
- B(Ldar), R(5),
- B(Star), R(14),
- B(Ldar), R(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_Call), R(14), U8(2),
- B(Jump), U8(30),
- B(Star), R(15),
- B(LdaConstant), U8(5),
- B(Star), R(14),
- B(Ldar), R(closure),
- B(Star), R(16),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(14), U8(3),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(13),
- B(PushContext), R(9),
- B(PopContext), R(9),
- B(Jump), U8(37),
- B(Ldar), R(5),
- B(Star), R(13),
- B(Ldar), R(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
- B(Star), R(6),
- B(Star), R(13),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
- B(JumpIfToBooleanFalse), U8(4),
- B(Jump), U8(11),
- B(Ldar), R(6),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(12), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(10),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(10),
- B(JumpIfTrue), U8(7),
- B(Jump), U8(8),
- B(Ldar), R(11),
- B(Return),
- B(Ldar), R(11),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(7),
+ B(LdaUndefined),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(context), R(12),
+ B(Mov), R(context), R(13),
+ /* 68 S> */ B(Ldar), R(7),
+ B(Star), R(15),
+ /* 68 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(15), U8(3),
+ B(Star), R(14),
+ /* 68 E> */ B(Call), R(14), R(15), U8(1), U8(1),
+ /* 68 E> */ B(Star), R(1),
+ /* 65 S> */ B(Ldar), R(1),
+ B(Star), R(16),
+ B(LoadIC), R(16), U8(2), U8(7),
+ B(Star), R(15),
+ /* 65 E> */ B(Call), R(15), R(16), U8(1), U8(5),
+ /* 65 E> */ B(Star), R(2),
+ B(Star), R(14),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(14), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(14),
+ B(LoadIC), R(14), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(32),
+ B(LdaSmi), U8(2),
+ B(Star), R(3),
+ B(Ldar), R(2),
+ B(Star), R(14),
+ B(LoadIC), R(14), U8(4), U8(11),
+ B(Star), R(0),
+ B(Ldar), R(4),
+ /* 54 E> */ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(8),
+ /* 73 S> */ B(Star), R(11),
+ B(LdaZero),
+ B(Star), R(10),
+ B(Jump), U8(63),
+ B(Jump), U8(-74),
+ B(Jump), U8(47),
+ B(Star), R(15),
+ B(LdaConstant), U8(5),
+ B(Star), R(14),
+ B(Ldar), R(closure),
+ B(Star), R(16),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(14), U8(3),
+ B(Star), R(13),
+ B(PushContext), R(9),
+ B(Ldar), R(3),
+ B(Star), R(14),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(14),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
+ B(PopContext), R(9),
+ B(LdaSmi), U8(-1),
+ B(Star), R(10),
+ B(Jump), U8(8),
+ B(Star), R(11),
+ B(LdaSmi), U8(1),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(12),
+ B(Ldar), R(3),
+ B(Star), R(13),
+ B(LdaZero),
+ B(TestEqualStrict), R(13),
+ B(JumpIfTrue), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(13),
+ B(LdaUndefined),
+ B(TestEqualStrict), R(13),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalseConstant), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(6), U8(13),
+ B(Star), R(5),
+ B(Star), R(13),
+ B(LdaNull),
+ B(TestEqual), R(13),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(124),
+ B(Ldar), R(3),
+ B(Star), R(13),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(13),
+ B(JumpIfFalse), U8(79),
+ B(Ldar), R(5),
+ B(TypeOf),
+ B(Star), R(13),
+ B(LdaConstant), U8(7),
+ B(TestEqualStrict), R(13),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), U16(129),
+ B(Star), R(13),
+ B(LdaConstant), U8(8),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(13),
+ B(Ldar), R(5),
+ B(Star), R(14),
+ B(Ldar), R(1),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::k_Call), R(14), U8(2),
+ B(Jump), U8(30),
+ B(Star), R(15),
+ B(LdaConstant), U8(5),
+ B(Star), R(14),
+ B(Ldar), R(closure),
+ B(Star), R(16),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(14), U8(3),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(13),
+ B(PushContext), R(9),
+ B(PopContext), R(9),
+ B(Jump), U8(37),
+ B(Ldar), R(5),
+ B(Star), R(13),
+ B(Ldar), R(1),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
+ B(Star), R(6),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(11),
+ B(Ldar), R(6),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(12), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(10),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(10),
+ B(JumpIfTrue), U8(7),
+ B(Jump), U8(8),
+ B(Ldar), R(11),
+ /* 85 S> */ B(Return),
+ B(Ldar), R(11),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 85 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -384,168 +384,168 @@
parameter count: 1
bytecode array length: 369
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(3),
- B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- B(CreateArrayLiteral), U8(0), U8(0), U8(3),
- B(Star), R(14),
- B(LdaConstant), U8(1),
- B(KeyedLoadIC), R(14), U8(3),
- B(Star), R(13),
- B(Call), R(13), R(14), U8(1), U8(1),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(15),
- B(LoadIC), R(15), U8(2), U8(7),
- B(Star), R(14),
- B(Call), R(14), R(15), U8(1), U8(5),
- B(Star), R(2),
- B(Star), R(13),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
- B(LogicalNot),
- B(JumpIfFalse), U8(11),
- B(Ldar), R(2),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(Ldar), R(2),
- B(Star), R(13),
- B(LoadIC), R(13), U8(3), U8(9),
- B(JumpIfToBooleanTrue), U8(50),
- B(LdaSmi), U8(2),
- B(Star), R(3),
- B(Ldar), R(2),
- B(Star), R(13),
- B(LoadIC), R(13), U8(4), U8(11),
- B(Star), R(0),
- B(Ldar), R(4),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(7),
- B(Star), R(13),
- B(LdaSmi), U8(10),
- B(TestEqual), R(13),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(-75),
- B(Ldar), R(7),
- B(Star), R(13),
- B(LdaSmi), U8(20),
- B(TestEqual), R(13),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(7),
- B(LdaZero),
- B(Star), R(3),
- B(Jump), U8(-92),
- B(Jump), U8(47),
- B(Star), R(14),
- B(LdaConstant), U8(5),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
- B(Star), R(12),
- B(PushContext), R(8),
- B(Ldar), R(3),
- B(Star), R(13),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(13),
- B(JumpIfFalse), U8(6),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(8),
- B(LdaSmi), U8(-1),
- B(Star), R(9),
- B(Jump), U8(7),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(11),
- B(Ldar), R(3),
- B(Star), R(12),
- B(LdaZero),
- B(TestEqualStrict), R(12),
- B(JumpIfTrue), U8(9),
- B(Ldar), R(1),
- B(Star), R(12),
- B(LdaUndefined),
- B(TestEqualStrict), R(12),
- B(LogicalNot),
- B(JumpIfFalseConstant), U8(9),
- B(Ldar), R(1),
- B(Star), R(12),
- B(LoadIC), R(12), U8(6), U8(13),
- B(Star), R(5),
- B(Star), R(12),
- B(LdaNull),
- B(TestEqual), R(12),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(124),
- B(Ldar), R(3),
- B(Star), R(12),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(12),
- B(JumpIfFalse), U8(79),
- B(Ldar), R(5),
- B(TypeOf),
- B(Star), R(12),
- B(LdaConstant), U8(7),
- B(TestEqualStrict), R(12),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(18),
- B(Wide), B(LdaSmi), U16(139),
- B(Star), R(12),
- B(LdaConstant), U8(8),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
- B(Throw),
- B(Mov), R(context), R(12),
- B(Ldar), R(5),
- B(Star), R(13),
- B(Ldar), R(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
- B(Jump), U8(30),
- B(Star), R(14),
- B(LdaConstant), U8(5),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(12),
- B(PushContext), R(8),
- B(PopContext), R(8),
- B(Jump), U8(37),
- B(Ldar), R(5),
- B(Star), R(12),
- B(Ldar), R(1),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
- B(Star), R(6),
- B(Star), R(12),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
- B(JumpIfToBooleanFalse), U8(4),
- B(Jump), U8(11),
- B(Ldar), R(6),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(11), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(9),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(10),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(context), R(11),
+ B(Mov), R(context), R(12),
+ /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(14),
+ /* 48 E> */ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(14), U8(3),
+ B(Star), R(13),
+ /* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1),
+ /* 48 E> */ B(Star), R(1),
+ /* 45 S> */ B(Ldar), R(1),
+ B(Star), R(15),
+ B(LoadIC), R(15), U8(2), U8(7),
+ B(Star), R(14),
+ /* 45 E> */ B(Call), R(14), R(15), U8(1), U8(5),
+ /* 45 E> */ B(Star), R(2),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(13), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(50),
+ B(LdaSmi), U8(2),
+ B(Star), R(3),
+ B(Ldar), R(2),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(4), U8(11),
+ B(Star), R(0),
+ B(Ldar), R(4),
+ /* 34 E> */ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(7),
+ /* 66 S> */ B(Star), R(13),
+ B(LdaSmi), U8(10),
+ /* 72 E> */ B(TestEqual), R(13),
+ B(JumpIfFalse), U8(4),
+ /* 79 S> */ B(Jump), U8(17),
+ /* 91 S> */ B(Ldar), R(7),
+ B(Star), R(13),
+ B(LdaSmi), U8(20),
+ /* 97 E> */ B(TestEqual), R(13),
+ B(JumpIfFalse), U8(4),
+ /* 104 S> */ B(Jump), U8(7),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(-92),
+ B(Jump), U8(47),
+ B(Star), R(14),
+ B(LdaConstant), U8(5),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
+ B(Star), R(12),
+ B(PushContext), R(8),
+ B(Ldar), R(3),
+ B(Star), R(13),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(13),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
+ B(PopContext), R(8),
+ B(LdaSmi), U8(-1),
+ B(Star), R(9),
+ B(Jump), U8(7),
+ B(Star), R(10),
+ B(LdaZero),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(11),
+ B(Ldar), R(3),
+ B(Star), R(12),
+ B(LdaZero),
+ B(TestEqualStrict), R(12),
+ B(JumpIfTrue), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(LdaUndefined),
+ B(TestEqualStrict), R(12),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalseConstant), U8(9),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(LoadIC), R(12), U8(6), U8(13),
+ B(Star), R(5),
+ B(Star), R(12),
+ B(LdaNull),
+ B(TestEqual), R(12),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(124),
+ B(Ldar), R(3),
+ B(Star), R(12),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(12),
+ B(JumpIfFalse), U8(79),
+ B(Ldar), R(5),
+ B(TypeOf),
+ B(Star), R(12),
+ B(LdaConstant), U8(7),
+ B(TestEqualStrict), R(12),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), U16(129),
+ B(Star), R(12),
+ B(LdaConstant), U8(8),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(12),
+ B(Ldar), R(5),
+ B(Star), R(13),
+ B(Ldar), R(1),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::k_Call), R(13), U8(2),
+ B(Jump), U8(30),
+ B(Star), R(14),
+ B(LdaConstant), U8(5),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(13), U8(3),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(12),
+ B(PushContext), R(8),
+ B(PopContext), R(8),
+ B(Jump), U8(37),
+ B(Ldar), R(5),
+ B(Star), R(12),
+ B(Ldar), R(1),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
+ B(Star), R(6),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(11),
+ B(Ldar), R(6),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(11), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(9),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(5),
+ B(Ldar), R(10),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 113 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -574,170 +574,170 @@
parameter count: 1
bytecode array length: 379
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(8),
- B(Star), R(6),
- B(LdaUndefined),
- B(Star), R(3),
- B(LdaZero),
- B(Star), R(2),
- B(Mov), R(context), R(10),
- B(Mov), R(context), R(11),
- B(CreateArrayLiteral), U8(1), U8(1), U8(3),
- B(Star), R(13),
- B(LdaConstant), U8(2),
- B(KeyedLoadIC), R(13), U8(3),
- B(Star), R(12),
- B(Call), R(12), R(13), U8(1), U8(1),
- B(Star), R(0),
- B(Ldar), R(0),
- B(Star), R(14),
- B(LoadIC), R(14), U8(3), U8(7),
- B(Star), R(13),
- B(Call), R(13), R(14), U8(1), U8(5),
- B(Star), R(1),
- B(Star), R(12),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
- B(LogicalNot),
- B(JumpIfFalse), U8(11),
- B(Ldar), R(1),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(Ldar), R(1),
- B(Star), R(12),
- B(LoadIC), R(12), U8(4), U8(9),
- B(JumpIfToBooleanTrue), U8(42),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(Ldar), R(6),
- B(Star), R(12),
- B(Ldar), R(1),
- B(Star), R(13),
- B(LoadIC), R(13), U8(5), U8(11),
- B(StoreICSloppy), R(12), U8(6), U8(13),
- B(Ldar), R(3),
- B(StackCheck),
- B(Ldar), R(6),
- B(Star), R(12),
- B(LoadIC), R(12), U8(6), U8(15),
- B(Star), R(9),
- B(LdaZero),
- B(Star), R(8),
- B(Jump), U8(63),
- B(Jump), U8(-84),
- B(Jump), U8(47),
- B(Star), R(13),
- B(LdaConstant), U8(7),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(12), U8(3),
- B(Star), R(11),
- B(PushContext), R(7),
- B(Ldar), R(2),
- B(Star), R(12),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(12),
- B(JumpIfFalse), U8(6),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
- B(PopContext), R(7),
- B(LdaSmi), U8(-1),
- B(Star), R(8),
- B(Jump), U8(8),
- B(Star), R(9),
- B(LdaSmi), U8(1),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(10),
- B(Ldar), R(2),
- B(Star), R(11),
- B(LdaZero),
- B(TestEqualStrict), R(11),
- B(JumpIfTrue), U8(9),
- B(Ldar), R(0),
- B(Star), R(11),
- B(LdaUndefined),
- B(TestEqualStrict), R(11),
- B(LogicalNot),
- B(JumpIfFalseConstant), U8(11),
- B(Ldar), R(0),
- B(Star), R(11),
- B(LoadIC), R(11), U8(8), U8(17),
- B(Star), R(4),
- B(Star), R(11),
- B(LdaNull),
- B(TestEqual), R(11),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(124),
- B(Ldar), R(2),
- B(Star), R(11),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(11),
- B(JumpIfFalse), U8(79),
- B(Ldar), R(4),
- B(TypeOf),
- B(Star), R(11),
- B(LdaConstant), U8(9),
- B(TestEqualStrict), R(11),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(18),
- B(Wide), B(LdaSmi), U16(139),
- B(Star), R(11),
- B(LdaConstant), U8(10),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
- B(Throw),
- B(Mov), R(context), R(11),
- B(Ldar), R(4),
- B(Star), R(12),
- B(Ldar), R(0),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
- B(Jump), U8(30),
- B(Star), R(13),
- B(LdaConstant), U8(7),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(12), U8(3),
- B(Star), R(11),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(11),
- B(PushContext), R(7),
- B(PopContext), R(7),
- B(Jump), U8(37),
- B(Ldar), R(4),
- B(Star), R(11),
- B(Ldar), R(0),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::k_Call), R(11), U8(2),
- B(Star), R(5),
- B(Star), R(11),
- B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(11), U8(1),
- B(JumpIfToBooleanFalse), U8(4),
- B(Jump), U8(11),
- B(Ldar), R(5),
- B(Star), R(11),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(10), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(8),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(8),
- B(JumpIfTrue), U8(7),
- B(Jump), U8(8),
- B(Ldar), R(9),
- B(Return),
- B(Ldar), R(9),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(8),
+ /* 42 E> */ B(Star), R(6),
+ B(LdaUndefined),
+ B(Star), R(3),
+ B(LdaZero),
+ B(Star), R(2),
+ B(Mov), R(context), R(10),
+ B(Mov), R(context), R(11),
+ /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(Star), R(13),
+ /* 77 E> */ B(LdaConstant), U8(2),
+ B(KeyedLoadIC), R(13), U8(3),
+ B(Star), R(12),
+ /* 77 E> */ B(Call), R(12), R(13), U8(1), U8(1),
+ /* 77 E> */ B(Star), R(0),
+ /* 74 S> */ B(Ldar), R(0),
+ B(Star), R(14),
+ B(LoadIC), R(14), U8(3), U8(7),
+ B(Star), R(13),
+ /* 74 E> */ B(Call), R(13), R(14), U8(1), U8(5),
+ /* 74 E> */ B(Star), R(1),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(Ldar), R(1),
+ B(Star), R(12),
+ B(LoadIC), R(12), U8(4), U8(9),
+ B(JumpIfToBooleanTrue), U8(42),
+ B(LdaSmi), U8(2),
+ B(Star), R(2),
+ /* 67 E> */ B(Ldar), R(6),
+ B(Star), R(12),
+ B(Ldar), R(1),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(5), U8(11),
+ B(StoreICSloppy), R(12), U8(6), U8(13),
+ B(Ldar), R(3),
+ /* 62 E> */ B(StackCheck),
+ /* 88 S> */ B(Ldar), R(6),
+ B(Star), R(12),
+ /* 96 E> */ B(LoadIC), R(12), U8(6), U8(15),
+ B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
+ B(Jump), U8(63),
+ B(Jump), U8(-84),
+ B(Jump), U8(47),
+ B(Star), R(13),
+ B(LdaConstant), U8(7),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(12), U8(3),
+ B(Star), R(11),
+ B(PushContext), R(7),
+ B(Ldar), R(2),
+ B(Star), R(12),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(12),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
+ B(PopContext), R(7),
+ B(LdaSmi), U8(-1),
+ B(Star), R(8),
+ B(Jump), U8(8),
+ B(Star), R(9),
+ B(LdaSmi), U8(1),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(10),
+ B(Ldar), R(2),
+ B(Star), R(11),
+ B(LdaZero),
+ B(TestEqualStrict), R(11),
+ B(JumpIfTrue), U8(9),
+ B(Ldar), R(0),
+ B(Star), R(11),
+ B(LdaUndefined),
+ B(TestEqualStrict), R(11),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalseConstant), U8(11),
+ B(Ldar), R(0),
+ B(Star), R(11),
+ B(LoadIC), R(11), U8(8), U8(17),
+ B(Star), R(4),
+ B(Star), R(11),
+ B(LdaNull),
+ B(TestEqual), R(11),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(124),
+ B(Ldar), R(2),
+ B(Star), R(11),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(11),
+ B(JumpIfFalse), U8(79),
+ B(Ldar), R(4),
+ B(TypeOf),
+ B(Star), R(11),
+ B(LdaConstant), U8(9),
+ B(TestEqualStrict), R(11),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), U16(129),
+ B(Star), R(11),
+ B(LdaConstant), U8(10),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(11),
+ B(Ldar), R(4),
+ B(Star), R(12),
+ B(Ldar), R(0),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::k_Call), R(12), U8(2),
+ B(Jump), U8(30),
+ B(Star), R(13),
+ B(LdaConstant), U8(7),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(12), U8(3),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(7),
+ B(PopContext), R(7),
+ B(Jump), U8(37),
+ B(Ldar), R(4),
+ B(Star), R(11),
+ B(Ldar), R(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::k_Call), R(11), U8(2),
+ B(Star), R(5),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(11),
+ B(Ldar), R(5),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(10), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(7),
+ B(Jump), U8(8),
+ B(Ldar), R(9),
+ /* 105 S> */ B(Return),
+ B(Ldar), R(9),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 105 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden b/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
index fe7176c..f6b863f 100644
--- a/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(CreateClosure), U8(0), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(0),
+ /* 55 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -33,13 +33,13 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(1),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(Call), R(0), R(1), U8(1), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaUndefined),
+ B(Star), R(1),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 56 E> */ B(Call), R(0), R(1), U8(1), U8(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -55,15 +55,15 @@
parameter count: 1
bytecode array length: 19
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Star), R(1),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(Call), R(0), R(1), U8(2), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaUndefined),
+ B(Star), R(1),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ /* 67 E> */ B(Call), R(0), R(1), U8(2), U8(1),
+ /* 71 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/Generators.golden b/test/cctest/interpreter/bytecode_expectations/Generators.golden
new file mode 100644
index 0000000..46a6b4a
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/Generators.golden
@@ -0,0 +1,646 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: no
+test function name: f
+ignition generators: yes
+
+---
+snippet: "
+ function* f() { }
+"
+frame size: 11
+parameter count: 1
+bytecode array length: 203
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(20),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(1),
+ B(JumpIfTrue), U8(57),
+ B(LdaSmi), U8(76),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(4),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2),
+ B(StaContextSlot), R(context), U8(5),
+ B(Star), R(5),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(6),
+ B(LdaZero),
+ B(SuspendGenerator), R(6),
+ B(Ldar), R(5),
+ /* 16 S> */ B(Return),
+ B(LdaSmi), U8(-2),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kGeneratorGetInput), R(6), U8(1),
+ B(Star), R(7),
+ B(CallRuntime), U16(Runtime::kGeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(31),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(22),
+ B(Jump), U8(2),
+ B(Mov), R(7), R(9),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kCreateIterResultObject), R(9), U8(2),
+ B(Star), R(3),
+ B(LdaZero),
+ B(Star), R(2),
+ B(Jump), U8(36),
+ B(Ldar), R(7),
+ B(Throw),
+ B(LdaUndefined),
+ B(Star), R(5),
+ B(LdaTrue),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(5), U8(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ B(Jump), U8(14),
+ B(LdaSmi), U8(-1),
+ B(Star), R(2),
+ B(Jump), U8(8),
+ B(Star), R(3),
+ B(LdaSmi), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kGeneratorClose), R(5), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(16),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(13),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(Jump), U8(11),
+ B(Ldar), R(3),
+ /* 16 S> */ B(Return),
+ B(Ldar), R(3),
+ /* 16 S> */ B(Return),
+ B(Ldar), R(3),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 16 S> */ B(Return),
+]
+constant pool: [
+]
+handlers: [
+ [38, 139, 145],
+]
+
+---
+snippet: "
+ function* f() { yield 42 }
+"
+frame size: 11
+parameter count: 1
+bytecode array length: 297
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(26),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(1),
+ B(JumpIfTrue), U8(63),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(1),
+ B(JumpIfTrueConstant), U8(0),
+ B(LdaSmi), U8(76),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(4),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2),
+ B(StaContextSlot), R(context), U8(5),
+ B(Star), R(5),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(6),
+ B(LdaZero),
+ B(SuspendGenerator), R(6),
+ B(Ldar), R(5),
+ /* 25 S> */ B(Return),
+ B(LdaSmi), U8(-2),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kGeneratorGetInput), R(6), U8(1),
+ B(Star), R(7),
+ B(CallRuntime), U16(Runtime::kGeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(31),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(22),
+ B(Jump), U8(2),
+ B(Mov), R(7), R(9),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kCreateIterResultObject), R(9), U8(2),
+ B(Star), R(3),
+ B(LdaZero),
+ B(Star), R(2),
+ B(Jump), U8(115),
+ B(Ldar), R(7),
+ B(Throw),
+ /* 16 S> */ B(LdaSmi), U8(42),
+ B(Star), R(5),
+ B(LdaFalse),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(5), U8(2),
+ B(Star), R(7),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(5),
+ B(LdaSmi), U8(1),
+ B(SuspendGenerator), R(5),
+ B(Ldar), R(7),
+ /* 25 S> */ B(Return),
+ B(LdaSmi), U8(-2),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kGeneratorGetInput), R(5), U8(1),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kGeneratorGetResumeMode), R(5), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(32),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(8),
+ B(JumpIfTrue), U8(23),
+ B(Jump), U8(2),
+ B(Mov), R(6), R(9),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kCreateIterResultObject), R(9), U8(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Star), R(2),
+ B(Jump), U8(36),
+ B(Ldar), R(6),
+ B(Throw),
+ B(LdaUndefined),
+ B(Star), R(5),
+ B(LdaTrue),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(5), U8(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(2),
+ B(Star), R(2),
+ B(Jump), U8(14),
+ B(LdaSmi), U8(-1),
+ B(Star), R(2),
+ B(Jump), U8(8),
+ B(Star), R(3),
+ B(LdaSmi), U8(3),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kGeneratorClose), R(5), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(22),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(19),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(16),
+ B(LdaSmi), U8(3),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(13),
+ B(Jump), U8(14),
+ B(Ldar), R(3),
+ /* 25 S> */ B(Return),
+ B(Ldar), R(3),
+ /* 25 S> */ B(Return),
+ B(Ldar), R(3),
+ /* 25 S> */ B(Return),
+ B(Ldar), R(3),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 25 S> */ B(Return),
+]
+constant pool: [
+ kInstanceTypeDontCare,
+]
+handlers: [
+ [44, 224, 230],
+]
+
+---
+snippet: "
+ function* f() { for (let x of [42]) yield x }
+"
+frame size: 17
+parameter count: 1
+bytecode array length: 808
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(26),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(3),
+ B(LdaZero),
+ B(TestEqualStrict), R(3),
+ B(JumpIfTrue), U8(63),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(3),
+ B(JumpIfTrueConstant), U8(3),
+ B(LdaSmi), U8(76),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(6),
+ B(Ldar), R(closure),
+ B(Star), R(7),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(7), U8(2),
+ B(StaContextSlot), R(context), U8(5),
+ B(Star), R(7),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(8),
+ B(LdaZero),
+ B(SuspendGenerator), R(8),
+ B(Ldar), R(7),
+ /* 44 S> */ B(Return),
+ B(LdaSmi), U8(-2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kGeneratorGetInput), R(8), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kGeneratorGetResumeMode), R(8), U8(1),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrict), R(10),
+ B(JumpIfTrue), U8(31),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(10),
+ B(JumpIfTrue), U8(22),
+ B(Jump), U8(2),
+ B(Mov), R(9), R(11),
+ B(LdaTrue),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kCreateIterResultObject), R(11), U8(2),
+ B(Star), R(5),
+ B(LdaZero),
+ B(Star), R(4),
+ B(JumpConstant), U8(17),
+ B(Ldar), R(9),
+ B(Throw),
+ B(LdaConstant), U8(0),
+ B(Star), R(7),
+ B(Ldar), R(closure),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(7), U8(2),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ B(StaContextSlot), R(1), U8(10),
+ B(LdaZero),
+ B(StaContextSlot), R(1), U8(9),
+ B(Mov), R(context), R(9),
+ B(Mov), R(context), R(10),
+ /* 30 S> */ B(CreateArrayLiteral), U8(1), U8(0), U8(3),
+ B(Star), R(12),
+ /* 30 E> */ B(LdaConstant), U8(2),
+ B(KeyedLoadIC), R(12), U8(3),
+ B(Star), R(11),
+ /* 30 E> */ B(Call), R(11), R(12), U8(1), U8(1),
+ /* 30 E> */ B(StaContextSlot), R(1), U8(7),
+ B(LdaSmi), U8(-2),
+ B(TestEqual), R(3),
+ B(JumpIfTrue), U8(17),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(3),
+ B(JumpIfTrueConstant), U8(9),
+ B(LdaSmi), U8(76),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
+ /* 27 S> */ B(LdaContextSlot), R(1), U8(7),
+ B(Star), R(13),
+ B(LoadIC), R(13), U8(4), U8(7),
+ B(Star), R(12),
+ /* 27 E> */ B(Call), R(12), R(13), U8(1), U8(5),
+ /* 27 E> */ B(StaContextSlot), R(1), U8(8),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(12),
+ B(LdaContextSlot), R(1), U8(8),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(LdaContextSlot), R(1), U8(8),
+ B(Star), R(11),
+ B(LoadIC), R(11), U8(5), U8(9),
+ B(JumpIfToBooleanTrueConstant), U8(10),
+ B(LdaSmi), U8(2),
+ B(StaContextSlot), R(1), U8(9),
+ B(LdaContextSlot), R(1), U8(8),
+ B(Star), R(11),
+ B(LoadIC), R(11), U8(6), U8(11),
+ B(StaContextSlot), R(1), U8(6),
+ B(LdaContextSlot), R(1), U8(10),
+ /* 16 E> */ B(StackCheck),
+ B(LdaConstant), U8(7),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(11), U8(2),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaContextSlot), R(1), U8(6),
+ B(StaContextSlot), R(context), U8(4),
+ /* 36 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(8),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(12), U8(1),
+ B(Star), R(11),
+ B(LdaFalse),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(11), U8(2),
+ B(Star), R(13),
+ B(LdaContextSlot), R(1), U8(5),
+ B(Star), R(11),
+ B(LdaSmi), U8(1),
+ B(SuspendGenerator), R(11),
+ B(Ldar), R(13),
+ /* 44 S> */ B(Return),
+ B(LdaSmi), U8(-2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kGeneratorGetInput), R(11), U8(1),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kGeneratorGetResumeMode), R(11), U8(1),
+ B(Star), R(14),
+ B(LdaZero),
+ B(TestEqualStrict), R(14),
+ B(JumpIfTrue), U8(45),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(14),
+ B(JumpIfTrue), U8(36),
+ B(Jump), U8(2),
+ B(Mov), R(12), R(15),
+ B(LdaTrue),
+ B(Star), R(16),
+ B(CallRuntime), U16(Runtime::kCreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(PopContext), R(2),
+ B(Star), R(8),
+ B(LdaZero),
+ B(Star), R(7),
+ B(Jump), U8(78),
+ B(Ldar), R(12),
+ B(Throw),
+ B(Ldar), R(12),
+ B(PopContext), R(2),
+ B(LdaZero),
+ B(StaContextSlot), R(1), U8(9),
+ B(Wide), B(Jump), U16(-230),
+ B(Jump), U8(49),
+ B(Star), R(12),
+ B(LdaConstant), U8(11),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(11), U8(3),
+ B(Star), R(10),
+ B(PushContext), R(2),
+ B(LdaContextSlot), R(1), U8(9),
+ B(Star), R(11),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(11),
+ B(JumpIfFalse), U8(7),
+ B(LdaSmi), U8(1),
+ B(StaContextSlot), R(1), U8(9),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kReThrow), R(11), U8(1),
+ B(PopContext), R(2),
+ B(LdaSmi), U8(-1),
+ B(Star), R(7),
+ B(Jump), U8(8),
+ B(Star), R(8),
+ B(LdaSmi), U8(1),
+ B(Star), R(7),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(9),
+ B(LdaContextSlot), R(1), U8(9),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrict), R(10),
+ B(JumpIfTrue), U8(10),
+ B(LdaContextSlot), R(1), U8(7),
+ B(Star), R(10),
+ B(LdaUndefined),
+ B(TestEqualStrict), R(10),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalseConstant), U8(16),
+ B(LdaContextSlot), R(1), U8(7),
+ B(Star), R(10),
+ B(LoadIC), R(10), U8(12), U8(13),
+ B(StaContextSlot), R(1), U8(11),
+ B(LdaContextSlot), R(1), U8(11),
+ B(Star), R(10),
+ B(LdaNull),
+ B(TestEqual), R(10),
+ B(JumpIfFalse), U8(4),
+ B(JumpConstant), U8(15),
+ B(LdaContextSlot), R(1), U8(9),
+ B(Star), R(10),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(10),
+ B(JumpIfFalse), U8(82),
+ B(LdaContextSlot), R(1), U8(11),
+ B(TypeOf),
+ B(Star), R(10),
+ B(LdaConstant), U8(13),
+ B(TestEqualStrict), R(10),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), U16(129),
+ B(Star), R(10),
+ B(LdaConstant), U8(14),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(10),
+ B(LdaContextSlot), R(1), U8(11),
+ B(Star), R(11),
+ B(LdaContextSlot), R(1), U8(7),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::k_Call), R(11), U8(2),
+ B(Jump), U8(30),
+ B(Star), R(12),
+ B(LdaConstant), U8(11),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(11), U8(3),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(10),
+ B(PushContext), R(2),
+ B(PopContext), R(2),
+ B(Jump), U8(44),
+ B(LdaContextSlot), R(1), U8(11),
+ B(Star), R(10),
+ B(LdaContextSlot), R(1), U8(7),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::k_Call), R(10), U8(2),
+ B(StaContextSlot), R(1), U8(12),
+ B(LdaContextSlot), R(1), U8(12),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(10), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(12),
+ B(LdaContextSlot), R(1), U8(12),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(9), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(7),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(7),
+ B(JumpIfTrue), U8(18),
+ B(Jump), U8(30),
+ B(Ldar), R(8),
+ B(PopContext), R(1),
+ B(PopContext), R(1),
+ B(Star), R(5),
+ B(LdaSmi), U8(1),
+ B(Star), R(4),
+ B(Jump), U8(49),
+ B(Ldar), R(8),
+ B(PopContext), R(1),
+ B(PopContext), R(1),
+ B(Star), R(5),
+ B(LdaSmi), U8(2),
+ B(Star), R(4),
+ B(Jump), U8(35),
+ B(PopContext), R(1),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(LdaTrue),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(5),
+ B(LdaSmi), U8(3),
+ B(Star), R(4),
+ B(Jump), U8(14),
+ B(LdaSmi), U8(-1),
+ B(Star), R(4),
+ B(Jump), U8(8),
+ B(Star), R(5),
+ B(LdaSmi), U8(4),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(6),
+ B(LdaContextSlot), R(context), U8(5),
+ B(Star), R(7),
+ B(CallRuntime), U16(Runtime::kGeneratorClose), R(7), U8(1),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(6), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(28),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(25),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(22),
+ B(LdaSmi), U8(3),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(19),
+ B(LdaSmi), U8(4),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(16),
+ B(Jump), U8(17),
+ B(Ldar), R(5),
+ /* 44 S> */ B(Return),
+ B(Ldar), R(5),
+ /* 44 S> */ B(Return),
+ B(Ldar), R(5),
+ B(ReThrow),
+ B(Ldar), R(5),
+ /* 44 S> */ B(Return),
+ B(Ldar), R(5),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 44 S> */ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ kInstanceTypeDontCare,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ kInstanceTypeDontCare,
+ kInstanceTypeDontCare,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ kInstanceTypeDontCare,
+ kInstanceTypeDontCare,
+ kInstanceTypeDontCare,
+]
+handlers: [
+ [44, 726, 732],
+ [156, 462, 468],
+ [159, 413, 415],
+ [570, 585, 587],
+]
+
diff --git a/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden b/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
index 42a2c5b..89d31ee 100644
--- a/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
+++ b/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
@@ -18,13 +18,13 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(BitwiseAnd), R(0),
- B(StaGlobalSloppy), U8(0), U8(3),
- B(Return),
+ /* 26 E> */ B(StackCheck),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ B(BitwiseAnd), R(0),
+ /* 45 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+ /* 51 S> */ B(Return),
]
constant pool: [
"global",
@@ -42,13 +42,13 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(Add), R(0),
- B(StaGlobalSloppy), U8(0), U8(3),
- B(Return),
+ /* 27 E> */ B(StackCheck),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ B(Add), R(0),
+ /* 51 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+ /* 57 S> */ B(Return),
]
constant pool: [
"unallocated",
diff --git a/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden b/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
index 7d64503..df64018 100644
--- a/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
+++ b/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
@@ -16,14 +16,13 @@
"
frame size: 0
parameter count: 1
-bytecode array length: 10
+bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(ToNumber),
- B(Inc),
- B(StaGlobalSloppy), U8(0), U8(3),
- B(Return),
+ /* 26 E> */ B(StackCheck),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Inc),
+ /* 40 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+ /* 48 S> */ B(Return),
]
constant pool: [
"global",
@@ -41,14 +40,14 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(ToNumber),
- B(Star), R(0),
- B(Dec),
- B(StaGlobalSloppy), U8(0), U8(3),
- B(Ldar), R(0),
- B(Return),
+ /* 26 E> */ B(StackCheck),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(ToNumber),
+ B(Star), R(0),
+ B(Dec),
+ /* 44 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+ B(Ldar), R(0),
+ /* 48 S> */ B(Return),
]
constant pool: [
"global",
@@ -64,14 +63,13 @@
"
frame size: 0
parameter count: 1
-bytecode array length: 10
+bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(ToNumber),
- B(Dec),
- B(StaGlobalStrict), U8(0), U8(3),
- B(Return),
+ /* 27 E> */ B(StackCheck),
+ /* 46 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Dec),
+ /* 55 E> */ B(StaGlobalStrict), U8(0), U8(3),
+ /* 68 S> */ B(Return),
]
constant pool: [
"unallocated",
@@ -89,14 +87,14 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(ToNumber),
- B(Star), R(0),
- B(Inc),
- B(StaGlobalSloppy), U8(0), U8(3),
- B(Ldar), R(0),
- B(Return),
+ /* 27 E> */ B(StackCheck),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(ToNumber),
+ B(Star), R(0),
+ B(Inc),
+ /* 50 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+ B(Ldar), R(0),
+ /* 54 S> */ B(Return),
]
constant pool: [
"unallocated",
diff --git a/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden b/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
index ffed12e..fc86582 100644
--- a/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
+++ b/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
@@ -20,12 +20,12 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(DeletePropertySloppy), R(0),
- B(Return),
+ /* 32 E> */ B(StackCheck),
+ /* 39 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(DeletePropertySloppy), R(0),
+ /* 58 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -47,12 +47,12 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(DeletePropertyStrict), R(0),
- B(Return),
+ /* 28 E> */ B(StackCheck),
+ /* 51 S> */ B(LdaGlobal), U8(0), U8(1),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ B(DeletePropertyStrict), R(0),
+ /* 71 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -72,14 +72,14 @@
parameter count: 1
bytecode array length: 16
bytecodes: [
- B(StackCheck),
- B(LdaContextSlot), R(context), U8(3),
- B(Star), R(0),
- B(LdaContextSlot), R(0), U8(2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(DeletePropertySloppy), R(1),
- B(Return),
+ /* 32 E> */ B(StackCheck),
+ /* 39 S> */ B(LdaContextSlot), R(context), U8(3),
+ B(Star), R(0),
+ B(LdaContextSlot), R(0), U8(2),
+ B(Star), R(1),
+ B(LdaConstant), U8(0),
+ B(DeletePropertySloppy), R(1),
+ /* 56 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -99,14 +99,14 @@
parameter count: 1
bytecode array length: 16
bytecodes: [
- B(StackCheck),
- B(LdaContextSlot), R(context), U8(3),
- B(Star), R(0),
- B(LdaContextSlot), R(0), U8(2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(DeletePropertySloppy), R(1),
- B(Return),
+ /* 18 E> */ B(StackCheck),
+ /* 25 S> */ B(LdaContextSlot), R(context), U8(3),
+ B(Star), R(0),
+ B(LdaContextSlot), R(0), U8(2),
+ B(Star), R(1),
+ B(LdaConstant), U8(0),
+ B(DeletePropertySloppy), R(1),
+ /* 42 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden b/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
index 2ff2485..bcc4b67 100644
--- a/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
+++ b/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ /* 46 S> */ B(Return),
]
constant pool: [
1.2,
@@ -33,11 +33,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 47 S> */ B(LdaConstant), U8(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
1.2,
@@ -54,11 +54,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 48 S> */ B(LdaConstant), U8(1),
+ /* 61 S> */ B(Return),
]
constant pool: [
3.14,
@@ -331,523 +331,523 @@
parameter count: 1
bytecode array length: 1033
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(256),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(LdaConstant), U8(0),
+ /* 43 E> */ B(Star), R(0),
+ /* 52 S> */ B(LdaConstant), U8(1),
+ /* 54 E> */ B(Star), R(0),
+ /* 63 S> */ B(LdaConstant), U8(2),
+ /* 65 E> */ B(Star), R(0),
+ /* 74 S> */ B(LdaConstant), U8(3),
+ /* 76 E> */ B(Star), R(0),
+ /* 85 S> */ B(LdaConstant), U8(4),
+ /* 87 E> */ B(Star), R(0),
+ /* 96 S> */ B(LdaConstant), U8(5),
+ /* 98 E> */ B(Star), R(0),
+ /* 107 S> */ B(LdaConstant), U8(6),
+ /* 109 E> */ B(Star), R(0),
+ /* 118 S> */ B(LdaConstant), U8(7),
+ /* 120 E> */ B(Star), R(0),
+ /* 129 S> */ B(LdaConstant), U8(8),
+ /* 131 E> */ B(Star), R(0),
+ /* 140 S> */ B(LdaConstant), U8(9),
+ /* 142 E> */ B(Star), R(0),
+ /* 151 S> */ B(LdaConstant), U8(10),
+ /* 153 E> */ B(Star), R(0),
+ /* 162 S> */ B(LdaConstant), U8(11),
+ /* 164 E> */ B(Star), R(0),
+ /* 173 S> */ B(LdaConstant), U8(12),
+ /* 175 E> */ B(Star), R(0),
+ /* 184 S> */ B(LdaConstant), U8(13),
+ /* 186 E> */ B(Star), R(0),
+ /* 195 S> */ B(LdaConstant), U8(14),
+ /* 197 E> */ B(Star), R(0),
+ /* 206 S> */ B(LdaConstant), U8(15),
+ /* 208 E> */ B(Star), R(0),
+ /* 217 S> */ B(LdaConstant), U8(16),
+ /* 219 E> */ B(Star), R(0),
+ /* 228 S> */ B(LdaConstant), U8(17),
+ /* 230 E> */ B(Star), R(0),
+ /* 239 S> */ B(LdaConstant), U8(18),
+ /* 241 E> */ B(Star), R(0),
+ /* 250 S> */ B(LdaConstant), U8(19),
+ /* 252 E> */ B(Star), R(0),
+ /* 261 S> */ B(LdaConstant), U8(20),
+ /* 263 E> */ B(Star), R(0),
+ /* 272 S> */ B(LdaConstant), U8(21),
+ /* 274 E> */ B(Star), R(0),
+ /* 283 S> */ B(LdaConstant), U8(22),
+ /* 285 E> */ B(Star), R(0),
+ /* 294 S> */ B(LdaConstant), U8(23),
+ /* 296 E> */ B(Star), R(0),
+ /* 305 S> */ B(LdaConstant), U8(24),
+ /* 307 E> */ B(Star), R(0),
+ /* 316 S> */ B(LdaConstant), U8(25),
+ /* 318 E> */ B(Star), R(0),
+ /* 327 S> */ B(LdaConstant), U8(26),
+ /* 329 E> */ B(Star), R(0),
+ /* 338 S> */ B(LdaConstant), U8(27),
+ /* 340 E> */ B(Star), R(0),
+ /* 349 S> */ B(LdaConstant), U8(28),
+ /* 351 E> */ B(Star), R(0),
+ /* 360 S> */ B(LdaConstant), U8(29),
+ /* 362 E> */ B(Star), R(0),
+ /* 371 S> */ B(LdaConstant), U8(30),
+ /* 373 E> */ B(Star), R(0),
+ /* 382 S> */ B(LdaConstant), U8(31),
+ /* 384 E> */ B(Star), R(0),
+ /* 393 S> */ B(LdaConstant), U8(32),
+ /* 395 E> */ B(Star), R(0),
+ /* 404 S> */ B(LdaConstant), U8(33),
+ /* 406 E> */ B(Star), R(0),
+ /* 415 S> */ B(LdaConstant), U8(34),
+ /* 417 E> */ B(Star), R(0),
+ /* 426 S> */ B(LdaConstant), U8(35),
+ /* 428 E> */ B(Star), R(0),
+ /* 437 S> */ B(LdaConstant), U8(36),
+ /* 439 E> */ B(Star), R(0),
+ /* 448 S> */ B(LdaConstant), U8(37),
+ /* 450 E> */ B(Star), R(0),
+ /* 459 S> */ B(LdaConstant), U8(38),
+ /* 461 E> */ B(Star), R(0),
+ /* 470 S> */ B(LdaConstant), U8(39),
+ /* 472 E> */ B(Star), R(0),
+ /* 481 S> */ B(LdaConstant), U8(40),
+ /* 483 E> */ B(Star), R(0),
+ /* 492 S> */ B(LdaConstant), U8(41),
+ /* 494 E> */ B(Star), R(0),
+ /* 503 S> */ B(LdaConstant), U8(42),
+ /* 505 E> */ B(Star), R(0),
+ /* 514 S> */ B(LdaConstant), U8(43),
+ /* 516 E> */ B(Star), R(0),
+ /* 525 S> */ B(LdaConstant), U8(44),
+ /* 527 E> */ B(Star), R(0),
+ /* 536 S> */ B(LdaConstant), U8(45),
+ /* 538 E> */ B(Star), R(0),
+ /* 547 S> */ B(LdaConstant), U8(46),
+ /* 549 E> */ B(Star), R(0),
+ /* 558 S> */ B(LdaConstant), U8(47),
+ /* 560 E> */ B(Star), R(0),
+ /* 569 S> */ B(LdaConstant), U8(48),
+ /* 571 E> */ B(Star), R(0),
+ /* 580 S> */ B(LdaConstant), U8(49),
+ /* 582 E> */ B(Star), R(0),
+ /* 591 S> */ B(LdaConstant), U8(50),
+ /* 593 E> */ B(Star), R(0),
+ /* 602 S> */ B(LdaConstant), U8(51),
+ /* 604 E> */ B(Star), R(0),
+ /* 613 S> */ B(LdaConstant), U8(52),
+ /* 615 E> */ B(Star), R(0),
+ /* 624 S> */ B(LdaConstant), U8(53),
+ /* 626 E> */ B(Star), R(0),
+ /* 635 S> */ B(LdaConstant), U8(54),
+ /* 637 E> */ B(Star), R(0),
+ /* 646 S> */ B(LdaConstant), U8(55),
+ /* 648 E> */ B(Star), R(0),
+ /* 657 S> */ B(LdaConstant), U8(56),
+ /* 659 E> */ B(Star), R(0),
+ /* 668 S> */ B(LdaConstant), U8(57),
+ /* 670 E> */ B(Star), R(0),
+ /* 679 S> */ B(LdaConstant), U8(58),
+ /* 681 E> */ B(Star), R(0),
+ /* 690 S> */ B(LdaConstant), U8(59),
+ /* 692 E> */ B(Star), R(0),
+ /* 701 S> */ B(LdaConstant), U8(60),
+ /* 703 E> */ B(Star), R(0),
+ /* 712 S> */ B(LdaConstant), U8(61),
+ /* 714 E> */ B(Star), R(0),
+ /* 723 S> */ B(LdaConstant), U8(62),
+ /* 725 E> */ B(Star), R(0),
+ /* 734 S> */ B(LdaConstant), U8(63),
+ /* 736 E> */ B(Star), R(0),
+ /* 745 S> */ B(LdaConstant), U8(64),
+ /* 747 E> */ B(Star), R(0),
+ /* 756 S> */ B(LdaConstant), U8(65),
+ /* 758 E> */ B(Star), R(0),
+ /* 767 S> */ B(LdaConstant), U8(66),
+ /* 769 E> */ B(Star), R(0),
+ /* 778 S> */ B(LdaConstant), U8(67),
+ /* 780 E> */ B(Star), R(0),
+ /* 789 S> */ B(LdaConstant), U8(68),
+ /* 791 E> */ B(Star), R(0),
+ /* 800 S> */ B(LdaConstant), U8(69),
+ /* 802 E> */ B(Star), R(0),
+ /* 811 S> */ B(LdaConstant), U8(70),
+ /* 813 E> */ B(Star), R(0),
+ /* 822 S> */ B(LdaConstant), U8(71),
+ /* 824 E> */ B(Star), R(0),
+ /* 833 S> */ B(LdaConstant), U8(72),
+ /* 835 E> */ B(Star), R(0),
+ /* 844 S> */ B(LdaConstant), U8(73),
+ /* 846 E> */ B(Star), R(0),
+ /* 855 S> */ B(LdaConstant), U8(74),
+ /* 857 E> */ B(Star), R(0),
+ /* 866 S> */ B(LdaConstant), U8(75),
+ /* 868 E> */ B(Star), R(0),
+ /* 877 S> */ B(LdaConstant), U8(76),
+ /* 879 E> */ B(Star), R(0),
+ /* 888 S> */ B(LdaConstant), U8(77),
+ /* 890 E> */ B(Star), R(0),
+ /* 899 S> */ B(LdaConstant), U8(78),
+ /* 901 E> */ B(Star), R(0),
+ /* 910 S> */ B(LdaConstant), U8(79),
+ /* 912 E> */ B(Star), R(0),
+ /* 921 S> */ B(LdaConstant), U8(80),
+ /* 923 E> */ B(Star), R(0),
+ /* 932 S> */ B(LdaConstant), U8(81),
+ /* 934 E> */ B(Star), R(0),
+ /* 943 S> */ B(LdaConstant), U8(82),
+ /* 945 E> */ B(Star), R(0),
+ /* 954 S> */ B(LdaConstant), U8(83),
+ /* 956 E> */ B(Star), R(0),
+ /* 965 S> */ B(LdaConstant), U8(84),
+ /* 967 E> */ B(Star), R(0),
+ /* 976 S> */ B(LdaConstant), U8(85),
+ /* 978 E> */ B(Star), R(0),
+ /* 987 S> */ B(LdaConstant), U8(86),
+ /* 989 E> */ B(Star), R(0),
+ /* 998 S> */ B(LdaConstant), U8(87),
+ /* 1000 E> */ B(Star), R(0),
+ /* 1009 S> */ B(LdaConstant), U8(88),
+ /* 1011 E> */ B(Star), R(0),
+ /* 1020 S> */ B(LdaConstant), U8(89),
+ /* 1022 E> */ B(Star), R(0),
+ /* 1031 S> */ B(LdaConstant), U8(90),
+ /* 1033 E> */ B(Star), R(0),
+ /* 1042 S> */ B(LdaConstant), U8(91),
+ /* 1044 E> */ B(Star), R(0),
+ /* 1053 S> */ B(LdaConstant), U8(92),
+ /* 1055 E> */ B(Star), R(0),
+ /* 1064 S> */ B(LdaConstant), U8(93),
+ /* 1066 E> */ B(Star), R(0),
+ /* 1075 S> */ B(LdaConstant), U8(94),
+ /* 1077 E> */ B(Star), R(0),
+ /* 1086 S> */ B(LdaConstant), U8(95),
+ /* 1088 E> */ B(Star), R(0),
+ /* 1097 S> */ B(LdaConstant), U8(96),
+ /* 1099 E> */ B(Star), R(0),
+ /* 1108 S> */ B(LdaConstant), U8(97),
+ /* 1110 E> */ B(Star), R(0),
+ /* 1119 S> */ B(LdaConstant), U8(98),
+ /* 1121 E> */ B(Star), R(0),
+ /* 1130 S> */ B(LdaConstant), U8(99),
+ /* 1132 E> */ B(Star), R(0),
+ /* 1141 S> */ B(LdaConstant), U8(100),
+ /* 1143 E> */ B(Star), R(0),
+ /* 1152 S> */ B(LdaConstant), U8(101),
+ /* 1154 E> */ B(Star), R(0),
+ /* 1163 S> */ B(LdaConstant), U8(102),
+ /* 1165 E> */ B(Star), R(0),
+ /* 1174 S> */ B(LdaConstant), U8(103),
+ /* 1176 E> */ B(Star), R(0),
+ /* 1185 S> */ B(LdaConstant), U8(104),
+ /* 1187 E> */ B(Star), R(0),
+ /* 1196 S> */ B(LdaConstant), U8(105),
+ /* 1198 E> */ B(Star), R(0),
+ /* 1207 S> */ B(LdaConstant), U8(106),
+ /* 1209 E> */ B(Star), R(0),
+ /* 1218 S> */ B(LdaConstant), U8(107),
+ /* 1220 E> */ B(Star), R(0),
+ /* 1229 S> */ B(LdaConstant), U8(108),
+ /* 1231 E> */ B(Star), R(0),
+ /* 1240 S> */ B(LdaConstant), U8(109),
+ /* 1242 E> */ B(Star), R(0),
+ /* 1251 S> */ B(LdaConstant), U8(110),
+ /* 1253 E> */ B(Star), R(0),
+ /* 1262 S> */ B(LdaConstant), U8(111),
+ /* 1264 E> */ B(Star), R(0),
+ /* 1273 S> */ B(LdaConstant), U8(112),
+ /* 1275 E> */ B(Star), R(0),
+ /* 1284 S> */ B(LdaConstant), U8(113),
+ /* 1286 E> */ B(Star), R(0),
+ /* 1295 S> */ B(LdaConstant), U8(114),
+ /* 1297 E> */ B(Star), R(0),
+ /* 1306 S> */ B(LdaConstant), U8(115),
+ /* 1308 E> */ B(Star), R(0),
+ /* 1317 S> */ B(LdaConstant), U8(116),
+ /* 1319 E> */ B(Star), R(0),
+ /* 1328 S> */ B(LdaConstant), U8(117),
+ /* 1330 E> */ B(Star), R(0),
+ /* 1339 S> */ B(LdaConstant), U8(118),
+ /* 1341 E> */ B(Star), R(0),
+ /* 1350 S> */ B(LdaConstant), U8(119),
+ /* 1352 E> */ B(Star), R(0),
+ /* 1361 S> */ B(LdaConstant), U8(120),
+ /* 1363 E> */ B(Star), R(0),
+ /* 1372 S> */ B(LdaConstant), U8(121),
+ /* 1374 E> */ B(Star), R(0),
+ /* 1383 S> */ B(LdaConstant), U8(122),
+ /* 1385 E> */ B(Star), R(0),
+ /* 1394 S> */ B(LdaConstant), U8(123),
+ /* 1396 E> */ B(Star), R(0),
+ /* 1405 S> */ B(LdaConstant), U8(124),
+ /* 1407 E> */ B(Star), R(0),
+ /* 1416 S> */ B(LdaConstant), U8(125),
+ /* 1418 E> */ B(Star), R(0),
+ /* 1427 S> */ B(LdaConstant), U8(126),
+ /* 1429 E> */ B(Star), R(0),
+ /* 1438 S> */ B(LdaConstant), U8(127),
+ /* 1440 E> */ B(Star), R(0),
+ /* 1449 S> */ B(LdaConstant), U8(128),
+ /* 1451 E> */ B(Star), R(0),
+ /* 1460 S> */ B(LdaConstant), U8(129),
+ /* 1462 E> */ B(Star), R(0),
+ /* 1471 S> */ B(LdaConstant), U8(130),
+ /* 1473 E> */ B(Star), R(0),
+ /* 1482 S> */ B(LdaConstant), U8(131),
+ /* 1484 E> */ B(Star), R(0),
+ /* 1493 S> */ B(LdaConstant), U8(132),
+ /* 1495 E> */ B(Star), R(0),
+ /* 1504 S> */ B(LdaConstant), U8(133),
+ /* 1506 E> */ B(Star), R(0),
+ /* 1515 S> */ B(LdaConstant), U8(134),
+ /* 1517 E> */ B(Star), R(0),
+ /* 1526 S> */ B(LdaConstant), U8(135),
+ /* 1528 E> */ B(Star), R(0),
+ /* 1537 S> */ B(LdaConstant), U8(136),
+ /* 1539 E> */ B(Star), R(0),
+ /* 1548 S> */ B(LdaConstant), U8(137),
+ /* 1550 E> */ B(Star), R(0),
+ /* 1559 S> */ B(LdaConstant), U8(138),
+ /* 1561 E> */ B(Star), R(0),
+ /* 1570 S> */ B(LdaConstant), U8(139),
+ /* 1572 E> */ B(Star), R(0),
+ /* 1581 S> */ B(LdaConstant), U8(140),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1592 S> */ B(LdaConstant), U8(141),
+ /* 1594 E> */ B(Star), R(0),
+ /* 1603 S> */ B(LdaConstant), U8(142),
+ /* 1605 E> */ B(Star), R(0),
+ /* 1614 S> */ B(LdaConstant), U8(143),
+ /* 1616 E> */ B(Star), R(0),
+ /* 1625 S> */ B(LdaConstant), U8(144),
+ /* 1627 E> */ B(Star), R(0),
+ /* 1636 S> */ B(LdaConstant), U8(145),
+ /* 1638 E> */ B(Star), R(0),
+ /* 1647 S> */ B(LdaConstant), U8(146),
+ /* 1649 E> */ B(Star), R(0),
+ /* 1658 S> */ B(LdaConstant), U8(147),
+ /* 1660 E> */ B(Star), R(0),
+ /* 1669 S> */ B(LdaConstant), U8(148),
+ /* 1671 E> */ B(Star), R(0),
+ /* 1680 S> */ B(LdaConstant), U8(149),
+ /* 1682 E> */ B(Star), R(0),
+ /* 1691 S> */ B(LdaConstant), U8(150),
+ /* 1693 E> */ B(Star), R(0),
+ /* 1702 S> */ B(LdaConstant), U8(151),
+ /* 1704 E> */ B(Star), R(0),
+ /* 1713 S> */ B(LdaConstant), U8(152),
+ /* 1715 E> */ B(Star), R(0),
+ /* 1724 S> */ B(LdaConstant), U8(153),
+ /* 1726 E> */ B(Star), R(0),
+ /* 1735 S> */ B(LdaConstant), U8(154),
+ /* 1737 E> */ B(Star), R(0),
+ /* 1746 S> */ B(LdaConstant), U8(155),
+ /* 1748 E> */ B(Star), R(0),
+ /* 1757 S> */ B(LdaConstant), U8(156),
+ /* 1759 E> */ B(Star), R(0),
+ /* 1768 S> */ B(LdaConstant), U8(157),
+ /* 1770 E> */ B(Star), R(0),
+ /* 1779 S> */ B(LdaConstant), U8(158),
+ /* 1781 E> */ B(Star), R(0),
+ /* 1790 S> */ B(LdaConstant), U8(159),
+ /* 1792 E> */ B(Star), R(0),
+ /* 1801 S> */ B(LdaConstant), U8(160),
+ /* 1803 E> */ B(Star), R(0),
+ /* 1812 S> */ B(LdaConstant), U8(161),
+ /* 1814 E> */ B(Star), R(0),
+ /* 1823 S> */ B(LdaConstant), U8(162),
+ /* 1825 E> */ B(Star), R(0),
+ /* 1834 S> */ B(LdaConstant), U8(163),
+ /* 1836 E> */ B(Star), R(0),
+ /* 1845 S> */ B(LdaConstant), U8(164),
+ /* 1847 E> */ B(Star), R(0),
+ /* 1856 S> */ B(LdaConstant), U8(165),
+ /* 1858 E> */ B(Star), R(0),
+ /* 1867 S> */ B(LdaConstant), U8(166),
+ /* 1869 E> */ B(Star), R(0),
+ /* 1878 S> */ B(LdaConstant), U8(167),
+ /* 1880 E> */ B(Star), R(0),
+ /* 1889 S> */ B(LdaConstant), U8(168),
+ /* 1891 E> */ B(Star), R(0),
+ /* 1900 S> */ B(LdaConstant), U8(169),
+ /* 1902 E> */ B(Star), R(0),
+ /* 1911 S> */ B(LdaConstant), U8(170),
+ /* 1913 E> */ B(Star), R(0),
+ /* 1922 S> */ B(LdaConstant), U8(171),
+ /* 1924 E> */ B(Star), R(0),
+ /* 1933 S> */ B(LdaConstant), U8(172),
+ /* 1935 E> */ B(Star), R(0),
+ /* 1944 S> */ B(LdaConstant), U8(173),
+ /* 1946 E> */ B(Star), R(0),
+ /* 1955 S> */ B(LdaConstant), U8(174),
+ /* 1957 E> */ B(Star), R(0),
+ /* 1966 S> */ B(LdaConstant), U8(175),
+ /* 1968 E> */ B(Star), R(0),
+ /* 1977 S> */ B(LdaConstant), U8(176),
+ /* 1979 E> */ B(Star), R(0),
+ /* 1988 S> */ B(LdaConstant), U8(177),
+ /* 1990 E> */ B(Star), R(0),
+ /* 1999 S> */ B(LdaConstant), U8(178),
+ /* 2001 E> */ B(Star), R(0),
+ /* 2010 S> */ B(LdaConstant), U8(179),
+ /* 2012 E> */ B(Star), R(0),
+ /* 2021 S> */ B(LdaConstant), U8(180),
+ /* 2023 E> */ B(Star), R(0),
+ /* 2032 S> */ B(LdaConstant), U8(181),
+ /* 2034 E> */ B(Star), R(0),
+ /* 2043 S> */ B(LdaConstant), U8(182),
+ /* 2045 E> */ B(Star), R(0),
+ /* 2054 S> */ B(LdaConstant), U8(183),
+ /* 2056 E> */ B(Star), R(0),
+ /* 2065 S> */ B(LdaConstant), U8(184),
+ /* 2067 E> */ B(Star), R(0),
+ /* 2076 S> */ B(LdaConstant), U8(185),
+ /* 2078 E> */ B(Star), R(0),
+ /* 2087 S> */ B(LdaConstant), U8(186),
+ /* 2089 E> */ B(Star), R(0),
+ /* 2098 S> */ B(LdaConstant), U8(187),
+ /* 2100 E> */ B(Star), R(0),
+ /* 2109 S> */ B(LdaConstant), U8(188),
+ /* 2111 E> */ B(Star), R(0),
+ /* 2120 S> */ B(LdaConstant), U8(189),
+ /* 2122 E> */ B(Star), R(0),
+ /* 2131 S> */ B(LdaConstant), U8(190),
+ /* 2133 E> */ B(Star), R(0),
+ /* 2142 S> */ B(LdaConstant), U8(191),
+ /* 2144 E> */ B(Star), R(0),
+ /* 2153 S> */ B(LdaConstant), U8(192),
+ /* 2155 E> */ B(Star), R(0),
+ /* 2164 S> */ B(LdaConstant), U8(193),
+ /* 2166 E> */ B(Star), R(0),
+ /* 2175 S> */ B(LdaConstant), U8(194),
+ /* 2177 E> */ B(Star), R(0),
+ /* 2186 S> */ B(LdaConstant), U8(195),
+ /* 2188 E> */ B(Star), R(0),
+ /* 2197 S> */ B(LdaConstant), U8(196),
+ /* 2199 E> */ B(Star), R(0),
+ /* 2208 S> */ B(LdaConstant), U8(197),
+ /* 2210 E> */ B(Star), R(0),
+ /* 2219 S> */ B(LdaConstant), U8(198),
+ /* 2221 E> */ B(Star), R(0),
+ /* 2230 S> */ B(LdaConstant), U8(199),
+ /* 2232 E> */ B(Star), R(0),
+ /* 2241 S> */ B(LdaConstant), U8(200),
+ /* 2243 E> */ B(Star), R(0),
+ /* 2252 S> */ B(LdaConstant), U8(201),
+ /* 2254 E> */ B(Star), R(0),
+ /* 2263 S> */ B(LdaConstant), U8(202),
+ /* 2265 E> */ B(Star), R(0),
+ /* 2274 S> */ B(LdaConstant), U8(203),
+ /* 2276 E> */ B(Star), R(0),
+ /* 2285 S> */ B(LdaConstant), U8(204),
+ /* 2287 E> */ B(Star), R(0),
+ /* 2296 S> */ B(LdaConstant), U8(205),
+ /* 2298 E> */ B(Star), R(0),
+ /* 2307 S> */ B(LdaConstant), U8(206),
+ /* 2309 E> */ B(Star), R(0),
+ /* 2318 S> */ B(LdaConstant), U8(207),
+ /* 2320 E> */ B(Star), R(0),
+ /* 2329 S> */ B(LdaConstant), U8(208),
+ /* 2331 E> */ B(Star), R(0),
+ /* 2340 S> */ B(LdaConstant), U8(209),
+ /* 2342 E> */ B(Star), R(0),
+ /* 2351 S> */ B(LdaConstant), U8(210),
+ /* 2353 E> */ B(Star), R(0),
+ /* 2362 S> */ B(LdaConstant), U8(211),
+ /* 2364 E> */ B(Star), R(0),
+ /* 2373 S> */ B(LdaConstant), U8(212),
+ /* 2375 E> */ B(Star), R(0),
+ /* 2384 S> */ B(LdaConstant), U8(213),
+ /* 2386 E> */ B(Star), R(0),
+ /* 2395 S> */ B(LdaConstant), U8(214),
+ /* 2397 E> */ B(Star), R(0),
+ /* 2406 S> */ B(LdaConstant), U8(215),
+ /* 2408 E> */ B(Star), R(0),
+ /* 2417 S> */ B(LdaConstant), U8(216),
+ /* 2419 E> */ B(Star), R(0),
+ /* 2428 S> */ B(LdaConstant), U8(217),
+ /* 2430 E> */ B(Star), R(0),
+ /* 2439 S> */ B(LdaConstant), U8(218),
+ /* 2441 E> */ B(Star), R(0),
+ /* 2450 S> */ B(LdaConstant), U8(219),
+ /* 2452 E> */ B(Star), R(0),
+ /* 2461 S> */ B(LdaConstant), U8(220),
+ /* 2463 E> */ B(Star), R(0),
+ /* 2472 S> */ B(LdaConstant), U8(221),
+ /* 2474 E> */ B(Star), R(0),
+ /* 2483 S> */ B(LdaConstant), U8(222),
+ /* 2485 E> */ B(Star), R(0),
+ /* 2494 S> */ B(LdaConstant), U8(223),
+ /* 2496 E> */ B(Star), R(0),
+ /* 2505 S> */ B(LdaConstant), U8(224),
+ /* 2507 E> */ B(Star), R(0),
+ /* 2516 S> */ B(LdaConstant), U8(225),
+ /* 2518 E> */ B(Star), R(0),
+ /* 2527 S> */ B(LdaConstant), U8(226),
+ /* 2529 E> */ B(Star), R(0),
+ /* 2538 S> */ B(LdaConstant), U8(227),
+ /* 2540 E> */ B(Star), R(0),
+ /* 2549 S> */ B(LdaConstant), U8(228),
+ /* 2551 E> */ B(Star), R(0),
+ /* 2560 S> */ B(LdaConstant), U8(229),
+ /* 2562 E> */ B(Star), R(0),
+ /* 2571 S> */ B(LdaConstant), U8(230),
+ /* 2573 E> */ B(Star), R(0),
+ /* 2582 S> */ B(LdaConstant), U8(231),
+ /* 2584 E> */ B(Star), R(0),
+ /* 2593 S> */ B(LdaConstant), U8(232),
+ /* 2595 E> */ B(Star), R(0),
+ /* 2604 S> */ B(LdaConstant), U8(233),
+ /* 2606 E> */ B(Star), R(0),
+ /* 2615 S> */ B(LdaConstant), U8(234),
+ /* 2617 E> */ B(Star), R(0),
+ /* 2626 S> */ B(LdaConstant), U8(235),
+ /* 2628 E> */ B(Star), R(0),
+ /* 2637 S> */ B(LdaConstant), U8(236),
+ /* 2639 E> */ B(Star), R(0),
+ /* 2648 S> */ B(LdaConstant), U8(237),
+ /* 2650 E> */ B(Star), R(0),
+ /* 2659 S> */ B(LdaConstant), U8(238),
+ /* 2661 E> */ B(Star), R(0),
+ /* 2670 S> */ B(LdaConstant), U8(239),
+ /* 2672 E> */ B(Star), R(0),
+ /* 2681 S> */ B(LdaConstant), U8(240),
+ /* 2683 E> */ B(Star), R(0),
+ /* 2692 S> */ B(LdaConstant), U8(241),
+ /* 2694 E> */ B(Star), R(0),
+ /* 2703 S> */ B(LdaConstant), U8(242),
+ /* 2705 E> */ B(Star), R(0),
+ /* 2714 S> */ B(LdaConstant), U8(243),
+ /* 2716 E> */ B(Star), R(0),
+ /* 2725 S> */ B(LdaConstant), U8(244),
+ /* 2727 E> */ B(Star), R(0),
+ /* 2736 S> */ B(LdaConstant), U8(245),
+ /* 2738 E> */ B(Star), R(0),
+ /* 2747 S> */ B(LdaConstant), U8(246),
+ /* 2749 E> */ B(Star), R(0),
+ /* 2758 S> */ B(LdaConstant), U8(247),
+ /* 2760 E> */ B(Star), R(0),
+ /* 2769 S> */ B(LdaConstant), U8(248),
+ /* 2771 E> */ B(Star), R(0),
+ /* 2780 S> */ B(LdaConstant), U8(249),
+ /* 2782 E> */ B(Star), R(0),
+ /* 2791 S> */ B(LdaConstant), U8(250),
+ /* 2793 E> */ B(Star), R(0),
+ /* 2802 S> */ B(LdaConstant), U8(251),
+ /* 2804 E> */ B(Star), R(0),
+ /* 2813 S> */ B(LdaConstant), U8(252),
+ /* 2815 E> */ B(Star), R(0),
+ /* 2824 S> */ B(LdaConstant), U8(253),
+ /* 2826 E> */ B(Star), R(0),
+ /* 2835 S> */ B(LdaConstant), U8(254),
+ /* 2837 E> */ B(Star), R(0),
+ /* 2846 S> */ B(LdaConstant), U8(255),
+ /* 2848 E> */ B(Star), R(0),
+ /* 2857 S> */ B(Wide), B(LdaConstant), U16(256),
+ /* 2859 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 2867 S> */ B(Return),
]
constant pool: [
1.414,
diff --git a/test/cctest/interpreter/bytecode_expectations/IfConditions.golden b/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
index f450f3f..2d66970 100644
--- a/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
+++ b/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
@@ -3,7 +3,7 @@
#
---
-pool type: number
+pool type: mixed
execute: yes
wrap: no
test function name: f
@@ -23,9 +23,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(-1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 55 S> */ B(LdaSmi), U8(-1),
+ /* 70 S> */ B(Return),
]
constant pool: [
]
@@ -47,9 +47,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 36 S> */ B(LdaSmi), U8(1),
+ /* 76 S> */ B(Return),
]
constant pool: [
]
@@ -71,9 +71,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(-1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 59 S> */ B(LdaSmi), U8(-1),
+ /* 74 S> */ B(Return),
]
constant pool: [
]
@@ -93,9 +93,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 17 S> */ B(LdaUndefined),
+ /* 48 S> */ B(Return),
]
constant pool: [
]
@@ -118,20 +118,20 @@
parameter count: 1
bytecode array length: 24
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(14),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(5),
- B(LdaSmi), U8(2),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 25 S> */ B(LdaSmi), U8(1),
+ /* 25 E> */ B(Star), R(0),
+ /* 30 S> */ B(JumpIfToBooleanFalse), U8(14),
+ /* 43 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Add), R(1),
+ /* 45 E> */ B(Star), R(0),
+ B(Jump), U8(5),
+ /* 66 S> */ B(LdaSmi), U8(2),
+ /* 80 S> */ B(Return),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
]
constant pool: [
]
@@ -153,18 +153,18 @@
parameter count: 2
bytecode array length: 22
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaZero),
- B(TestLessThanOrEqual), R(0),
- B(JumpIfFalse), U8(7),
- B(Wide), B(LdaSmi), U16(200),
- B(Return),
- B(Wide), B(LdaSmi), U16(-200),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 18 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaZero),
+ /* 24 E> */ B(TestLessThanOrEqual), R(0),
+ B(JumpIfFalse), U8(7),
+ /* 36 S> */ B(Wide), B(LdaSmi), U16(200),
+ /* 80 S> */ B(Return),
+ /* 63 S> */ B(Wide), B(LdaSmi), U16(-200),
+ /* 80 S> */ B(Return),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
]
constant pool: [
]
@@ -179,16 +179,16 @@
parameter count: 3
bytecode array length: 18
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestIn), R(0),
- B(JumpIfFalse), U8(7),
- B(Wide), B(LdaSmi), U16(200),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 28 E> */ B(Ldar), R(arg1),
+ /* 25 E> */ B(TestIn), R(0),
+ B(JumpIfFalse), U8(7),
+ /* 33 S> */ B(Wide), B(LdaSmi), U16(200),
+ /* 47 S> */ B(Return),
+ B(LdaUndefined),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -268,155 +268,155 @@
parameter count: 2
bytecode array length: 287
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaConstant), U8(0),
- B(TestEqualStrict), R(2),
- B(JumpIfFalseConstant), U8(1),
- B(Ldar), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Wide), B(LdaSmi), U16(200),
- B(Return),
- B(Wide), B(LdaSmi), U16(-200),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 24 S> */ B(LdaZero),
+ /* 24 E> */ B(Star), R(0),
+ /* 35 S> */ B(LdaZero),
+ /* 35 E> */ B(Star), R(1),
+ /* 38 S> */ B(Ldar), R(0),
+ B(Star), R(2),
+ B(LdaConstant), U8(0),
+ /* 44 E> */ B(TestEqualStrict), R(2),
+ B(JumpIfFalseConstant), U8(1),
+ /* 58 S> */ B(Ldar), R(0),
+ /* 60 E> */ B(Star), R(1),
+ /* 65 S> */ B(Star), R(0),
+ /* 74 S> */ B(Star), R(1),
+ /* 81 S> */ B(Star), R(0),
+ /* 90 S> */ B(Star), R(1),
+ /* 97 S> */ B(Star), R(0),
+ /* 106 S> */ B(Star), R(1),
+ /* 113 S> */ B(Star), R(0),
+ /* 122 S> */ B(Star), R(1),
+ /* 129 S> */ B(Star), R(0),
+ /* 138 S> */ B(Star), R(1),
+ /* 145 S> */ B(Star), R(0),
+ /* 154 S> */ B(Star), R(1),
+ /* 161 S> */ B(Star), R(0),
+ /* 170 S> */ B(Star), R(1),
+ /* 177 S> */ B(Star), R(0),
+ /* 186 S> */ B(Star), R(1),
+ /* 193 S> */ B(Star), R(0),
+ /* 202 S> */ B(Star), R(1),
+ /* 209 S> */ B(Star), R(0),
+ /* 218 S> */ B(Star), R(1),
+ /* 225 S> */ B(Star), R(0),
+ /* 234 S> */ B(Star), R(1),
+ /* 241 S> */ B(Star), R(0),
+ /* 250 S> */ B(Star), R(1),
+ /* 257 S> */ B(Star), R(0),
+ /* 266 S> */ B(Star), R(1),
+ /* 273 S> */ B(Star), R(0),
+ /* 282 S> */ B(Star), R(1),
+ /* 289 S> */ B(Star), R(0),
+ /* 298 S> */ B(Star), R(1),
+ /* 305 S> */ B(Star), R(0),
+ /* 314 S> */ B(Star), R(1),
+ /* 321 S> */ B(Star), R(0),
+ /* 330 S> */ B(Star), R(1),
+ /* 337 S> */ B(Star), R(0),
+ /* 346 S> */ B(Star), R(1),
+ /* 353 S> */ B(Star), R(0),
+ /* 362 S> */ B(Star), R(1),
+ /* 369 S> */ B(Star), R(0),
+ /* 378 S> */ B(Star), R(1),
+ /* 385 S> */ B(Star), R(0),
+ /* 394 S> */ B(Star), R(1),
+ /* 401 S> */ B(Star), R(0),
+ /* 410 S> */ B(Star), R(1),
+ /* 417 S> */ B(Star), R(0),
+ /* 426 S> */ B(Star), R(1),
+ /* 433 S> */ B(Star), R(0),
+ /* 442 S> */ B(Star), R(1),
+ /* 449 S> */ B(Star), R(0),
+ /* 458 S> */ B(Star), R(1),
+ /* 465 S> */ B(Star), R(0),
+ /* 474 S> */ B(Star), R(1),
+ /* 481 S> */ B(Star), R(0),
+ /* 490 S> */ B(Star), R(1),
+ /* 497 S> */ B(Star), R(0),
+ /* 506 S> */ B(Star), R(1),
+ /* 513 S> */ B(Star), R(0),
+ /* 522 S> */ B(Star), R(1),
+ /* 529 S> */ B(Star), R(0),
+ /* 538 S> */ B(Star), R(1),
+ /* 545 S> */ B(Star), R(0),
+ /* 554 S> */ B(Star), R(1),
+ /* 561 S> */ B(Star), R(0),
+ /* 570 S> */ B(Star), R(1),
+ /* 577 S> */ B(Star), R(0),
+ /* 586 S> */ B(Star), R(1),
+ /* 593 S> */ B(Star), R(0),
+ /* 602 S> */ B(Star), R(1),
+ /* 609 S> */ B(Star), R(0),
+ /* 618 S> */ B(Star), R(1),
+ /* 625 S> */ B(Star), R(0),
+ /* 634 S> */ B(Star), R(1),
+ /* 641 S> */ B(Star), R(0),
+ /* 650 S> */ B(Star), R(1),
+ /* 657 S> */ B(Star), R(0),
+ /* 666 S> */ B(Star), R(1),
+ /* 673 S> */ B(Star), R(0),
+ /* 682 S> */ B(Star), R(1),
+ /* 689 S> */ B(Star), R(0),
+ /* 698 S> */ B(Star), R(1),
+ /* 705 S> */ B(Star), R(0),
+ /* 714 S> */ B(Star), R(1),
+ /* 721 S> */ B(Star), R(0),
+ /* 730 S> */ B(Star), R(1),
+ /* 737 S> */ B(Star), R(0),
+ /* 746 S> */ B(Star), R(1),
+ /* 753 S> */ B(Star), R(0),
+ /* 762 S> */ B(Star), R(1),
+ /* 769 S> */ B(Star), R(0),
+ /* 778 S> */ B(Star), R(1),
+ /* 785 S> */ B(Star), R(0),
+ /* 794 S> */ B(Star), R(1),
+ /* 801 S> */ B(Star), R(0),
+ /* 810 S> */ B(Star), R(1),
+ /* 817 S> */ B(Star), R(0),
+ /* 826 S> */ B(Star), R(1),
+ /* 833 S> */ B(Star), R(0),
+ /* 842 S> */ B(Star), R(1),
+ /* 849 S> */ B(Star), R(0),
+ /* 858 S> */ B(Star), R(1),
+ /* 865 S> */ B(Star), R(0),
+ /* 874 S> */ B(Star), R(1),
+ /* 881 S> */ B(Star), R(0),
+ /* 890 S> */ B(Star), R(1),
+ /* 897 S> */ B(Star), R(0),
+ /* 906 S> */ B(Star), R(1),
+ /* 913 S> */ B(Star), R(0),
+ /* 922 S> */ B(Star), R(1),
+ /* 929 S> */ B(Star), R(0),
+ /* 938 S> */ B(Star), R(1),
+ /* 945 S> */ B(Star), R(0),
+ /* 954 S> */ B(Star), R(1),
+ /* 961 S> */ B(Star), R(0),
+ /* 970 S> */ B(Star), R(1),
+ /* 977 S> */ B(Star), R(0),
+ /* 986 S> */ B(Star), R(1),
+ /* 993 S> */ B(Star), R(0),
+ /* 1002 S> */ B(Star), R(1),
+ /* 1009 S> */ B(Star), R(0),
+ /* 1018 S> */ B(Star), R(1),
+ /* 1025 S> */ B(Star), R(0),
+ /* 1034 S> */ B(Star), R(1),
+ /* 1041 S> */ B(Star), R(0),
+ /* 1050 S> */ B(Star), R(1),
+ /* 1057 S> */ B(Star), R(0),
+ /* 1066 S> */ B(Star), R(1),
+ /* 1073 S> */ B(Star), R(0),
+ /* 1081 S> */ B(Wide), B(LdaSmi), U16(200),
+ /* 1117 S> */ B(Return),
+ /* 1102 S> */ B(Wide), B(LdaSmi), U16(-200),
+ /* 1117 S> */ B(Return),
+ B(LdaUndefined),
+ /* 1117 S> */ B(Return),
]
constant pool: [
- 0.01,
- 265,
+ InstanceType::HEAP_NUMBER_TYPE,
+ kInstanceTypeDontCare,
]
handlers: [
]
@@ -498,151 +498,151 @@
parameter count: 1
bytecode array length: 281
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfToBooleanFalseConstant), U8(0),
- B(Ldar), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Star), R(0),
- B(Wide), B(LdaSmi), U16(200),
- B(Return),
- B(Wide), B(LdaSmi), U16(-200),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 25 S> */ B(LdaZero),
+ /* 25 E> */ B(Star), R(0),
+ /* 36 S> */ B(LdaZero),
+ /* 36 E> */ B(Star), R(1),
+ /* 41 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanFalseConstant), U8(0),
+ /* 52 S> */ B(Ldar), R(0),
+ /* 54 E> */ B(Star), R(1),
+ /* 59 S> */ B(Star), R(0),
+ /* 68 S> */ B(Star), R(1),
+ /* 75 S> */ B(Star), R(0),
+ /* 84 S> */ B(Star), R(1),
+ /* 91 S> */ B(Star), R(0),
+ /* 100 S> */ B(Star), R(1),
+ /* 107 S> */ B(Star), R(0),
+ /* 116 S> */ B(Star), R(1),
+ /* 123 S> */ B(Star), R(0),
+ /* 132 S> */ B(Star), R(1),
+ /* 139 S> */ B(Star), R(0),
+ /* 148 S> */ B(Star), R(1),
+ /* 155 S> */ B(Star), R(0),
+ /* 164 S> */ B(Star), R(1),
+ /* 171 S> */ B(Star), R(0),
+ /* 180 S> */ B(Star), R(1),
+ /* 187 S> */ B(Star), R(0),
+ /* 196 S> */ B(Star), R(1),
+ /* 203 S> */ B(Star), R(0),
+ /* 212 S> */ B(Star), R(1),
+ /* 219 S> */ B(Star), R(0),
+ /* 228 S> */ B(Star), R(1),
+ /* 235 S> */ B(Star), R(0),
+ /* 244 S> */ B(Star), R(1),
+ /* 251 S> */ B(Star), R(0),
+ /* 260 S> */ B(Star), R(1),
+ /* 267 S> */ B(Star), R(0),
+ /* 276 S> */ B(Star), R(1),
+ /* 283 S> */ B(Star), R(0),
+ /* 292 S> */ B(Star), R(1),
+ /* 299 S> */ B(Star), R(0),
+ /* 308 S> */ B(Star), R(1),
+ /* 315 S> */ B(Star), R(0),
+ /* 324 S> */ B(Star), R(1),
+ /* 331 S> */ B(Star), R(0),
+ /* 340 S> */ B(Star), R(1),
+ /* 347 S> */ B(Star), R(0),
+ /* 356 S> */ B(Star), R(1),
+ /* 363 S> */ B(Star), R(0),
+ /* 372 S> */ B(Star), R(1),
+ /* 379 S> */ B(Star), R(0),
+ /* 388 S> */ B(Star), R(1),
+ /* 395 S> */ B(Star), R(0),
+ /* 404 S> */ B(Star), R(1),
+ /* 411 S> */ B(Star), R(0),
+ /* 420 S> */ B(Star), R(1),
+ /* 427 S> */ B(Star), R(0),
+ /* 436 S> */ B(Star), R(1),
+ /* 443 S> */ B(Star), R(0),
+ /* 452 S> */ B(Star), R(1),
+ /* 459 S> */ B(Star), R(0),
+ /* 468 S> */ B(Star), R(1),
+ /* 475 S> */ B(Star), R(0),
+ /* 484 S> */ B(Star), R(1),
+ /* 491 S> */ B(Star), R(0),
+ /* 500 S> */ B(Star), R(1),
+ /* 507 S> */ B(Star), R(0),
+ /* 516 S> */ B(Star), R(1),
+ /* 523 S> */ B(Star), R(0),
+ /* 532 S> */ B(Star), R(1),
+ /* 539 S> */ B(Star), R(0),
+ /* 548 S> */ B(Star), R(1),
+ /* 555 S> */ B(Star), R(0),
+ /* 564 S> */ B(Star), R(1),
+ /* 571 S> */ B(Star), R(0),
+ /* 580 S> */ B(Star), R(1),
+ /* 587 S> */ B(Star), R(0),
+ /* 596 S> */ B(Star), R(1),
+ /* 603 S> */ B(Star), R(0),
+ /* 612 S> */ B(Star), R(1),
+ /* 619 S> */ B(Star), R(0),
+ /* 628 S> */ B(Star), R(1),
+ /* 635 S> */ B(Star), R(0),
+ /* 644 S> */ B(Star), R(1),
+ /* 651 S> */ B(Star), R(0),
+ /* 660 S> */ B(Star), R(1),
+ /* 667 S> */ B(Star), R(0),
+ /* 676 S> */ B(Star), R(1),
+ /* 683 S> */ B(Star), R(0),
+ /* 692 S> */ B(Star), R(1),
+ /* 699 S> */ B(Star), R(0),
+ /* 708 S> */ B(Star), R(1),
+ /* 715 S> */ B(Star), R(0),
+ /* 724 S> */ B(Star), R(1),
+ /* 731 S> */ B(Star), R(0),
+ /* 740 S> */ B(Star), R(1),
+ /* 747 S> */ B(Star), R(0),
+ /* 756 S> */ B(Star), R(1),
+ /* 763 S> */ B(Star), R(0),
+ /* 772 S> */ B(Star), R(1),
+ /* 779 S> */ B(Star), R(0),
+ /* 788 S> */ B(Star), R(1),
+ /* 795 S> */ B(Star), R(0),
+ /* 804 S> */ B(Star), R(1),
+ /* 811 S> */ B(Star), R(0),
+ /* 820 S> */ B(Star), R(1),
+ /* 827 S> */ B(Star), R(0),
+ /* 836 S> */ B(Star), R(1),
+ /* 843 S> */ B(Star), R(0),
+ /* 852 S> */ B(Star), R(1),
+ /* 859 S> */ B(Star), R(0),
+ /* 868 S> */ B(Star), R(1),
+ /* 875 S> */ B(Star), R(0),
+ /* 884 S> */ B(Star), R(1),
+ /* 891 S> */ B(Star), R(0),
+ /* 900 S> */ B(Star), R(1),
+ /* 907 S> */ B(Star), R(0),
+ /* 916 S> */ B(Star), R(1),
+ /* 923 S> */ B(Star), R(0),
+ /* 932 S> */ B(Star), R(1),
+ /* 939 S> */ B(Star), R(0),
+ /* 948 S> */ B(Star), R(1),
+ /* 955 S> */ B(Star), R(0),
+ /* 964 S> */ B(Star), R(1),
+ /* 971 S> */ B(Star), R(0),
+ /* 980 S> */ B(Star), R(1),
+ /* 987 S> */ B(Star), R(0),
+ /* 996 S> */ B(Star), R(1),
+ /* 1003 S> */ B(Star), R(0),
+ /* 1012 S> */ B(Star), R(1),
+ /* 1019 S> */ B(Star), R(0),
+ /* 1028 S> */ B(Star), R(1),
+ /* 1035 S> */ B(Star), R(0),
+ /* 1044 S> */ B(Star), R(1),
+ /* 1051 S> */ B(Star), R(0),
+ /* 1060 S> */ B(Star), R(1),
+ /* 1067 S> */ B(Star), R(0),
+ /* 1076 S> */ B(Wide), B(LdaSmi), U16(200),
+ /* 1112 S> */ B(Return),
+ /* 1097 S> */ B(Wide), B(LdaSmi), U16(-200),
+ /* 1112 S> */ B(Return),
+ B(LdaUndefined),
+ /* 1112 S> */ B(Return),
]
constant pool: [
- 265,
+ kInstanceTypeDontCare,
]
handlers: [
]
@@ -666,65 +666,65 @@
parameter count: 3
bytecode array length: 107
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestEqual), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestEqualStrict), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestLessThan), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestGreaterThan), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestLessThanOrEqual), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestGreaterThanOrEqual), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestIn), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(TestInstanceOf), R(0),
- B(JumpIfFalse), U8(5),
- B(LdaSmi), U8(1),
- B(Return),
- B(LdaZero),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 21 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 30 E> */ B(Ldar), R(arg1),
+ /* 27 E> */ B(TestEqual), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 35 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 49 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 59 E> */ B(Ldar), R(arg1),
+ /* 55 E> */ B(TestEqualStrict), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 64 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 78 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 86 E> */ B(Ldar), R(arg1),
+ /* 84 E> */ B(TestLessThan), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 91 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 113 E> */ B(Ldar), R(arg1),
+ /* 111 E> */ B(TestGreaterThan), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 118 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 132 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 141 E> */ B(Ldar), R(arg1),
+ /* 138 E> */ B(TestLessThanOrEqual), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 146 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 160 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 169 E> */ B(Ldar), R(arg1),
+ /* 166 E> */ B(TestGreaterThanOrEqual), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 174 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 188 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 197 E> */ B(Ldar), R(arg1),
+ /* 194 E> */ B(TestIn), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 202 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 216 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 233 E> */ B(Ldar), R(arg1),
+ /* 222 E> */ B(TestInstanceOf), R(0),
+ B(JumpIfFalse), U8(5),
+ /* 238 S> */ B(LdaSmi), U8(1),
+ /* 262 S> */ B(Return),
+ /* 252 S> */ B(LdaZero),
+ /* 262 S> */ B(Return),
]
constant pool: [
]
@@ -747,16 +747,16 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(5),
- B(LdaSmi), U8(20),
- B(Return),
- B(LdaSmi), U8(-20),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 25 S> */ B(LdaZero),
+ /* 25 E> */ B(Star), R(0),
+ /* 30 S> */ B(JumpIfToBooleanFalse), U8(5),
+ /* 43 S> */ B(LdaSmi), U8(20),
+ /* 85 S> */ B(Return),
+ /* 69 S> */ B(LdaSmi), U8(-20),
+ /* 85 S> */ B(Return),
+ B(LdaUndefined),
+ /* 85 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/IntegerConstants.golden b/test/cctest/interpreter/bytecode_expectations/IntegerConstants.golden
index 1c37c12..f82e5f8 100644
--- a/test/cctest/interpreter/bytecode_expectations/IntegerConstants.golden
+++ b/test/cctest/interpreter/bytecode_expectations/IntegerConstants.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(ExtraWide), B(LdaSmi), U32(12345678),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(ExtraWide), B(LdaSmi), U32(12345678),
+ /* 51 S> */ B(Return),
]
constant pool: [
]
@@ -32,11 +32,11 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(Wide), B(LdaSmi), U16(1234),
- B(Star), R(0),
- B(Wide), B(LdaSmi), U16(5678),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(Wide), B(LdaSmi), U16(1234),
+ /* 42 E> */ B(Star), R(0),
+ /* 48 S> */ B(Wide), B(LdaSmi), U16(5678),
+ /* 61 S> */ B(Return),
]
constant pool: [
]
@@ -51,11 +51,11 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(Wide), B(LdaSmi), U16(1234),
- B(Star), R(0),
- B(Wide), B(LdaSmi), U16(1234),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(Wide), B(LdaSmi), U16(1234),
+ /* 42 E> */ B(Star), R(0),
+ /* 48 S> */ B(Wide), B(LdaSmi), U16(1234),
+ /* 61 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden b/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
index 3f0b49d..84810b1 100644
--- a/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
+++ b/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
@@ -331,659 +331,659 @@
parameter count: 1
bytecode array length: 1422
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(256),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(257),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(258),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(259),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(260),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(261),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(262),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(263),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(264),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(265),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(266),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(267),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(268),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(269),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(270),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(271),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(272),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(273),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(274),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(275),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(276),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(277),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(278),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(279),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(280),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(281),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(282),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(283),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(284),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(285),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(286),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(287),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(288),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(289),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(290),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(291),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(292),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(293),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(294),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(295),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(296),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(297),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(298),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(299),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(300),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(301),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(302),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(303),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(304),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(305),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(306),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(307),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(308),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(309),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(310),
- B(Star), R(0),
- B(Wide), B(LdaConstant), U16(311),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(TestLessThan), R(2),
- B(Wide), B(JumpIfFalse), U16(46),
- B(StackCheck),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(TestEqual), R(2),
- B(Wide), B(JumpIfFalse), U16(7),
- B(Wide), B(Jump), U16(19),
- B(Ldar), R(1),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(TestEqual), R(2),
- B(Wide), B(JumpIfFalse), U16(7),
- B(Wide), B(Jump), U16(13),
- B(Ldar), R(1),
- B(ToNumber),
- B(Star), R(2),
- B(Inc),
- B(Star), R(1),
- B(Jump), U8(-53),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 55 S> */ B(LdaConstant), U8(1),
+ /* 55 E> */ B(Star), R(0),
+ /* 68 S> */ B(LdaConstant), U8(2),
+ /* 68 E> */ B(Star), R(0),
+ /* 81 S> */ B(LdaConstant), U8(3),
+ /* 81 E> */ B(Star), R(0),
+ /* 94 S> */ B(LdaConstant), U8(4),
+ /* 94 E> */ B(Star), R(0),
+ /* 107 S> */ B(LdaConstant), U8(5),
+ /* 107 E> */ B(Star), R(0),
+ /* 120 S> */ B(LdaConstant), U8(6),
+ /* 120 E> */ B(Star), R(0),
+ /* 133 S> */ B(LdaConstant), U8(7),
+ /* 133 E> */ B(Star), R(0),
+ /* 146 S> */ B(LdaConstant), U8(8),
+ /* 146 E> */ B(Star), R(0),
+ /* 159 S> */ B(LdaConstant), U8(9),
+ /* 159 E> */ B(Star), R(0),
+ /* 172 S> */ B(LdaConstant), U8(10),
+ /* 172 E> */ B(Star), R(0),
+ /* 185 S> */ B(LdaConstant), U8(11),
+ /* 185 E> */ B(Star), R(0),
+ /* 198 S> */ B(LdaConstant), U8(12),
+ /* 198 E> */ B(Star), R(0),
+ /* 211 S> */ B(LdaConstant), U8(13),
+ /* 211 E> */ B(Star), R(0),
+ /* 224 S> */ B(LdaConstant), U8(14),
+ /* 224 E> */ B(Star), R(0),
+ /* 237 S> */ B(LdaConstant), U8(15),
+ /* 237 E> */ B(Star), R(0),
+ /* 250 S> */ B(LdaConstant), U8(16),
+ /* 250 E> */ B(Star), R(0),
+ /* 263 S> */ B(LdaConstant), U8(17),
+ /* 263 E> */ B(Star), R(0),
+ /* 276 S> */ B(LdaConstant), U8(18),
+ /* 276 E> */ B(Star), R(0),
+ /* 289 S> */ B(LdaConstant), U8(19),
+ /* 289 E> */ B(Star), R(0),
+ /* 302 S> */ B(LdaConstant), U8(20),
+ /* 302 E> */ B(Star), R(0),
+ /* 315 S> */ B(LdaConstant), U8(21),
+ /* 315 E> */ B(Star), R(0),
+ /* 328 S> */ B(LdaConstant), U8(22),
+ /* 328 E> */ B(Star), R(0),
+ /* 341 S> */ B(LdaConstant), U8(23),
+ /* 341 E> */ B(Star), R(0),
+ /* 354 S> */ B(LdaConstant), U8(24),
+ /* 354 E> */ B(Star), R(0),
+ /* 367 S> */ B(LdaConstant), U8(25),
+ /* 367 E> */ B(Star), R(0),
+ /* 380 S> */ B(LdaConstant), U8(26),
+ /* 380 E> */ B(Star), R(0),
+ /* 393 S> */ B(LdaConstant), U8(27),
+ /* 393 E> */ B(Star), R(0),
+ /* 406 S> */ B(LdaConstant), U8(28),
+ /* 406 E> */ B(Star), R(0),
+ /* 419 S> */ B(LdaConstant), U8(29),
+ /* 419 E> */ B(Star), R(0),
+ /* 432 S> */ B(LdaConstant), U8(30),
+ /* 432 E> */ B(Star), R(0),
+ /* 445 S> */ B(LdaConstant), U8(31),
+ /* 445 E> */ B(Star), R(0),
+ /* 458 S> */ B(LdaConstant), U8(32),
+ /* 458 E> */ B(Star), R(0),
+ /* 471 S> */ B(LdaConstant), U8(33),
+ /* 471 E> */ B(Star), R(0),
+ /* 484 S> */ B(LdaConstant), U8(34),
+ /* 484 E> */ B(Star), R(0),
+ /* 497 S> */ B(LdaConstant), U8(35),
+ /* 497 E> */ B(Star), R(0),
+ /* 510 S> */ B(LdaConstant), U8(36),
+ /* 510 E> */ B(Star), R(0),
+ /* 523 S> */ B(LdaConstant), U8(37),
+ /* 523 E> */ B(Star), R(0),
+ /* 536 S> */ B(LdaConstant), U8(38),
+ /* 536 E> */ B(Star), R(0),
+ /* 549 S> */ B(LdaConstant), U8(39),
+ /* 549 E> */ B(Star), R(0),
+ /* 562 S> */ B(LdaConstant), U8(40),
+ /* 562 E> */ B(Star), R(0),
+ /* 575 S> */ B(LdaConstant), U8(41),
+ /* 575 E> */ B(Star), R(0),
+ /* 588 S> */ B(LdaConstant), U8(42),
+ /* 588 E> */ B(Star), R(0),
+ /* 601 S> */ B(LdaConstant), U8(43),
+ /* 601 E> */ B(Star), R(0),
+ /* 614 S> */ B(LdaConstant), U8(44),
+ /* 614 E> */ B(Star), R(0),
+ /* 627 S> */ B(LdaConstant), U8(45),
+ /* 627 E> */ B(Star), R(0),
+ /* 640 S> */ B(LdaConstant), U8(46),
+ /* 640 E> */ B(Star), R(0),
+ /* 653 S> */ B(LdaConstant), U8(47),
+ /* 653 E> */ B(Star), R(0),
+ /* 666 S> */ B(LdaConstant), U8(48),
+ /* 666 E> */ B(Star), R(0),
+ /* 679 S> */ B(LdaConstant), U8(49),
+ /* 679 E> */ B(Star), R(0),
+ /* 692 S> */ B(LdaConstant), U8(50),
+ /* 692 E> */ B(Star), R(0),
+ /* 705 S> */ B(LdaConstant), U8(51),
+ /* 705 E> */ B(Star), R(0),
+ /* 718 S> */ B(LdaConstant), U8(52),
+ /* 718 E> */ B(Star), R(0),
+ /* 731 S> */ B(LdaConstant), U8(53),
+ /* 731 E> */ B(Star), R(0),
+ /* 744 S> */ B(LdaConstant), U8(54),
+ /* 744 E> */ B(Star), R(0),
+ /* 757 S> */ B(LdaConstant), U8(55),
+ /* 757 E> */ B(Star), R(0),
+ /* 770 S> */ B(LdaConstant), U8(56),
+ /* 770 E> */ B(Star), R(0),
+ /* 783 S> */ B(LdaConstant), U8(57),
+ /* 783 E> */ B(Star), R(0),
+ /* 796 S> */ B(LdaConstant), U8(58),
+ /* 796 E> */ B(Star), R(0),
+ /* 809 S> */ B(LdaConstant), U8(59),
+ /* 809 E> */ B(Star), R(0),
+ /* 822 S> */ B(LdaConstant), U8(60),
+ /* 822 E> */ B(Star), R(0),
+ /* 835 S> */ B(LdaConstant), U8(61),
+ /* 835 E> */ B(Star), R(0),
+ /* 848 S> */ B(LdaConstant), U8(62),
+ /* 848 E> */ B(Star), R(0),
+ /* 861 S> */ B(LdaConstant), U8(63),
+ /* 861 E> */ B(Star), R(0),
+ /* 874 S> */ B(LdaConstant), U8(64),
+ /* 874 E> */ B(Star), R(0),
+ /* 887 S> */ B(LdaConstant), U8(65),
+ /* 887 E> */ B(Star), R(0),
+ /* 900 S> */ B(LdaConstant), U8(66),
+ /* 900 E> */ B(Star), R(0),
+ /* 913 S> */ B(LdaConstant), U8(67),
+ /* 913 E> */ B(Star), R(0),
+ /* 926 S> */ B(LdaConstant), U8(68),
+ /* 926 E> */ B(Star), R(0),
+ /* 939 S> */ B(LdaConstant), U8(69),
+ /* 939 E> */ B(Star), R(0),
+ /* 952 S> */ B(LdaConstant), U8(70),
+ /* 952 E> */ B(Star), R(0),
+ /* 965 S> */ B(LdaConstant), U8(71),
+ /* 965 E> */ B(Star), R(0),
+ /* 978 S> */ B(LdaConstant), U8(72),
+ /* 978 E> */ B(Star), R(0),
+ /* 991 S> */ B(LdaConstant), U8(73),
+ /* 991 E> */ B(Star), R(0),
+ /* 1004 S> */ B(LdaConstant), U8(74),
+ /* 1004 E> */ B(Star), R(0),
+ /* 1017 S> */ B(LdaConstant), U8(75),
+ /* 1017 E> */ B(Star), R(0),
+ /* 1030 S> */ B(LdaConstant), U8(76),
+ /* 1030 E> */ B(Star), R(0),
+ /* 1043 S> */ B(LdaConstant), U8(77),
+ /* 1043 E> */ B(Star), R(0),
+ /* 1056 S> */ B(LdaConstant), U8(78),
+ /* 1056 E> */ B(Star), R(0),
+ /* 1069 S> */ B(LdaConstant), U8(79),
+ /* 1069 E> */ B(Star), R(0),
+ /* 1082 S> */ B(LdaConstant), U8(80),
+ /* 1082 E> */ B(Star), R(0),
+ /* 1095 S> */ B(LdaConstant), U8(81),
+ /* 1095 E> */ B(Star), R(0),
+ /* 1108 S> */ B(LdaConstant), U8(82),
+ /* 1108 E> */ B(Star), R(0),
+ /* 1121 S> */ B(LdaConstant), U8(83),
+ /* 1121 E> */ B(Star), R(0),
+ /* 1134 S> */ B(LdaConstant), U8(84),
+ /* 1134 E> */ B(Star), R(0),
+ /* 1147 S> */ B(LdaConstant), U8(85),
+ /* 1147 E> */ B(Star), R(0),
+ /* 1160 S> */ B(LdaConstant), U8(86),
+ /* 1160 E> */ B(Star), R(0),
+ /* 1173 S> */ B(LdaConstant), U8(87),
+ /* 1173 E> */ B(Star), R(0),
+ /* 1186 S> */ B(LdaConstant), U8(88),
+ /* 1186 E> */ B(Star), R(0),
+ /* 1199 S> */ B(LdaConstant), U8(89),
+ /* 1199 E> */ B(Star), R(0),
+ /* 1212 S> */ B(LdaConstant), U8(90),
+ /* 1212 E> */ B(Star), R(0),
+ /* 1225 S> */ B(LdaConstant), U8(91),
+ /* 1225 E> */ B(Star), R(0),
+ /* 1238 S> */ B(LdaConstant), U8(92),
+ /* 1238 E> */ B(Star), R(0),
+ /* 1251 S> */ B(LdaConstant), U8(93),
+ /* 1251 E> */ B(Star), R(0),
+ /* 1264 S> */ B(LdaConstant), U8(94),
+ /* 1264 E> */ B(Star), R(0),
+ /* 1277 S> */ B(LdaConstant), U8(95),
+ /* 1277 E> */ B(Star), R(0),
+ /* 1290 S> */ B(LdaConstant), U8(96),
+ /* 1290 E> */ B(Star), R(0),
+ /* 1303 S> */ B(LdaConstant), U8(97),
+ /* 1303 E> */ B(Star), R(0),
+ /* 1316 S> */ B(LdaConstant), U8(98),
+ /* 1316 E> */ B(Star), R(0),
+ /* 1329 S> */ B(LdaConstant), U8(99),
+ /* 1329 E> */ B(Star), R(0),
+ /* 1342 S> */ B(LdaConstant), U8(100),
+ /* 1342 E> */ B(Star), R(0),
+ /* 1355 S> */ B(LdaConstant), U8(101),
+ /* 1355 E> */ B(Star), R(0),
+ /* 1368 S> */ B(LdaConstant), U8(102),
+ /* 1368 E> */ B(Star), R(0),
+ /* 1381 S> */ B(LdaConstant), U8(103),
+ /* 1381 E> */ B(Star), R(0),
+ /* 1394 S> */ B(LdaConstant), U8(104),
+ /* 1394 E> */ B(Star), R(0),
+ /* 1407 S> */ B(LdaConstant), U8(105),
+ /* 1407 E> */ B(Star), R(0),
+ /* 1420 S> */ B(LdaConstant), U8(106),
+ /* 1420 E> */ B(Star), R(0),
+ /* 1433 S> */ B(LdaConstant), U8(107),
+ /* 1433 E> */ B(Star), R(0),
+ /* 1446 S> */ B(LdaConstant), U8(108),
+ /* 1446 E> */ B(Star), R(0),
+ /* 1459 S> */ B(LdaConstant), U8(109),
+ /* 1459 E> */ B(Star), R(0),
+ /* 1472 S> */ B(LdaConstant), U8(110),
+ /* 1472 E> */ B(Star), R(0),
+ /* 1485 S> */ B(LdaConstant), U8(111),
+ /* 1485 E> */ B(Star), R(0),
+ /* 1498 S> */ B(LdaConstant), U8(112),
+ /* 1498 E> */ B(Star), R(0),
+ /* 1511 S> */ B(LdaConstant), U8(113),
+ /* 1511 E> */ B(Star), R(0),
+ /* 1524 S> */ B(LdaConstant), U8(114),
+ /* 1524 E> */ B(Star), R(0),
+ /* 1537 S> */ B(LdaConstant), U8(115),
+ /* 1537 E> */ B(Star), R(0),
+ /* 1550 S> */ B(LdaConstant), U8(116),
+ /* 1550 E> */ B(Star), R(0),
+ /* 1563 S> */ B(LdaConstant), U8(117),
+ /* 1563 E> */ B(Star), R(0),
+ /* 1576 S> */ B(LdaConstant), U8(118),
+ /* 1576 E> */ B(Star), R(0),
+ /* 1589 S> */ B(LdaConstant), U8(119),
+ /* 1589 E> */ B(Star), R(0),
+ /* 1602 S> */ B(LdaConstant), U8(120),
+ /* 1602 E> */ B(Star), R(0),
+ /* 1615 S> */ B(LdaConstant), U8(121),
+ /* 1615 E> */ B(Star), R(0),
+ /* 1628 S> */ B(LdaConstant), U8(122),
+ /* 1628 E> */ B(Star), R(0),
+ /* 1641 S> */ B(LdaConstant), U8(123),
+ /* 1641 E> */ B(Star), R(0),
+ /* 1654 S> */ B(LdaConstant), U8(124),
+ /* 1654 E> */ B(Star), R(0),
+ /* 1667 S> */ B(LdaConstant), U8(125),
+ /* 1667 E> */ B(Star), R(0),
+ /* 1680 S> */ B(LdaConstant), U8(126),
+ /* 1680 E> */ B(Star), R(0),
+ /* 1693 S> */ B(LdaConstant), U8(127),
+ /* 1693 E> */ B(Star), R(0),
+ /* 1706 S> */ B(LdaConstant), U8(128),
+ /* 1706 E> */ B(Star), R(0),
+ /* 1719 S> */ B(LdaConstant), U8(129),
+ /* 1719 E> */ B(Star), R(0),
+ /* 1732 S> */ B(LdaConstant), U8(130),
+ /* 1732 E> */ B(Star), R(0),
+ /* 1745 S> */ B(LdaConstant), U8(131),
+ /* 1745 E> */ B(Star), R(0),
+ /* 1758 S> */ B(LdaConstant), U8(132),
+ /* 1758 E> */ B(Star), R(0),
+ /* 1771 S> */ B(LdaConstant), U8(133),
+ /* 1771 E> */ B(Star), R(0),
+ /* 1784 S> */ B(LdaConstant), U8(134),
+ /* 1784 E> */ B(Star), R(0),
+ /* 1797 S> */ B(LdaConstant), U8(135),
+ /* 1797 E> */ B(Star), R(0),
+ /* 1810 S> */ B(LdaConstant), U8(136),
+ /* 1810 E> */ B(Star), R(0),
+ /* 1823 S> */ B(LdaConstant), U8(137),
+ /* 1823 E> */ B(Star), R(0),
+ /* 1836 S> */ B(LdaConstant), U8(138),
+ /* 1836 E> */ B(Star), R(0),
+ /* 1849 S> */ B(LdaConstant), U8(139),
+ /* 1849 E> */ B(Star), R(0),
+ /* 1862 S> */ B(LdaConstant), U8(140),
+ /* 1862 E> */ B(Star), R(0),
+ /* 1875 S> */ B(LdaConstant), U8(141),
+ /* 1875 E> */ B(Star), R(0),
+ /* 1888 S> */ B(LdaConstant), U8(142),
+ /* 1888 E> */ B(Star), R(0),
+ /* 1901 S> */ B(LdaConstant), U8(143),
+ /* 1901 E> */ B(Star), R(0),
+ /* 1914 S> */ B(LdaConstant), U8(144),
+ /* 1914 E> */ B(Star), R(0),
+ /* 1927 S> */ B(LdaConstant), U8(145),
+ /* 1927 E> */ B(Star), R(0),
+ /* 1940 S> */ B(LdaConstant), U8(146),
+ /* 1940 E> */ B(Star), R(0),
+ /* 1953 S> */ B(LdaConstant), U8(147),
+ /* 1953 E> */ B(Star), R(0),
+ /* 1966 S> */ B(LdaConstant), U8(148),
+ /* 1966 E> */ B(Star), R(0),
+ /* 1979 S> */ B(LdaConstant), U8(149),
+ /* 1979 E> */ B(Star), R(0),
+ /* 1992 S> */ B(LdaConstant), U8(150),
+ /* 1992 E> */ B(Star), R(0),
+ /* 2005 S> */ B(LdaConstant), U8(151),
+ /* 2005 E> */ B(Star), R(0),
+ /* 2018 S> */ B(LdaConstant), U8(152),
+ /* 2018 E> */ B(Star), R(0),
+ /* 2031 S> */ B(LdaConstant), U8(153),
+ /* 2031 E> */ B(Star), R(0),
+ /* 2044 S> */ B(LdaConstant), U8(154),
+ /* 2044 E> */ B(Star), R(0),
+ /* 2057 S> */ B(LdaConstant), U8(155),
+ /* 2057 E> */ B(Star), R(0),
+ /* 2070 S> */ B(LdaConstant), U8(156),
+ /* 2070 E> */ B(Star), R(0),
+ /* 2083 S> */ B(LdaConstant), U8(157),
+ /* 2083 E> */ B(Star), R(0),
+ /* 2096 S> */ B(LdaConstant), U8(158),
+ /* 2096 E> */ B(Star), R(0),
+ /* 2109 S> */ B(LdaConstant), U8(159),
+ /* 2109 E> */ B(Star), R(0),
+ /* 2122 S> */ B(LdaConstant), U8(160),
+ /* 2122 E> */ B(Star), R(0),
+ /* 2135 S> */ B(LdaConstant), U8(161),
+ /* 2135 E> */ B(Star), R(0),
+ /* 2148 S> */ B(LdaConstant), U8(162),
+ /* 2148 E> */ B(Star), R(0),
+ /* 2161 S> */ B(LdaConstant), U8(163),
+ /* 2161 E> */ B(Star), R(0),
+ /* 2174 S> */ B(LdaConstant), U8(164),
+ /* 2174 E> */ B(Star), R(0),
+ /* 2187 S> */ B(LdaConstant), U8(165),
+ /* 2187 E> */ B(Star), R(0),
+ /* 2200 S> */ B(LdaConstant), U8(166),
+ /* 2200 E> */ B(Star), R(0),
+ /* 2213 S> */ B(LdaConstant), U8(167),
+ /* 2213 E> */ B(Star), R(0),
+ /* 2226 S> */ B(LdaConstant), U8(168),
+ /* 2226 E> */ B(Star), R(0),
+ /* 2239 S> */ B(LdaConstant), U8(169),
+ /* 2239 E> */ B(Star), R(0),
+ /* 2252 S> */ B(LdaConstant), U8(170),
+ /* 2252 E> */ B(Star), R(0),
+ /* 2265 S> */ B(LdaConstant), U8(171),
+ /* 2265 E> */ B(Star), R(0),
+ /* 2278 S> */ B(LdaConstant), U8(172),
+ /* 2278 E> */ B(Star), R(0),
+ /* 2291 S> */ B(LdaConstant), U8(173),
+ /* 2291 E> */ B(Star), R(0),
+ /* 2304 S> */ B(LdaConstant), U8(174),
+ /* 2304 E> */ B(Star), R(0),
+ /* 2317 S> */ B(LdaConstant), U8(175),
+ /* 2317 E> */ B(Star), R(0),
+ /* 2330 S> */ B(LdaConstant), U8(176),
+ /* 2330 E> */ B(Star), R(0),
+ /* 2343 S> */ B(LdaConstant), U8(177),
+ /* 2343 E> */ B(Star), R(0),
+ /* 2356 S> */ B(LdaConstant), U8(178),
+ /* 2356 E> */ B(Star), R(0),
+ /* 2369 S> */ B(LdaConstant), U8(179),
+ /* 2369 E> */ B(Star), R(0),
+ /* 2382 S> */ B(LdaConstant), U8(180),
+ /* 2382 E> */ B(Star), R(0),
+ /* 2395 S> */ B(LdaConstant), U8(181),
+ /* 2395 E> */ B(Star), R(0),
+ /* 2408 S> */ B(LdaConstant), U8(182),
+ /* 2408 E> */ B(Star), R(0),
+ /* 2421 S> */ B(LdaConstant), U8(183),
+ /* 2421 E> */ B(Star), R(0),
+ /* 2434 S> */ B(LdaConstant), U8(184),
+ /* 2434 E> */ B(Star), R(0),
+ /* 2447 S> */ B(LdaConstant), U8(185),
+ /* 2447 E> */ B(Star), R(0),
+ /* 2460 S> */ B(LdaConstant), U8(186),
+ /* 2460 E> */ B(Star), R(0),
+ /* 2473 S> */ B(LdaConstant), U8(187),
+ /* 2473 E> */ B(Star), R(0),
+ /* 2486 S> */ B(LdaConstant), U8(188),
+ /* 2486 E> */ B(Star), R(0),
+ /* 2499 S> */ B(LdaConstant), U8(189),
+ /* 2499 E> */ B(Star), R(0),
+ /* 2512 S> */ B(LdaConstant), U8(190),
+ /* 2512 E> */ B(Star), R(0),
+ /* 2525 S> */ B(LdaConstant), U8(191),
+ /* 2525 E> */ B(Star), R(0),
+ /* 2538 S> */ B(LdaConstant), U8(192),
+ /* 2538 E> */ B(Star), R(0),
+ /* 2551 S> */ B(LdaConstant), U8(193),
+ /* 2551 E> */ B(Star), R(0),
+ /* 2564 S> */ B(LdaConstant), U8(194),
+ /* 2564 E> */ B(Star), R(0),
+ /* 2577 S> */ B(LdaConstant), U8(195),
+ /* 2577 E> */ B(Star), R(0),
+ /* 2590 S> */ B(LdaConstant), U8(196),
+ /* 2590 E> */ B(Star), R(0),
+ /* 2603 S> */ B(LdaConstant), U8(197),
+ /* 2603 E> */ B(Star), R(0),
+ /* 2616 S> */ B(LdaConstant), U8(198),
+ /* 2616 E> */ B(Star), R(0),
+ /* 2629 S> */ B(LdaConstant), U8(199),
+ /* 2629 E> */ B(Star), R(0),
+ /* 2642 S> */ B(LdaConstant), U8(200),
+ /* 2642 E> */ B(Star), R(0),
+ /* 2655 S> */ B(LdaConstant), U8(201),
+ /* 2655 E> */ B(Star), R(0),
+ /* 2668 S> */ B(LdaConstant), U8(202),
+ /* 2668 E> */ B(Star), R(0),
+ /* 2681 S> */ B(LdaConstant), U8(203),
+ /* 2681 E> */ B(Star), R(0),
+ /* 2694 S> */ B(LdaConstant), U8(204),
+ /* 2694 E> */ B(Star), R(0),
+ /* 2707 S> */ B(LdaConstant), U8(205),
+ /* 2707 E> */ B(Star), R(0),
+ /* 2720 S> */ B(LdaConstant), U8(206),
+ /* 2720 E> */ B(Star), R(0),
+ /* 2733 S> */ B(LdaConstant), U8(207),
+ /* 2733 E> */ B(Star), R(0),
+ /* 2746 S> */ B(LdaConstant), U8(208),
+ /* 2746 E> */ B(Star), R(0),
+ /* 2759 S> */ B(LdaConstant), U8(209),
+ /* 2759 E> */ B(Star), R(0),
+ /* 2772 S> */ B(LdaConstant), U8(210),
+ /* 2772 E> */ B(Star), R(0),
+ /* 2785 S> */ B(LdaConstant), U8(211),
+ /* 2785 E> */ B(Star), R(0),
+ /* 2798 S> */ B(LdaConstant), U8(212),
+ /* 2798 E> */ B(Star), R(0),
+ /* 2811 S> */ B(LdaConstant), U8(213),
+ /* 2811 E> */ B(Star), R(0),
+ /* 2824 S> */ B(LdaConstant), U8(214),
+ /* 2824 E> */ B(Star), R(0),
+ /* 2837 S> */ B(LdaConstant), U8(215),
+ /* 2837 E> */ B(Star), R(0),
+ /* 2850 S> */ B(LdaConstant), U8(216),
+ /* 2850 E> */ B(Star), R(0),
+ /* 2863 S> */ B(LdaConstant), U8(217),
+ /* 2863 E> */ B(Star), R(0),
+ /* 2876 S> */ B(LdaConstant), U8(218),
+ /* 2876 E> */ B(Star), R(0),
+ /* 2889 S> */ B(LdaConstant), U8(219),
+ /* 2889 E> */ B(Star), R(0),
+ /* 2902 S> */ B(LdaConstant), U8(220),
+ /* 2902 E> */ B(Star), R(0),
+ /* 2915 S> */ B(LdaConstant), U8(221),
+ /* 2915 E> */ B(Star), R(0),
+ /* 2928 S> */ B(LdaConstant), U8(222),
+ /* 2928 E> */ B(Star), R(0),
+ /* 2941 S> */ B(LdaConstant), U8(223),
+ /* 2941 E> */ B(Star), R(0),
+ /* 2954 S> */ B(LdaConstant), U8(224),
+ /* 2954 E> */ B(Star), R(0),
+ /* 2967 S> */ B(LdaConstant), U8(225),
+ /* 2967 E> */ B(Star), R(0),
+ /* 2980 S> */ B(LdaConstant), U8(226),
+ /* 2980 E> */ B(Star), R(0),
+ /* 2993 S> */ B(LdaConstant), U8(227),
+ /* 2993 E> */ B(Star), R(0),
+ /* 3006 S> */ B(LdaConstant), U8(228),
+ /* 3006 E> */ B(Star), R(0),
+ /* 3019 S> */ B(LdaConstant), U8(229),
+ /* 3019 E> */ B(Star), R(0),
+ /* 3032 S> */ B(LdaConstant), U8(230),
+ /* 3032 E> */ B(Star), R(0),
+ /* 3045 S> */ B(LdaConstant), U8(231),
+ /* 3045 E> */ B(Star), R(0),
+ /* 3058 S> */ B(LdaConstant), U8(232),
+ /* 3058 E> */ B(Star), R(0),
+ /* 3071 S> */ B(LdaConstant), U8(233),
+ /* 3071 E> */ B(Star), R(0),
+ /* 3084 S> */ B(LdaConstant), U8(234),
+ /* 3084 E> */ B(Star), R(0),
+ /* 3097 S> */ B(LdaConstant), U8(235),
+ /* 3097 E> */ B(Star), R(0),
+ /* 3110 S> */ B(LdaConstant), U8(236),
+ /* 3110 E> */ B(Star), R(0),
+ /* 3123 S> */ B(LdaConstant), U8(237),
+ /* 3123 E> */ B(Star), R(0),
+ /* 3136 S> */ B(LdaConstant), U8(238),
+ /* 3136 E> */ B(Star), R(0),
+ /* 3149 S> */ B(LdaConstant), U8(239),
+ /* 3149 E> */ B(Star), R(0),
+ /* 3162 S> */ B(LdaConstant), U8(240),
+ /* 3162 E> */ B(Star), R(0),
+ /* 3175 S> */ B(LdaConstant), U8(241),
+ /* 3175 E> */ B(Star), R(0),
+ /* 3188 S> */ B(LdaConstant), U8(242),
+ /* 3188 E> */ B(Star), R(0),
+ /* 3201 S> */ B(LdaConstant), U8(243),
+ /* 3201 E> */ B(Star), R(0),
+ /* 3214 S> */ B(LdaConstant), U8(244),
+ /* 3214 E> */ B(Star), R(0),
+ /* 3227 S> */ B(LdaConstant), U8(245),
+ /* 3227 E> */ B(Star), R(0),
+ /* 3240 S> */ B(LdaConstant), U8(246),
+ /* 3240 E> */ B(Star), R(0),
+ /* 3253 S> */ B(LdaConstant), U8(247),
+ /* 3253 E> */ B(Star), R(0),
+ /* 3266 S> */ B(LdaConstant), U8(248),
+ /* 3266 E> */ B(Star), R(0),
+ /* 3279 S> */ B(LdaConstant), U8(249),
+ /* 3279 E> */ B(Star), R(0),
+ /* 3292 S> */ B(LdaConstant), U8(250),
+ /* 3292 E> */ B(Star), R(0),
+ /* 3305 S> */ B(LdaConstant), U8(251),
+ /* 3305 E> */ B(Star), R(0),
+ /* 3318 S> */ B(LdaConstant), U8(252),
+ /* 3318 E> */ B(Star), R(0),
+ /* 3331 S> */ B(LdaConstant), U8(253),
+ /* 3331 E> */ B(Star), R(0),
+ /* 3344 S> */ B(LdaConstant), U8(254),
+ /* 3344 E> */ B(Star), R(0),
+ /* 3357 S> */ B(LdaConstant), U8(255),
+ /* 3357 E> */ B(Star), R(0),
+ /* 3370 S> */ B(Wide), B(LdaConstant), U16(256),
+ /* 3370 E> */ B(Star), R(0),
+ /* 3383 S> */ B(Wide), B(LdaConstant), U16(257),
+ /* 3383 E> */ B(Star), R(0),
+ /* 3396 S> */ B(Wide), B(LdaConstant), U16(258),
+ /* 3396 E> */ B(Star), R(0),
+ /* 3409 S> */ B(Wide), B(LdaConstant), U16(259),
+ /* 3409 E> */ B(Star), R(0),
+ /* 3422 S> */ B(Wide), B(LdaConstant), U16(260),
+ /* 3422 E> */ B(Star), R(0),
+ /* 3435 S> */ B(Wide), B(LdaConstant), U16(261),
+ /* 3435 E> */ B(Star), R(0),
+ /* 3448 S> */ B(Wide), B(LdaConstant), U16(262),
+ /* 3448 E> */ B(Star), R(0),
+ /* 3461 S> */ B(Wide), B(LdaConstant), U16(263),
+ /* 3461 E> */ B(Star), R(0),
+ /* 3474 S> */ B(Wide), B(LdaConstant), U16(264),
+ /* 3474 E> */ B(Star), R(0),
+ /* 3487 S> */ B(Wide), B(LdaConstant), U16(265),
+ /* 3487 E> */ B(Star), R(0),
+ /* 3500 S> */ B(Wide), B(LdaConstant), U16(266),
+ /* 3500 E> */ B(Star), R(0),
+ /* 3513 S> */ B(Wide), B(LdaConstant), U16(267),
+ /* 3513 E> */ B(Star), R(0),
+ /* 3526 S> */ B(Wide), B(LdaConstant), U16(268),
+ /* 3526 E> */ B(Star), R(0),
+ /* 3539 S> */ B(Wide), B(LdaConstant), U16(269),
+ /* 3539 E> */ B(Star), R(0),
+ /* 3552 S> */ B(Wide), B(LdaConstant), U16(270),
+ /* 3552 E> */ B(Star), R(0),
+ /* 3565 S> */ B(Wide), B(LdaConstant), U16(271),
+ /* 3565 E> */ B(Star), R(0),
+ /* 3578 S> */ B(Wide), B(LdaConstant), U16(272),
+ /* 3578 E> */ B(Star), R(0),
+ /* 3591 S> */ B(Wide), B(LdaConstant), U16(273),
+ /* 3591 E> */ B(Star), R(0),
+ /* 3604 S> */ B(Wide), B(LdaConstant), U16(274),
+ /* 3604 E> */ B(Star), R(0),
+ /* 3617 S> */ B(Wide), B(LdaConstant), U16(275),
+ /* 3617 E> */ B(Star), R(0),
+ /* 3630 S> */ B(Wide), B(LdaConstant), U16(276),
+ /* 3630 E> */ B(Star), R(0),
+ /* 3643 S> */ B(Wide), B(LdaConstant), U16(277),
+ /* 3643 E> */ B(Star), R(0),
+ /* 3656 S> */ B(Wide), B(LdaConstant), U16(278),
+ /* 3656 E> */ B(Star), R(0),
+ /* 3669 S> */ B(Wide), B(LdaConstant), U16(279),
+ /* 3669 E> */ B(Star), R(0),
+ /* 3682 S> */ B(Wide), B(LdaConstant), U16(280),
+ /* 3682 E> */ B(Star), R(0),
+ /* 3695 S> */ B(Wide), B(LdaConstant), U16(281),
+ /* 3695 E> */ B(Star), R(0),
+ /* 3708 S> */ B(Wide), B(LdaConstant), U16(282),
+ /* 3708 E> */ B(Star), R(0),
+ /* 3721 S> */ B(Wide), B(LdaConstant), U16(283),
+ /* 3721 E> */ B(Star), R(0),
+ /* 3734 S> */ B(Wide), B(LdaConstant), U16(284),
+ /* 3734 E> */ B(Star), R(0),
+ /* 3747 S> */ B(Wide), B(LdaConstant), U16(285),
+ /* 3747 E> */ B(Star), R(0),
+ /* 3760 S> */ B(Wide), B(LdaConstant), U16(286),
+ /* 3760 E> */ B(Star), R(0),
+ /* 3773 S> */ B(Wide), B(LdaConstant), U16(287),
+ /* 3773 E> */ B(Star), R(0),
+ /* 3786 S> */ B(Wide), B(LdaConstant), U16(288),
+ /* 3786 E> */ B(Star), R(0),
+ /* 3799 S> */ B(Wide), B(LdaConstant), U16(289),
+ /* 3799 E> */ B(Star), R(0),
+ /* 3812 S> */ B(Wide), B(LdaConstant), U16(290),
+ /* 3812 E> */ B(Star), R(0),
+ /* 3825 S> */ B(Wide), B(LdaConstant), U16(291),
+ /* 3825 E> */ B(Star), R(0),
+ /* 3838 S> */ B(Wide), B(LdaConstant), U16(292),
+ /* 3838 E> */ B(Star), R(0),
+ /* 3851 S> */ B(Wide), B(LdaConstant), U16(293),
+ /* 3851 E> */ B(Star), R(0),
+ /* 3864 S> */ B(Wide), B(LdaConstant), U16(294),
+ /* 3864 E> */ B(Star), R(0),
+ /* 3877 S> */ B(Wide), B(LdaConstant), U16(295),
+ /* 3877 E> */ B(Star), R(0),
+ /* 3890 S> */ B(Wide), B(LdaConstant), U16(296),
+ /* 3890 E> */ B(Star), R(0),
+ /* 3903 S> */ B(Wide), B(LdaConstant), U16(297),
+ /* 3903 E> */ B(Star), R(0),
+ /* 3916 S> */ B(Wide), B(LdaConstant), U16(298),
+ /* 3916 E> */ B(Star), R(0),
+ /* 3929 S> */ B(Wide), B(LdaConstant), U16(299),
+ /* 3929 E> */ B(Star), R(0),
+ /* 3942 S> */ B(Wide), B(LdaConstant), U16(300),
+ /* 3942 E> */ B(Star), R(0),
+ /* 3955 S> */ B(Wide), B(LdaConstant), U16(301),
+ /* 3955 E> */ B(Star), R(0),
+ /* 3968 S> */ B(Wide), B(LdaConstant), U16(302),
+ /* 3968 E> */ B(Star), R(0),
+ /* 3981 S> */ B(Wide), B(LdaConstant), U16(303),
+ /* 3981 E> */ B(Star), R(0),
+ /* 3994 S> */ B(Wide), B(LdaConstant), U16(304),
+ /* 3994 E> */ B(Star), R(0),
+ /* 4007 S> */ B(Wide), B(LdaConstant), U16(305),
+ /* 4007 E> */ B(Star), R(0),
+ /* 4020 S> */ B(Wide), B(LdaConstant), U16(306),
+ /* 4020 E> */ B(Star), R(0),
+ /* 4033 S> */ B(Wide), B(LdaConstant), U16(307),
+ /* 4033 E> */ B(Star), R(0),
+ /* 4046 S> */ B(Wide), B(LdaConstant), U16(308),
+ /* 4046 E> */ B(Star), R(0),
+ /* 4059 S> */ B(Wide), B(LdaConstant), U16(309),
+ /* 4059 E> */ B(Star), R(0),
+ /* 4072 S> */ B(Wide), B(LdaConstant), U16(310),
+ /* 4072 E> */ B(Star), R(0),
+ /* 4085 S> */ B(Wide), B(LdaConstant), U16(311),
+ /* 4085 E> */ B(Star), R(0),
+ /* 4103 S> */ B(LdaZero),
+ /* 4103 E> */ B(Star), R(1),
+ /* 4108 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 4108 E> */ B(TestLessThan), R(2),
+ B(Wide), B(JumpIfFalse), U16(46),
+ /* 4090 E> */ B(StackCheck),
+ /* 4122 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 4128 E> */ B(TestEqual), R(2),
+ B(Wide), B(JumpIfFalse), U16(7),
+ /* 4134 S> */ B(Wide), B(Jump), U16(19),
+ /* 4146 S> */ B(Ldar), R(1),
+ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ /* 4152 E> */ B(TestEqual), R(2),
+ B(Wide), B(JumpIfFalse), U16(7),
+ /* 4158 S> */ B(Wide), B(Jump), U16(13),
+ /* 4114 S> */ B(Ldar), R(1),
+ B(ToNumber),
+ B(Star), R(2),
+ B(Inc),
+ /* 4114 E> */ B(Star), R(1),
+ B(Jump), U8(-53),
+ /* 4167 S> */ B(LdaSmi), U8(3),
+ /* 4177 S> */ B(Return),
]
constant pool: [
0.1,
diff --git a/test/cctest/interpreter/bytecode_expectations/LetVariable.golden b/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
index 5ceda85..3ac793a 100644
--- a/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
@@ -15,13 +15,13 @@
parameter count: 1
bytecode array length: 10
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ B(LdaUndefined),
+ /* 46 S> */ B(Return),
]
constant pool: [
]
@@ -36,16 +36,16 @@
parameter count: 1
bytecode array length: 20
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
+ /* 56 S> */ B(Return),
]
constant pool: [
"x",
@@ -61,20 +61,20 @@
parameter count: 1
bytecode array length: 27
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Ldar), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaSmi), U8(20),
+ /* 45 E> */ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Ldar), R(1),
+ B(Star), R(0),
+ /* 45 E> */ B(LdaUndefined),
+ /* 52 S> */ B(Return),
]
constant pool: [
"x",
@@ -90,22 +90,22 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(LdaSmi), U8(20),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Ldar), R(1),
- B(Star), R(0),
- B(LdaUndefined),
- B(Return),
+ B(LdaTheHole),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaSmi), U8(20),
+ /* 48 E> */ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Ldar), R(1),
+ B(Star), R(0),
+ B(LdaUndefined),
+ /* 54 S> */ B(Return),
]
constant pool: [
"x",
diff --git a/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden b/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
index 4fc5c4f..591fe88 100644
--- a/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
@@ -15,17 +15,17 @@
parameter count: 1
bytecode array length: 24
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 72 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -41,21 +41,21 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 72 S> */ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ /* 82 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -72,25 +72,25 @@
parameter count: 1
bytecode array length: 45
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(20),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Ldar), R(2),
- B(StaContextSlot), R(context), U8(4),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaSmi), U8(20),
+ /* 45 E> */ B(Star), R(2),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(StaContextSlot), R(context), U8(4),
+ /* 45 E> */ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 78 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
@@ -107,26 +107,26 @@
parameter count: 1
bytecode array length: 47
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(1),
- B(LdaTheHole),
- B(StaContextSlot), R(context), U8(4),
- B(CreateClosure), U8(0), U8(0),
- B(Star), R(0),
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaContextSlot), R(context), U8(4),
- B(LdaSmi), U8(20),
- B(Star), R(2),
- B(LdaContextSlot), R(context), U8(4),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
- B(Ldar), R(2),
- B(StaContextSlot), R(context), U8(4),
- B(LdaUndefined),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(StaContextSlot), R(context), U8(4),
+ /* 46 S> */ B(LdaSmi), U8(20),
+ /* 48 E> */ B(Star), R(2),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
]
constant pool: [
InstanceType::SHARED_FUNCTION_INFO_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden b/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
index 0a96cae..7fb831b 100644
--- a/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
@@ -18,9 +18,9 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Return),
+ /* 21 E> */ B(StackCheck),
+ /* 26 S> */ B(LdaGlobal), U8(0), U8(1),
+ /* 36 S> */ B(Return),
]
constant pool: [
"a",
@@ -38,9 +38,9 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Return),
+ /* 27 E> */ B(StackCheck),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(1),
+ /* 42 S> */ B(Return),
]
constant pool: [
"t",
@@ -58,9 +58,9 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaGlobal), U8(0), U8(1),
- B(Return),
+ /* 17 E> */ B(StackCheck),
+ /* 22 S> */ B(LdaGlobal), U8(0), U8(1),
+ /* 32 S> */ B(Return),
]
constant pool: [
"a",
@@ -208,393 +208,393 @@
parameter count: 2
bytecode array length: 1032
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(255),
- B(Wide), B(LdaGlobal), U16(1), U16(257),
- B(Return),
+ /* 17 E> */ B(StackCheck),
+ /* 25 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 26 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 35 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 36 E> */ B(LoadIC), R(0), U8(0), U8(3),
+ /* 45 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 46 E> */ B(LoadIC), R(0), U8(0), U8(5),
+ /* 55 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 56 E> */ B(LoadIC), R(0), U8(0), U8(7),
+ /* 65 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 66 E> */ B(LoadIC), R(0), U8(0), U8(9),
+ /* 75 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 76 E> */ B(LoadIC), R(0), U8(0), U8(11),
+ /* 85 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 86 E> */ B(LoadIC), R(0), U8(0), U8(13),
+ /* 95 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 96 E> */ B(LoadIC), R(0), U8(0), U8(15),
+ /* 105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 106 E> */ B(LoadIC), R(0), U8(0), U8(17),
+ /* 115 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 116 E> */ B(LoadIC), R(0), U8(0), U8(19),
+ /* 125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 126 E> */ B(LoadIC), R(0), U8(0), U8(21),
+ /* 135 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 136 E> */ B(LoadIC), R(0), U8(0), U8(23),
+ /* 145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 146 E> */ B(LoadIC), R(0), U8(0), U8(25),
+ /* 155 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 156 E> */ B(LoadIC), R(0), U8(0), U8(27),
+ /* 165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 166 E> */ B(LoadIC), R(0), U8(0), U8(29),
+ /* 175 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 176 E> */ B(LoadIC), R(0), U8(0), U8(31),
+ /* 185 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 186 E> */ B(LoadIC), R(0), U8(0), U8(33),
+ /* 195 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 196 E> */ B(LoadIC), R(0), U8(0), U8(35),
+ /* 205 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 206 E> */ B(LoadIC), R(0), U8(0), U8(37),
+ /* 215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 216 E> */ B(LoadIC), R(0), U8(0), U8(39),
+ /* 225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 226 E> */ B(LoadIC), R(0), U8(0), U8(41),
+ /* 235 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 236 E> */ B(LoadIC), R(0), U8(0), U8(43),
+ /* 245 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 246 E> */ B(LoadIC), R(0), U8(0), U8(45),
+ /* 255 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 256 E> */ B(LoadIC), R(0), U8(0), U8(47),
+ /* 265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 266 E> */ B(LoadIC), R(0), U8(0), U8(49),
+ /* 275 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 276 E> */ B(LoadIC), R(0), U8(0), U8(51),
+ /* 285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 286 E> */ B(LoadIC), R(0), U8(0), U8(53),
+ /* 295 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 296 E> */ B(LoadIC), R(0), U8(0), U8(55),
+ /* 305 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 306 E> */ B(LoadIC), R(0), U8(0), U8(57),
+ /* 315 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 316 E> */ B(LoadIC), R(0), U8(0), U8(59),
+ /* 325 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 326 E> */ B(LoadIC), R(0), U8(0), U8(61),
+ /* 335 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 336 E> */ B(LoadIC), R(0), U8(0), U8(63),
+ /* 345 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 346 E> */ B(LoadIC), R(0), U8(0), U8(65),
+ /* 355 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 356 E> */ B(LoadIC), R(0), U8(0), U8(67),
+ /* 365 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 366 E> */ B(LoadIC), R(0), U8(0), U8(69),
+ /* 375 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 376 E> */ B(LoadIC), R(0), U8(0), U8(71),
+ /* 385 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 386 E> */ B(LoadIC), R(0), U8(0), U8(73),
+ /* 395 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 396 E> */ B(LoadIC), R(0), U8(0), U8(75),
+ /* 405 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 406 E> */ B(LoadIC), R(0), U8(0), U8(77),
+ /* 415 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 416 E> */ B(LoadIC), R(0), U8(0), U8(79),
+ /* 425 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 426 E> */ B(LoadIC), R(0), U8(0), U8(81),
+ /* 435 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 436 E> */ B(LoadIC), R(0), U8(0), U8(83),
+ /* 445 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 446 E> */ B(LoadIC), R(0), U8(0), U8(85),
+ /* 455 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 456 E> */ B(LoadIC), R(0), U8(0), U8(87),
+ /* 465 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 466 E> */ B(LoadIC), R(0), U8(0), U8(89),
+ /* 475 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 476 E> */ B(LoadIC), R(0), U8(0), U8(91),
+ /* 485 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 486 E> */ B(LoadIC), R(0), U8(0), U8(93),
+ /* 495 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 496 E> */ B(LoadIC), R(0), U8(0), U8(95),
+ /* 505 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 506 E> */ B(LoadIC), R(0), U8(0), U8(97),
+ /* 515 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 516 E> */ B(LoadIC), R(0), U8(0), U8(99),
+ /* 525 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 526 E> */ B(LoadIC), R(0), U8(0), U8(101),
+ /* 535 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 536 E> */ B(LoadIC), R(0), U8(0), U8(103),
+ /* 545 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 546 E> */ B(LoadIC), R(0), U8(0), U8(105),
+ /* 555 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 556 E> */ B(LoadIC), R(0), U8(0), U8(107),
+ /* 565 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 566 E> */ B(LoadIC), R(0), U8(0), U8(109),
+ /* 575 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 576 E> */ B(LoadIC), R(0), U8(0), U8(111),
+ /* 585 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 586 E> */ B(LoadIC), R(0), U8(0), U8(113),
+ /* 595 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 596 E> */ B(LoadIC), R(0), U8(0), U8(115),
+ /* 605 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 606 E> */ B(LoadIC), R(0), U8(0), U8(117),
+ /* 615 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 616 E> */ B(LoadIC), R(0), U8(0), U8(119),
+ /* 625 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 626 E> */ B(LoadIC), R(0), U8(0), U8(121),
+ /* 635 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 636 E> */ B(LoadIC), R(0), U8(0), U8(123),
+ /* 645 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 646 E> */ B(LoadIC), R(0), U8(0), U8(125),
+ /* 655 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 656 E> */ B(LoadIC), R(0), U8(0), U8(127),
+ /* 665 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 666 E> */ B(LoadIC), R(0), U8(0), U8(129),
+ /* 675 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 676 E> */ B(LoadIC), R(0), U8(0), U8(131),
+ /* 685 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 686 E> */ B(LoadIC), R(0), U8(0), U8(133),
+ /* 695 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 696 E> */ B(LoadIC), R(0), U8(0), U8(135),
+ /* 705 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 706 E> */ B(LoadIC), R(0), U8(0), U8(137),
+ /* 715 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 716 E> */ B(LoadIC), R(0), U8(0), U8(139),
+ /* 725 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 726 E> */ B(LoadIC), R(0), U8(0), U8(141),
+ /* 735 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 736 E> */ B(LoadIC), R(0), U8(0), U8(143),
+ /* 745 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 746 E> */ B(LoadIC), R(0), U8(0), U8(145),
+ /* 755 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 756 E> */ B(LoadIC), R(0), U8(0), U8(147),
+ /* 765 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 766 E> */ B(LoadIC), R(0), U8(0), U8(149),
+ /* 775 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 776 E> */ B(LoadIC), R(0), U8(0), U8(151),
+ /* 785 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 786 E> */ B(LoadIC), R(0), U8(0), U8(153),
+ /* 795 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 796 E> */ B(LoadIC), R(0), U8(0), U8(155),
+ /* 805 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 806 E> */ B(LoadIC), R(0), U8(0), U8(157),
+ /* 815 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 816 E> */ B(LoadIC), R(0), U8(0), U8(159),
+ /* 825 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 826 E> */ B(LoadIC), R(0), U8(0), U8(161),
+ /* 835 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 836 E> */ B(LoadIC), R(0), U8(0), U8(163),
+ /* 845 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 846 E> */ B(LoadIC), R(0), U8(0), U8(165),
+ /* 855 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 856 E> */ B(LoadIC), R(0), U8(0), U8(167),
+ /* 865 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 866 E> */ B(LoadIC), R(0), U8(0), U8(169),
+ /* 875 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 876 E> */ B(LoadIC), R(0), U8(0), U8(171),
+ /* 885 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 886 E> */ B(LoadIC), R(0), U8(0), U8(173),
+ /* 895 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 896 E> */ B(LoadIC), R(0), U8(0), U8(175),
+ /* 905 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 906 E> */ B(LoadIC), R(0), U8(0), U8(177),
+ /* 915 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 916 E> */ B(LoadIC), R(0), U8(0), U8(179),
+ /* 925 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 926 E> */ B(LoadIC), R(0), U8(0), U8(181),
+ /* 935 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 936 E> */ B(LoadIC), R(0), U8(0), U8(183),
+ /* 945 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 946 E> */ B(LoadIC), R(0), U8(0), U8(185),
+ /* 955 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 956 E> */ B(LoadIC), R(0), U8(0), U8(187),
+ /* 965 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 966 E> */ B(LoadIC), R(0), U8(0), U8(189),
+ /* 975 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 976 E> */ B(LoadIC), R(0), U8(0), U8(191),
+ /* 985 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 986 E> */ B(LoadIC), R(0), U8(0), U8(193),
+ /* 995 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 996 E> */ B(LoadIC), R(0), U8(0), U8(195),
+ /* 1005 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1006 E> */ B(LoadIC), R(0), U8(0), U8(197),
+ /* 1015 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1016 E> */ B(LoadIC), R(0), U8(0), U8(199),
+ /* 1025 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1026 E> */ B(LoadIC), R(0), U8(0), U8(201),
+ /* 1035 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1036 E> */ B(LoadIC), R(0), U8(0), U8(203),
+ /* 1045 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1046 E> */ B(LoadIC), R(0), U8(0), U8(205),
+ /* 1055 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1056 E> */ B(LoadIC), R(0), U8(0), U8(207),
+ /* 1065 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1066 E> */ B(LoadIC), R(0), U8(0), U8(209),
+ /* 1075 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1076 E> */ B(LoadIC), R(0), U8(0), U8(211),
+ /* 1085 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1086 E> */ B(LoadIC), R(0), U8(0), U8(213),
+ /* 1095 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1096 E> */ B(LoadIC), R(0), U8(0), U8(215),
+ /* 1105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1106 E> */ B(LoadIC), R(0), U8(0), U8(217),
+ /* 1115 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1116 E> */ B(LoadIC), R(0), U8(0), U8(219),
+ /* 1125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1126 E> */ B(LoadIC), R(0), U8(0), U8(221),
+ /* 1135 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1136 E> */ B(LoadIC), R(0), U8(0), U8(223),
+ /* 1145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1146 E> */ B(LoadIC), R(0), U8(0), U8(225),
+ /* 1155 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1156 E> */ B(LoadIC), R(0), U8(0), U8(227),
+ /* 1165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1166 E> */ B(LoadIC), R(0), U8(0), U8(229),
+ /* 1175 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1176 E> */ B(LoadIC), R(0), U8(0), U8(231),
+ /* 1185 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1186 E> */ B(LoadIC), R(0), U8(0), U8(233),
+ /* 1195 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1196 E> */ B(LoadIC), R(0), U8(0), U8(235),
+ /* 1205 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1206 E> */ B(LoadIC), R(0), U8(0), U8(237),
+ /* 1215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1216 E> */ B(LoadIC), R(0), U8(0), U8(239),
+ /* 1225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1226 E> */ B(LoadIC), R(0), U8(0), U8(241),
+ /* 1235 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1236 E> */ B(LoadIC), R(0), U8(0), U8(243),
+ /* 1245 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1246 E> */ B(LoadIC), R(0), U8(0), U8(245),
+ /* 1255 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1256 E> */ B(LoadIC), R(0), U8(0), U8(247),
+ /* 1265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1266 E> */ B(LoadIC), R(0), U8(0), U8(249),
+ /* 1275 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1276 E> */ B(LoadIC), R(0), U8(0), U8(251),
+ /* 1285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1286 E> */ B(LoadIC), R(0), U8(0), U8(253),
+ /* 1295 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1296 E> */ B(LoadIC), R(0), U8(0), U8(255),
+ /* 1305 S> */ B(Wide), B(LdaGlobal), U16(1), U16(257),
+ /* 1315 S> */ B(Return),
]
constant pool: [
"name",
diff --git a/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden b/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
index cddb9a1..fed8367 100644
--- a/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
@@ -15,12 +15,12 @@
parameter count: 1
bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(JumpIfToBooleanTrue), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanTrue), U8(4),
+ B(LdaSmi), U8(3),
+ /* 60 S> */ B(Return),
]
constant pool: [
]
@@ -35,15 +35,15 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(TestEqual), R(1),
- B(JumpIfTrue), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 55 E> */ B(TestEqual), R(1),
+ B(JumpIfTrue), U8(4),
+ B(LdaSmi), U8(3),
+ /* 67 S> */ B(Return),
]
constant pool: [
]
@@ -58,12 +58,12 @@
parameter count: 1
bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanFalse), U8(4),
+ B(LdaSmi), U8(3),
+ /* 60 S> */ B(Return),
]
constant pool: [
]
@@ -78,15 +78,15 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqual), R(1),
- B(JumpIfFalse), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaZero),
+ /* 55 E> */ B(TestEqual), R(1),
+ B(JumpIfFalse), U8(4),
+ B(LdaSmi), U8(3),
+ /* 67 S> */ B(Return),
]
constant pool: [
]
@@ -101,12 +101,12 @@
parameter count: 1
bytecode array length: 9
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(JumpIfToBooleanTrue), U8(4),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanTrue), U8(4),
+ B(LdaSmi), U8(3),
+ /* 68 S> */ B(Return),
]
constant pool: [
]
@@ -119,25 +119,21 @@
"
frame size: 3
parameter count: 1
-bytecode array length: 32
+bytecode array length: 24
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(LdaSmi), U8(4),
- B(Star), R(2),
- B(Ldar), R(0),
- B(JumpIfToBooleanTrue), U8(16),
- B(Ldar), R(0),
- B(Ldar), R(1),
- B(Ldar), R(0),
- B(Ldar), R(1),
- B(LdaSmi), U8(5),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(2),
+ /* 42 E> */ B(Star), R(0),
+ /* 49 S> */ B(LdaSmi), U8(3),
+ /* 49 E> */ B(Star), R(1),
+ /* 56 S> */ B(LdaSmi), U8(4),
+ /* 56 E> */ B(Star), R(2),
+ /* 59 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanTrue), U8(8),
+ /* 81 E> */ B(LdaSmi), U8(5),
+ /* 86 E> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 95 S> */ B(Return),
]
constant pool: [
]
@@ -184,145 +180,145 @@
parameter count: 1
bytecode array length: 276
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(2),
- B(Ldar), R(0),
- B(JumpIfToBooleanTrueConstant), U8(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(1),
+ /* 60 S> */ B(LdaSmi), U8(3),
+ /* 60 E> */ B(Star), R(2),
+ /* 63 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanTrueConstant), U8(0),
+ B(LdaSmi), U8(1),
+ /* 81 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 88 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 98 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 105 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 115 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 122 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 132 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 139 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 149 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 156 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 166 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 173 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 183 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 190 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 200 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 207 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 217 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 224 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 234 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 241 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 251 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 258 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 268 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 275 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 285 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 292 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 302 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 309 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 319 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 326 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 336 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 343 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 353 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 360 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 370 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 377 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 387 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 394 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 404 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 411 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 421 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 428 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 438 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 445 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 455 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 462 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 472 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 479 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 489 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 496 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 506 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 513 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 523 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 530 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 540 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 547 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 557 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 564 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 574 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 581 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 591 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 598 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 608 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 615 E> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 624 S> */ B(Return),
]
constant pool: [
260,
@@ -370,145 +366,145 @@
parameter count: 1
bytecode array length: 275
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(2),
- B(Ldar), R(0),
- B(JumpIfToBooleanFalseConstant), U8(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(1),
+ /* 60 S> */ B(LdaSmi), U8(3),
+ /* 60 E> */ B(Star), R(2),
+ /* 63 S> */ B(Ldar), R(0),
+ B(JumpIfToBooleanFalseConstant), U8(0),
+ B(LdaSmi), U8(1),
+ /* 81 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 88 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 98 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 105 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 115 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 122 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 132 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 139 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 149 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 156 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 166 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 173 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 183 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 190 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 200 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 207 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 217 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 224 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 234 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 241 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 251 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 258 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 268 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 275 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 285 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 292 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 302 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 309 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 319 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 326 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 336 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 343 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 353 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 360 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 370 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 377 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 387 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 394 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 404 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 411 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 421 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 428 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 438 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 445 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 455 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 462 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 472 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 479 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 489 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 496 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 506 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 513 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 523 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 530 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 540 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 547 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 557 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 564 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 574 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 581 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 591 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 598 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 608 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 615 E> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 624 S> */ B(Return),
]
constant pool: [
260,
@@ -556,148 +552,148 @@
parameter count: 1
bytecode array length: 282
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(2),
- B(Ldar), R(0),
- B(Star), R(3),
- B(LdaSmi), U8(3),
- B(TestGreaterThan), R(3),
- B(JumpIfTrueConstant), U8(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(1),
+ /* 60 S> */ B(LdaSmi), U8(3),
+ /* 60 E> */ B(Star), R(2),
+ /* 63 S> */ B(Ldar), R(0),
+ B(Star), R(3),
+ B(LdaSmi), U8(3),
+ /* 73 E> */ B(TestGreaterThan), R(3),
+ B(JumpIfTrueConstant), U8(0),
+ B(LdaSmi), U8(1),
+ /* 87 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 94 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 104 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 111 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 121 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 128 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 138 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 145 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 155 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 162 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 172 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 179 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 189 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 196 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 206 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 213 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 223 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 230 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 240 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 247 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 257 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 264 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 274 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 281 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 291 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 298 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 308 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 315 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 325 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 332 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 342 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 349 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 359 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 366 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 376 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 383 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 393 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 400 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 410 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 417 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 427 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 434 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 444 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 451 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 461 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 468 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 478 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 485 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 495 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 502 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 512 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 519 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 529 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 536 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 546 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 553 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 563 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 570 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 580 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 587 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 597 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 604 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 614 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 621 E> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 630 S> */ B(Return),
]
constant pool: [
260,
@@ -745,148 +741,148 @@
parameter count: 1
bytecode array length: 281
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(2),
- B(Ldar), R(0),
- B(Star), R(3),
- B(LdaSmi), U8(5),
- B(TestLessThan), R(3),
- B(JumpIfFalseConstant), U8(0),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 53 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(1),
+ /* 60 S> */ B(LdaSmi), U8(3),
+ /* 60 E> */ B(Star), R(2),
+ /* 63 S> */ B(Ldar), R(0),
+ B(Star), R(3),
+ B(LdaSmi), U8(5),
+ /* 73 E> */ B(TestLessThan), R(3),
+ B(JumpIfFalseConstant), U8(0),
+ B(LdaSmi), U8(1),
+ /* 87 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 94 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 104 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 111 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 121 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 128 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 138 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 145 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 155 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 162 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 172 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 179 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 189 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 196 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 206 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 213 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 223 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 230 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 240 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 247 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 257 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 264 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 274 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 281 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 291 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 298 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 308 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 315 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 325 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 332 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 342 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 349 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 359 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 366 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 376 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 383 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 393 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 400 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 410 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 417 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 427 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 434 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 444 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 451 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 461 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 468 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 478 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 485 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 495 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 502 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 512 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 519 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 529 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 536 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 546 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 553 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 563 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 570 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 580 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 587 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 597 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 604 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ /* 614 E> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 621 E> */ B(Star), R(2),
+ B(LdaSmi), U8(3),
+ /* 630 S> */ B(Return),
]
constant pool: [
260,
@@ -902,9 +898,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaZero),
+ /* 49 S> */ B(Return),
]
constant pool: [
]
@@ -919,9 +915,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(1),
+ /* 49 S> */ B(Return),
]
constant pool: [
]
@@ -936,15 +932,15 @@
parameter count: 1
bytecode array length: 15
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(4),
- B(LdaSmi), U8(3),
- B(JumpIfToBooleanTrue), U8(3),
- B(LdaZero),
- B(LdaSmi), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanFalse), U8(4),
+ B(LdaSmi), U8(3),
+ B(JumpIfToBooleanTrue), U8(3),
+ B(LdaZero),
+ B(LdaSmi), U8(1),
+ /* 68 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden b/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
index acec42f..99a78be 100644
--- a/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
@@ -11,36 +11,38 @@
snippet: "
eval('var x = 10;'); return x;
"
-frame size: 9
+frame size: 10
parameter count: 1
-bytecode array length: 67
+bytecode array length: 71
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(Mov), R(1), R(4),
- B(Mov), R(3), R(5),
- B(Mov), R(closure), R(6),
- B(LdaZero),
- B(Star), R(7),
- B(LdaSmi), U8(30),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(5),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(2), U8(0),
- B(LdaLookupSlot), U8(2),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(Mov), R(1), R(4),
+ B(Mov), R(3), R(5),
+ B(Mov), R(closure), R(6),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaSmi), U8(30),
+ B(Star), R(8),
+ B(LdaSmi), U8(34),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
+ B(Star), R(1),
+ /* 34 E> */ B(Call), R(1), R(2), U8(2), U8(0),
+ /* 55 S> */ B(LdaLookupSlot), U8(2),
+ /* 65 S> */ B(Return),
]
constant pool: [
"eval",
@@ -54,37 +56,39 @@
snippet: "
eval('var x = 10;'); return typeof x;
"
-frame size: 9
+frame size: 10
parameter count: 1
-bytecode array length: 68
+bytecode array length: 72
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(Mov), R(1), R(4),
- B(Mov), R(3), R(5),
- B(Mov), R(closure), R(6),
- B(LdaZero),
- B(Star), R(7),
- B(LdaSmi), U8(30),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(5),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(2), U8(0),
- B(LdaLookupSlotInsideTypeof), U8(2),
- B(TypeOf),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(Mov), R(1), R(4),
+ B(Mov), R(3), R(5),
+ B(Mov), R(closure), R(6),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaSmi), U8(30),
+ B(Star), R(8),
+ B(LdaSmi), U8(34),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
+ B(Star), R(1),
+ /* 34 E> */ B(Call), R(1), R(2), U8(2), U8(0),
+ /* 55 S> */ B(LdaLookupSlotInsideTypeof), U8(2),
+ B(TypeOf),
+ /* 72 S> */ B(Return),
]
constant pool: [
"eval",
@@ -98,37 +102,39 @@
snippet: "
x = 20; return eval('');
"
-frame size: 9
+frame size: 10
parameter count: 1
-bytecode array length: 69
+bytecode array length: 73
bytecodes: [
- B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
- B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaContextSlot), R(context), U8(4),
- B(CreateMappedArguments),
- B(StaContextSlot), R(context), U8(5),
- B(Ldar), R(new_target),
- B(StaContextSlot), R(context), U8(6),
- B(StackCheck),
- B(LdaSmi), U8(20),
- B(StaLookupSlotSloppy), U8(0),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
- B(LdaConstant), U8(2),
- B(Star), R(3),
- B(Mov), R(1), R(4),
- B(Mov), R(3), R(5),
- B(Mov), R(closure), R(6),
- B(LdaZero),
- B(Star), R(7),
- B(LdaSmi), U8(30),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(5),
- B(Star), R(1),
- B(Call), R(1), R(2), U8(2), U8(0),
- B(Return),
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(Ldar), R(this),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateMappedArguments),
+ B(StaContextSlot), R(context), U8(5),
+ B(Ldar), R(new_target),
+ B(StaContextSlot), R(context), U8(6),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(20),
+ /* 36 E> */ B(StaLookupSlotSloppy), U8(0),
+ /* 42 S> */ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3), U8(1), R(1),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(Mov), R(1), R(4),
+ B(Mov), R(3), R(5),
+ B(Mov), R(closure), R(6),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaSmi), U8(30),
+ B(Star), R(8),
+ B(LdaSmi), U8(49),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
+ B(Star), R(1),
+ /* 49 E> */ B(Call), R(1), R(2), U8(2), U8(0),
+ /* 59 S> */ B(Return),
]
constant pool: [
"x",
diff --git a/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden b/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
index 26e11e3..4147631 100644
--- a/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
@@ -21,9 +21,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaLookupSlot), U8(0),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaLookupSlot), U8(0),
+ /* 25 S> */ B(Return),
]
constant pool: [
"x",
@@ -44,11 +44,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaLookupSlotSloppy), U8(0),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaSmi), U8(10),
+ /* 17 E> */ B(StaLookupSlotSloppy), U8(0),
+ B(LdaUndefined),
+ /* 23 S> */ B(Return),
]
constant pool: [
"x",
@@ -69,11 +69,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(StaLookupSlotStrict), U8(0),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 29 S> */ B(LdaSmi), U8(10),
+ /* 31 E> */ B(StaLookupSlotStrict), U8(0),
+ B(LdaUndefined),
+ /* 37 S> */ B(Return),
]
constant pool: [
"x",
@@ -94,10 +94,10 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaLookupSlotInsideTypeof), U8(0),
- B(TypeOf),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(LdaLookupSlotInsideTypeof), U8(0),
+ B(TypeOf),
+ /* 32 S> */ B(Return),
]
constant pool: [
"x",
diff --git a/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden b/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
index 2fdc3e9..2d493bc 100644
--- a/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
+++ b/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
@@ -281,521 +281,521 @@
parameter count: 1
bytecode array length: 1030
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(LdaLookupSlot), U16(256),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 22 S> */ B(LdaConstant), U8(0),
+ /* 22 E> */ B(Star), R(0),
+ /* 34 S> */ B(LdaConstant), U8(1),
+ /* 34 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaConstant), U8(2),
+ /* 46 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaConstant), U8(3),
+ /* 58 E> */ B(Star), R(0),
+ /* 70 S> */ B(LdaConstant), U8(4),
+ /* 70 E> */ B(Star), R(0),
+ /* 82 S> */ B(LdaConstant), U8(5),
+ /* 82 E> */ B(Star), R(0),
+ /* 94 S> */ B(LdaConstant), U8(6),
+ /* 94 E> */ B(Star), R(0),
+ /* 106 S> */ B(LdaConstant), U8(7),
+ /* 106 E> */ B(Star), R(0),
+ /* 118 S> */ B(LdaConstant), U8(8),
+ /* 118 E> */ B(Star), R(0),
+ /* 130 S> */ B(LdaConstant), U8(9),
+ /* 130 E> */ B(Star), R(0),
+ /* 142 S> */ B(LdaConstant), U8(10),
+ /* 142 E> */ B(Star), R(0),
+ /* 154 S> */ B(LdaConstant), U8(11),
+ /* 154 E> */ B(Star), R(0),
+ /* 166 S> */ B(LdaConstant), U8(12),
+ /* 166 E> */ B(Star), R(0),
+ /* 178 S> */ B(LdaConstant), U8(13),
+ /* 178 E> */ B(Star), R(0),
+ /* 190 S> */ B(LdaConstant), U8(14),
+ /* 190 E> */ B(Star), R(0),
+ /* 202 S> */ B(LdaConstant), U8(15),
+ /* 202 E> */ B(Star), R(0),
+ /* 214 S> */ B(LdaConstant), U8(16),
+ /* 214 E> */ B(Star), R(0),
+ /* 226 S> */ B(LdaConstant), U8(17),
+ /* 226 E> */ B(Star), R(0),
+ /* 238 S> */ B(LdaConstant), U8(18),
+ /* 238 E> */ B(Star), R(0),
+ /* 250 S> */ B(LdaConstant), U8(19),
+ /* 250 E> */ B(Star), R(0),
+ /* 262 S> */ B(LdaConstant), U8(20),
+ /* 262 E> */ B(Star), R(0),
+ /* 274 S> */ B(LdaConstant), U8(21),
+ /* 274 E> */ B(Star), R(0),
+ /* 286 S> */ B(LdaConstant), U8(22),
+ /* 286 E> */ B(Star), R(0),
+ /* 298 S> */ B(LdaConstant), U8(23),
+ /* 298 E> */ B(Star), R(0),
+ /* 310 S> */ B(LdaConstant), U8(24),
+ /* 310 E> */ B(Star), R(0),
+ /* 322 S> */ B(LdaConstant), U8(25),
+ /* 322 E> */ B(Star), R(0),
+ /* 334 S> */ B(LdaConstant), U8(26),
+ /* 334 E> */ B(Star), R(0),
+ /* 346 S> */ B(LdaConstant), U8(27),
+ /* 346 E> */ B(Star), R(0),
+ /* 358 S> */ B(LdaConstant), U8(28),
+ /* 358 E> */ B(Star), R(0),
+ /* 370 S> */ B(LdaConstant), U8(29),
+ /* 370 E> */ B(Star), R(0),
+ /* 382 S> */ B(LdaConstant), U8(30),
+ /* 382 E> */ B(Star), R(0),
+ /* 394 S> */ B(LdaConstant), U8(31),
+ /* 394 E> */ B(Star), R(0),
+ /* 406 S> */ B(LdaConstant), U8(32),
+ /* 406 E> */ B(Star), R(0),
+ /* 418 S> */ B(LdaConstant), U8(33),
+ /* 418 E> */ B(Star), R(0),
+ /* 430 S> */ B(LdaConstant), U8(34),
+ /* 430 E> */ B(Star), R(0),
+ /* 442 S> */ B(LdaConstant), U8(35),
+ /* 442 E> */ B(Star), R(0),
+ /* 454 S> */ B(LdaConstant), U8(36),
+ /* 454 E> */ B(Star), R(0),
+ /* 466 S> */ B(LdaConstant), U8(37),
+ /* 466 E> */ B(Star), R(0),
+ /* 478 S> */ B(LdaConstant), U8(38),
+ /* 478 E> */ B(Star), R(0),
+ /* 490 S> */ B(LdaConstant), U8(39),
+ /* 490 E> */ B(Star), R(0),
+ /* 502 S> */ B(LdaConstant), U8(40),
+ /* 502 E> */ B(Star), R(0),
+ /* 514 S> */ B(LdaConstant), U8(41),
+ /* 514 E> */ B(Star), R(0),
+ /* 526 S> */ B(LdaConstant), U8(42),
+ /* 526 E> */ B(Star), R(0),
+ /* 538 S> */ B(LdaConstant), U8(43),
+ /* 538 E> */ B(Star), R(0),
+ /* 550 S> */ B(LdaConstant), U8(44),
+ /* 550 E> */ B(Star), R(0),
+ /* 562 S> */ B(LdaConstant), U8(45),
+ /* 562 E> */ B(Star), R(0),
+ /* 574 S> */ B(LdaConstant), U8(46),
+ /* 574 E> */ B(Star), R(0),
+ /* 586 S> */ B(LdaConstant), U8(47),
+ /* 586 E> */ B(Star), R(0),
+ /* 598 S> */ B(LdaConstant), U8(48),
+ /* 598 E> */ B(Star), R(0),
+ /* 610 S> */ B(LdaConstant), U8(49),
+ /* 610 E> */ B(Star), R(0),
+ /* 622 S> */ B(LdaConstant), U8(50),
+ /* 622 E> */ B(Star), R(0),
+ /* 634 S> */ B(LdaConstant), U8(51),
+ /* 634 E> */ B(Star), R(0),
+ /* 646 S> */ B(LdaConstant), U8(52),
+ /* 646 E> */ B(Star), R(0),
+ /* 658 S> */ B(LdaConstant), U8(53),
+ /* 658 E> */ B(Star), R(0),
+ /* 670 S> */ B(LdaConstant), U8(54),
+ /* 670 E> */ B(Star), R(0),
+ /* 682 S> */ B(LdaConstant), U8(55),
+ /* 682 E> */ B(Star), R(0),
+ /* 694 S> */ B(LdaConstant), U8(56),
+ /* 694 E> */ B(Star), R(0),
+ /* 706 S> */ B(LdaConstant), U8(57),
+ /* 706 E> */ B(Star), R(0),
+ /* 718 S> */ B(LdaConstant), U8(58),
+ /* 718 E> */ B(Star), R(0),
+ /* 730 S> */ B(LdaConstant), U8(59),
+ /* 730 E> */ B(Star), R(0),
+ /* 742 S> */ B(LdaConstant), U8(60),
+ /* 742 E> */ B(Star), R(0),
+ /* 754 S> */ B(LdaConstant), U8(61),
+ /* 754 E> */ B(Star), R(0),
+ /* 766 S> */ B(LdaConstant), U8(62),
+ /* 766 E> */ B(Star), R(0),
+ /* 778 S> */ B(LdaConstant), U8(63),
+ /* 778 E> */ B(Star), R(0),
+ /* 790 S> */ B(LdaConstant), U8(64),
+ /* 790 E> */ B(Star), R(0),
+ /* 802 S> */ B(LdaConstant), U8(65),
+ /* 802 E> */ B(Star), R(0),
+ /* 814 S> */ B(LdaConstant), U8(66),
+ /* 814 E> */ B(Star), R(0),
+ /* 826 S> */ B(LdaConstant), U8(67),
+ /* 826 E> */ B(Star), R(0),
+ /* 838 S> */ B(LdaConstant), U8(68),
+ /* 838 E> */ B(Star), R(0),
+ /* 850 S> */ B(LdaConstant), U8(69),
+ /* 850 E> */ B(Star), R(0),
+ /* 862 S> */ B(LdaConstant), U8(70),
+ /* 862 E> */ B(Star), R(0),
+ /* 874 S> */ B(LdaConstant), U8(71),
+ /* 874 E> */ B(Star), R(0),
+ /* 886 S> */ B(LdaConstant), U8(72),
+ /* 886 E> */ B(Star), R(0),
+ /* 898 S> */ B(LdaConstant), U8(73),
+ /* 898 E> */ B(Star), R(0),
+ /* 910 S> */ B(LdaConstant), U8(74),
+ /* 910 E> */ B(Star), R(0),
+ /* 922 S> */ B(LdaConstant), U8(75),
+ /* 922 E> */ B(Star), R(0),
+ /* 934 S> */ B(LdaConstant), U8(76),
+ /* 934 E> */ B(Star), R(0),
+ /* 946 S> */ B(LdaConstant), U8(77),
+ /* 946 E> */ B(Star), R(0),
+ /* 958 S> */ B(LdaConstant), U8(78),
+ /* 958 E> */ B(Star), R(0),
+ /* 970 S> */ B(LdaConstant), U8(79),
+ /* 970 E> */ B(Star), R(0),
+ /* 982 S> */ B(LdaConstant), U8(80),
+ /* 982 E> */ B(Star), R(0),
+ /* 994 S> */ B(LdaConstant), U8(81),
+ /* 994 E> */ B(Star), R(0),
+ /* 1006 S> */ B(LdaConstant), U8(82),
+ /* 1006 E> */ B(Star), R(0),
+ /* 1018 S> */ B(LdaConstant), U8(83),
+ /* 1018 E> */ B(Star), R(0),
+ /* 1030 S> */ B(LdaConstant), U8(84),
+ /* 1030 E> */ B(Star), R(0),
+ /* 1042 S> */ B(LdaConstant), U8(85),
+ /* 1042 E> */ B(Star), R(0),
+ /* 1054 S> */ B(LdaConstant), U8(86),
+ /* 1054 E> */ B(Star), R(0),
+ /* 1066 S> */ B(LdaConstant), U8(87),
+ /* 1066 E> */ B(Star), R(0),
+ /* 1078 S> */ B(LdaConstant), U8(88),
+ /* 1078 E> */ B(Star), R(0),
+ /* 1090 S> */ B(LdaConstant), U8(89),
+ /* 1090 E> */ B(Star), R(0),
+ /* 1102 S> */ B(LdaConstant), U8(90),
+ /* 1102 E> */ B(Star), R(0),
+ /* 1114 S> */ B(LdaConstant), U8(91),
+ /* 1114 E> */ B(Star), R(0),
+ /* 1126 S> */ B(LdaConstant), U8(92),
+ /* 1126 E> */ B(Star), R(0),
+ /* 1138 S> */ B(LdaConstant), U8(93),
+ /* 1138 E> */ B(Star), R(0),
+ /* 1150 S> */ B(LdaConstant), U8(94),
+ /* 1150 E> */ B(Star), R(0),
+ /* 1162 S> */ B(LdaConstant), U8(95),
+ /* 1162 E> */ B(Star), R(0),
+ /* 1174 S> */ B(LdaConstant), U8(96),
+ /* 1174 E> */ B(Star), R(0),
+ /* 1186 S> */ B(LdaConstant), U8(97),
+ /* 1186 E> */ B(Star), R(0),
+ /* 1198 S> */ B(LdaConstant), U8(98),
+ /* 1198 E> */ B(Star), R(0),
+ /* 1210 S> */ B(LdaConstant), U8(99),
+ /* 1210 E> */ B(Star), R(0),
+ /* 1222 S> */ B(LdaConstant), U8(100),
+ /* 1222 E> */ B(Star), R(0),
+ /* 1234 S> */ B(LdaConstant), U8(101),
+ /* 1234 E> */ B(Star), R(0),
+ /* 1246 S> */ B(LdaConstant), U8(102),
+ /* 1246 E> */ B(Star), R(0),
+ /* 1258 S> */ B(LdaConstant), U8(103),
+ /* 1258 E> */ B(Star), R(0),
+ /* 1270 S> */ B(LdaConstant), U8(104),
+ /* 1270 E> */ B(Star), R(0),
+ /* 1282 S> */ B(LdaConstant), U8(105),
+ /* 1282 E> */ B(Star), R(0),
+ /* 1294 S> */ B(LdaConstant), U8(106),
+ /* 1294 E> */ B(Star), R(0),
+ /* 1306 S> */ B(LdaConstant), U8(107),
+ /* 1306 E> */ B(Star), R(0),
+ /* 1318 S> */ B(LdaConstant), U8(108),
+ /* 1318 E> */ B(Star), R(0),
+ /* 1330 S> */ B(LdaConstant), U8(109),
+ /* 1330 E> */ B(Star), R(0),
+ /* 1342 S> */ B(LdaConstant), U8(110),
+ /* 1342 E> */ B(Star), R(0),
+ /* 1354 S> */ B(LdaConstant), U8(111),
+ /* 1354 E> */ B(Star), R(0),
+ /* 1366 S> */ B(LdaConstant), U8(112),
+ /* 1366 E> */ B(Star), R(0),
+ /* 1378 S> */ B(LdaConstant), U8(113),
+ /* 1378 E> */ B(Star), R(0),
+ /* 1390 S> */ B(LdaConstant), U8(114),
+ /* 1390 E> */ B(Star), R(0),
+ /* 1402 S> */ B(LdaConstant), U8(115),
+ /* 1402 E> */ B(Star), R(0),
+ /* 1414 S> */ B(LdaConstant), U8(116),
+ /* 1414 E> */ B(Star), R(0),
+ /* 1426 S> */ B(LdaConstant), U8(117),
+ /* 1426 E> */ B(Star), R(0),
+ /* 1438 S> */ B(LdaConstant), U8(118),
+ /* 1438 E> */ B(Star), R(0),
+ /* 1450 S> */ B(LdaConstant), U8(119),
+ /* 1450 E> */ B(Star), R(0),
+ /* 1462 S> */ B(LdaConstant), U8(120),
+ /* 1462 E> */ B(Star), R(0),
+ /* 1474 S> */ B(LdaConstant), U8(121),
+ /* 1474 E> */ B(Star), R(0),
+ /* 1486 S> */ B(LdaConstant), U8(122),
+ /* 1486 E> */ B(Star), R(0),
+ /* 1498 S> */ B(LdaConstant), U8(123),
+ /* 1498 E> */ B(Star), R(0),
+ /* 1510 S> */ B(LdaConstant), U8(124),
+ /* 1510 E> */ B(Star), R(0),
+ /* 1522 S> */ B(LdaConstant), U8(125),
+ /* 1522 E> */ B(Star), R(0),
+ /* 1534 S> */ B(LdaConstant), U8(126),
+ /* 1534 E> */ B(Star), R(0),
+ /* 1546 S> */ B(LdaConstant), U8(127),
+ /* 1546 E> */ B(Star), R(0),
+ /* 1558 S> */ B(LdaConstant), U8(128),
+ /* 1558 E> */ B(Star), R(0),
+ /* 1570 S> */ B(LdaConstant), U8(129),
+ /* 1570 E> */ B(Star), R(0),
+ /* 1582 S> */ B(LdaConstant), U8(130),
+ /* 1582 E> */ B(Star), R(0),
+ /* 1594 S> */ B(LdaConstant), U8(131),
+ /* 1594 E> */ B(Star), R(0),
+ /* 1606 S> */ B(LdaConstant), U8(132),
+ /* 1606 E> */ B(Star), R(0),
+ /* 1618 S> */ B(LdaConstant), U8(133),
+ /* 1618 E> */ B(Star), R(0),
+ /* 1630 S> */ B(LdaConstant), U8(134),
+ /* 1630 E> */ B(Star), R(0),
+ /* 1642 S> */ B(LdaConstant), U8(135),
+ /* 1642 E> */ B(Star), R(0),
+ /* 1654 S> */ B(LdaConstant), U8(136),
+ /* 1654 E> */ B(Star), R(0),
+ /* 1666 S> */ B(LdaConstant), U8(137),
+ /* 1666 E> */ B(Star), R(0),
+ /* 1678 S> */ B(LdaConstant), U8(138),
+ /* 1678 E> */ B(Star), R(0),
+ /* 1690 S> */ B(LdaConstant), U8(139),
+ /* 1690 E> */ B(Star), R(0),
+ /* 1702 S> */ B(LdaConstant), U8(140),
+ /* 1702 E> */ B(Star), R(0),
+ /* 1714 S> */ B(LdaConstant), U8(141),
+ /* 1714 E> */ B(Star), R(0),
+ /* 1726 S> */ B(LdaConstant), U8(142),
+ /* 1726 E> */ B(Star), R(0),
+ /* 1738 S> */ B(LdaConstant), U8(143),
+ /* 1738 E> */ B(Star), R(0),
+ /* 1750 S> */ B(LdaConstant), U8(144),
+ /* 1750 E> */ B(Star), R(0),
+ /* 1762 S> */ B(LdaConstant), U8(145),
+ /* 1762 E> */ B(Star), R(0),
+ /* 1774 S> */ B(LdaConstant), U8(146),
+ /* 1774 E> */ B(Star), R(0),
+ /* 1786 S> */ B(LdaConstant), U8(147),
+ /* 1786 E> */ B(Star), R(0),
+ /* 1798 S> */ B(LdaConstant), U8(148),
+ /* 1798 E> */ B(Star), R(0),
+ /* 1810 S> */ B(LdaConstant), U8(149),
+ /* 1810 E> */ B(Star), R(0),
+ /* 1822 S> */ B(LdaConstant), U8(150),
+ /* 1822 E> */ B(Star), R(0),
+ /* 1834 S> */ B(LdaConstant), U8(151),
+ /* 1834 E> */ B(Star), R(0),
+ /* 1846 S> */ B(LdaConstant), U8(152),
+ /* 1846 E> */ B(Star), R(0),
+ /* 1858 S> */ B(LdaConstant), U8(153),
+ /* 1858 E> */ B(Star), R(0),
+ /* 1870 S> */ B(LdaConstant), U8(154),
+ /* 1870 E> */ B(Star), R(0),
+ /* 1882 S> */ B(LdaConstant), U8(155),
+ /* 1882 E> */ B(Star), R(0),
+ /* 1894 S> */ B(LdaConstant), U8(156),
+ /* 1894 E> */ B(Star), R(0),
+ /* 1906 S> */ B(LdaConstant), U8(157),
+ /* 1906 E> */ B(Star), R(0),
+ /* 1918 S> */ B(LdaConstant), U8(158),
+ /* 1918 E> */ B(Star), R(0),
+ /* 1930 S> */ B(LdaConstant), U8(159),
+ /* 1930 E> */ B(Star), R(0),
+ /* 1942 S> */ B(LdaConstant), U8(160),
+ /* 1942 E> */ B(Star), R(0),
+ /* 1954 S> */ B(LdaConstant), U8(161),
+ /* 1954 E> */ B(Star), R(0),
+ /* 1966 S> */ B(LdaConstant), U8(162),
+ /* 1966 E> */ B(Star), R(0),
+ /* 1978 S> */ B(LdaConstant), U8(163),
+ /* 1978 E> */ B(Star), R(0),
+ /* 1990 S> */ B(LdaConstant), U8(164),
+ /* 1990 E> */ B(Star), R(0),
+ /* 2002 S> */ B(LdaConstant), U8(165),
+ /* 2002 E> */ B(Star), R(0),
+ /* 2014 S> */ B(LdaConstant), U8(166),
+ /* 2014 E> */ B(Star), R(0),
+ /* 2026 S> */ B(LdaConstant), U8(167),
+ /* 2026 E> */ B(Star), R(0),
+ /* 2038 S> */ B(LdaConstant), U8(168),
+ /* 2038 E> */ B(Star), R(0),
+ /* 2050 S> */ B(LdaConstant), U8(169),
+ /* 2050 E> */ B(Star), R(0),
+ /* 2062 S> */ B(LdaConstant), U8(170),
+ /* 2062 E> */ B(Star), R(0),
+ /* 2074 S> */ B(LdaConstant), U8(171),
+ /* 2074 E> */ B(Star), R(0),
+ /* 2086 S> */ B(LdaConstant), U8(172),
+ /* 2086 E> */ B(Star), R(0),
+ /* 2098 S> */ B(LdaConstant), U8(173),
+ /* 2098 E> */ B(Star), R(0),
+ /* 2110 S> */ B(LdaConstant), U8(174),
+ /* 2110 E> */ B(Star), R(0),
+ /* 2122 S> */ B(LdaConstant), U8(175),
+ /* 2122 E> */ B(Star), R(0),
+ /* 2134 S> */ B(LdaConstant), U8(176),
+ /* 2134 E> */ B(Star), R(0),
+ /* 2146 S> */ B(LdaConstant), U8(177),
+ /* 2146 E> */ B(Star), R(0),
+ /* 2158 S> */ B(LdaConstant), U8(178),
+ /* 2158 E> */ B(Star), R(0),
+ /* 2170 S> */ B(LdaConstant), U8(179),
+ /* 2170 E> */ B(Star), R(0),
+ /* 2182 S> */ B(LdaConstant), U8(180),
+ /* 2182 E> */ B(Star), R(0),
+ /* 2194 S> */ B(LdaConstant), U8(181),
+ /* 2194 E> */ B(Star), R(0),
+ /* 2206 S> */ B(LdaConstant), U8(182),
+ /* 2206 E> */ B(Star), R(0),
+ /* 2218 S> */ B(LdaConstant), U8(183),
+ /* 2218 E> */ B(Star), R(0),
+ /* 2230 S> */ B(LdaConstant), U8(184),
+ /* 2230 E> */ B(Star), R(0),
+ /* 2242 S> */ B(LdaConstant), U8(185),
+ /* 2242 E> */ B(Star), R(0),
+ /* 2254 S> */ B(LdaConstant), U8(186),
+ /* 2254 E> */ B(Star), R(0),
+ /* 2266 S> */ B(LdaConstant), U8(187),
+ /* 2266 E> */ B(Star), R(0),
+ /* 2278 S> */ B(LdaConstant), U8(188),
+ /* 2278 E> */ B(Star), R(0),
+ /* 2290 S> */ B(LdaConstant), U8(189),
+ /* 2290 E> */ B(Star), R(0),
+ /* 2302 S> */ B(LdaConstant), U8(190),
+ /* 2302 E> */ B(Star), R(0),
+ /* 2314 S> */ B(LdaConstant), U8(191),
+ /* 2314 E> */ B(Star), R(0),
+ /* 2326 S> */ B(LdaConstant), U8(192),
+ /* 2326 E> */ B(Star), R(0),
+ /* 2338 S> */ B(LdaConstant), U8(193),
+ /* 2338 E> */ B(Star), R(0),
+ /* 2350 S> */ B(LdaConstant), U8(194),
+ /* 2350 E> */ B(Star), R(0),
+ /* 2362 S> */ B(LdaConstant), U8(195),
+ /* 2362 E> */ B(Star), R(0),
+ /* 2374 S> */ B(LdaConstant), U8(196),
+ /* 2374 E> */ B(Star), R(0),
+ /* 2386 S> */ B(LdaConstant), U8(197),
+ /* 2386 E> */ B(Star), R(0),
+ /* 2398 S> */ B(LdaConstant), U8(198),
+ /* 2398 E> */ B(Star), R(0),
+ /* 2410 S> */ B(LdaConstant), U8(199),
+ /* 2410 E> */ B(Star), R(0),
+ /* 2422 S> */ B(LdaConstant), U8(200),
+ /* 2422 E> */ B(Star), R(0),
+ /* 2434 S> */ B(LdaConstant), U8(201),
+ /* 2434 E> */ B(Star), R(0),
+ /* 2446 S> */ B(LdaConstant), U8(202),
+ /* 2446 E> */ B(Star), R(0),
+ /* 2458 S> */ B(LdaConstant), U8(203),
+ /* 2458 E> */ B(Star), R(0),
+ /* 2470 S> */ B(LdaConstant), U8(204),
+ /* 2470 E> */ B(Star), R(0),
+ /* 2482 S> */ B(LdaConstant), U8(205),
+ /* 2482 E> */ B(Star), R(0),
+ /* 2494 S> */ B(LdaConstant), U8(206),
+ /* 2494 E> */ B(Star), R(0),
+ /* 2506 S> */ B(LdaConstant), U8(207),
+ /* 2506 E> */ B(Star), R(0),
+ /* 2518 S> */ B(LdaConstant), U8(208),
+ /* 2518 E> */ B(Star), R(0),
+ /* 2530 S> */ B(LdaConstant), U8(209),
+ /* 2530 E> */ B(Star), R(0),
+ /* 2542 S> */ B(LdaConstant), U8(210),
+ /* 2542 E> */ B(Star), R(0),
+ /* 2554 S> */ B(LdaConstant), U8(211),
+ /* 2554 E> */ B(Star), R(0),
+ /* 2566 S> */ B(LdaConstant), U8(212),
+ /* 2566 E> */ B(Star), R(0),
+ /* 2578 S> */ B(LdaConstant), U8(213),
+ /* 2578 E> */ B(Star), R(0),
+ /* 2590 S> */ B(LdaConstant), U8(214),
+ /* 2590 E> */ B(Star), R(0),
+ /* 2602 S> */ B(LdaConstant), U8(215),
+ /* 2602 E> */ B(Star), R(0),
+ /* 2614 S> */ B(LdaConstant), U8(216),
+ /* 2614 E> */ B(Star), R(0),
+ /* 2626 S> */ B(LdaConstant), U8(217),
+ /* 2626 E> */ B(Star), R(0),
+ /* 2638 S> */ B(LdaConstant), U8(218),
+ /* 2638 E> */ B(Star), R(0),
+ /* 2650 S> */ B(LdaConstant), U8(219),
+ /* 2650 E> */ B(Star), R(0),
+ /* 2662 S> */ B(LdaConstant), U8(220),
+ /* 2662 E> */ B(Star), R(0),
+ /* 2674 S> */ B(LdaConstant), U8(221),
+ /* 2674 E> */ B(Star), R(0),
+ /* 2686 S> */ B(LdaConstant), U8(222),
+ /* 2686 E> */ B(Star), R(0),
+ /* 2698 S> */ B(LdaConstant), U8(223),
+ /* 2698 E> */ B(Star), R(0),
+ /* 2710 S> */ B(LdaConstant), U8(224),
+ /* 2710 E> */ B(Star), R(0),
+ /* 2722 S> */ B(LdaConstant), U8(225),
+ /* 2722 E> */ B(Star), R(0),
+ /* 2734 S> */ B(LdaConstant), U8(226),
+ /* 2734 E> */ B(Star), R(0),
+ /* 2746 S> */ B(LdaConstant), U8(227),
+ /* 2746 E> */ B(Star), R(0),
+ /* 2758 S> */ B(LdaConstant), U8(228),
+ /* 2758 E> */ B(Star), R(0),
+ /* 2770 S> */ B(LdaConstant), U8(229),
+ /* 2770 E> */ B(Star), R(0),
+ /* 2782 S> */ B(LdaConstant), U8(230),
+ /* 2782 E> */ B(Star), R(0),
+ /* 2794 S> */ B(LdaConstant), U8(231),
+ /* 2794 E> */ B(Star), R(0),
+ /* 2806 S> */ B(LdaConstant), U8(232),
+ /* 2806 E> */ B(Star), R(0),
+ /* 2818 S> */ B(LdaConstant), U8(233),
+ /* 2818 E> */ B(Star), R(0),
+ /* 2830 S> */ B(LdaConstant), U8(234),
+ /* 2830 E> */ B(Star), R(0),
+ /* 2842 S> */ B(LdaConstant), U8(235),
+ /* 2842 E> */ B(Star), R(0),
+ /* 2854 S> */ B(LdaConstant), U8(236),
+ /* 2854 E> */ B(Star), R(0),
+ /* 2866 S> */ B(LdaConstant), U8(237),
+ /* 2866 E> */ B(Star), R(0),
+ /* 2878 S> */ B(LdaConstant), U8(238),
+ /* 2878 E> */ B(Star), R(0),
+ /* 2890 S> */ B(LdaConstant), U8(239),
+ /* 2890 E> */ B(Star), R(0),
+ /* 2902 S> */ B(LdaConstant), U8(240),
+ /* 2902 E> */ B(Star), R(0),
+ /* 2914 S> */ B(LdaConstant), U8(241),
+ /* 2914 E> */ B(Star), R(0),
+ /* 2926 S> */ B(LdaConstant), U8(242),
+ /* 2926 E> */ B(Star), R(0),
+ /* 2938 S> */ B(LdaConstant), U8(243),
+ /* 2938 E> */ B(Star), R(0),
+ /* 2950 S> */ B(LdaConstant), U8(244),
+ /* 2950 E> */ B(Star), R(0),
+ /* 2962 S> */ B(LdaConstant), U8(245),
+ /* 2962 E> */ B(Star), R(0),
+ /* 2974 S> */ B(LdaConstant), U8(246),
+ /* 2974 E> */ B(Star), R(0),
+ /* 2986 S> */ B(LdaConstant), U8(247),
+ /* 2986 E> */ B(Star), R(0),
+ /* 2998 S> */ B(LdaConstant), U8(248),
+ /* 2998 E> */ B(Star), R(0),
+ /* 3010 S> */ B(LdaConstant), U8(249),
+ /* 3010 E> */ B(Star), R(0),
+ /* 3022 S> */ B(LdaConstant), U8(250),
+ /* 3022 E> */ B(Star), R(0),
+ /* 3034 S> */ B(LdaConstant), U8(251),
+ /* 3034 E> */ B(Star), R(0),
+ /* 3046 S> */ B(LdaConstant), U8(252),
+ /* 3046 E> */ B(Star), R(0),
+ /* 3058 S> */ B(LdaConstant), U8(253),
+ /* 3058 E> */ B(Star), R(0),
+ /* 3070 S> */ B(LdaConstant), U8(254),
+ /* 3070 E> */ B(Star), R(0),
+ /* 3082 S> */ B(LdaConstant), U8(255),
+ /* 3082 E> */ B(Star), R(0),
+ /* 3086 S> */ B(Wide), B(LdaLookupSlot), U16(256),
+ /* 3095 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
@@ -1332,522 +1332,522 @@
parameter count: 1
bytecode array length: 1031
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(LdaLookupSlotInsideTypeof), U16(256),
- B(TypeOf),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 22 S> */ B(LdaConstant), U8(0),
+ /* 22 E> */ B(Star), R(0),
+ /* 34 S> */ B(LdaConstant), U8(1),
+ /* 34 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaConstant), U8(2),
+ /* 46 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaConstant), U8(3),
+ /* 58 E> */ B(Star), R(0),
+ /* 70 S> */ B(LdaConstant), U8(4),
+ /* 70 E> */ B(Star), R(0),
+ /* 82 S> */ B(LdaConstant), U8(5),
+ /* 82 E> */ B(Star), R(0),
+ /* 94 S> */ B(LdaConstant), U8(6),
+ /* 94 E> */ B(Star), R(0),
+ /* 106 S> */ B(LdaConstant), U8(7),
+ /* 106 E> */ B(Star), R(0),
+ /* 118 S> */ B(LdaConstant), U8(8),
+ /* 118 E> */ B(Star), R(0),
+ /* 130 S> */ B(LdaConstant), U8(9),
+ /* 130 E> */ B(Star), R(0),
+ /* 142 S> */ B(LdaConstant), U8(10),
+ /* 142 E> */ B(Star), R(0),
+ /* 154 S> */ B(LdaConstant), U8(11),
+ /* 154 E> */ B(Star), R(0),
+ /* 166 S> */ B(LdaConstant), U8(12),
+ /* 166 E> */ B(Star), R(0),
+ /* 178 S> */ B(LdaConstant), U8(13),
+ /* 178 E> */ B(Star), R(0),
+ /* 190 S> */ B(LdaConstant), U8(14),
+ /* 190 E> */ B(Star), R(0),
+ /* 202 S> */ B(LdaConstant), U8(15),
+ /* 202 E> */ B(Star), R(0),
+ /* 214 S> */ B(LdaConstant), U8(16),
+ /* 214 E> */ B(Star), R(0),
+ /* 226 S> */ B(LdaConstant), U8(17),
+ /* 226 E> */ B(Star), R(0),
+ /* 238 S> */ B(LdaConstant), U8(18),
+ /* 238 E> */ B(Star), R(0),
+ /* 250 S> */ B(LdaConstant), U8(19),
+ /* 250 E> */ B(Star), R(0),
+ /* 262 S> */ B(LdaConstant), U8(20),
+ /* 262 E> */ B(Star), R(0),
+ /* 274 S> */ B(LdaConstant), U8(21),
+ /* 274 E> */ B(Star), R(0),
+ /* 286 S> */ B(LdaConstant), U8(22),
+ /* 286 E> */ B(Star), R(0),
+ /* 298 S> */ B(LdaConstant), U8(23),
+ /* 298 E> */ B(Star), R(0),
+ /* 310 S> */ B(LdaConstant), U8(24),
+ /* 310 E> */ B(Star), R(0),
+ /* 322 S> */ B(LdaConstant), U8(25),
+ /* 322 E> */ B(Star), R(0),
+ /* 334 S> */ B(LdaConstant), U8(26),
+ /* 334 E> */ B(Star), R(0),
+ /* 346 S> */ B(LdaConstant), U8(27),
+ /* 346 E> */ B(Star), R(0),
+ /* 358 S> */ B(LdaConstant), U8(28),
+ /* 358 E> */ B(Star), R(0),
+ /* 370 S> */ B(LdaConstant), U8(29),
+ /* 370 E> */ B(Star), R(0),
+ /* 382 S> */ B(LdaConstant), U8(30),
+ /* 382 E> */ B(Star), R(0),
+ /* 394 S> */ B(LdaConstant), U8(31),
+ /* 394 E> */ B(Star), R(0),
+ /* 406 S> */ B(LdaConstant), U8(32),
+ /* 406 E> */ B(Star), R(0),
+ /* 418 S> */ B(LdaConstant), U8(33),
+ /* 418 E> */ B(Star), R(0),
+ /* 430 S> */ B(LdaConstant), U8(34),
+ /* 430 E> */ B(Star), R(0),
+ /* 442 S> */ B(LdaConstant), U8(35),
+ /* 442 E> */ B(Star), R(0),
+ /* 454 S> */ B(LdaConstant), U8(36),
+ /* 454 E> */ B(Star), R(0),
+ /* 466 S> */ B(LdaConstant), U8(37),
+ /* 466 E> */ B(Star), R(0),
+ /* 478 S> */ B(LdaConstant), U8(38),
+ /* 478 E> */ B(Star), R(0),
+ /* 490 S> */ B(LdaConstant), U8(39),
+ /* 490 E> */ B(Star), R(0),
+ /* 502 S> */ B(LdaConstant), U8(40),
+ /* 502 E> */ B(Star), R(0),
+ /* 514 S> */ B(LdaConstant), U8(41),
+ /* 514 E> */ B(Star), R(0),
+ /* 526 S> */ B(LdaConstant), U8(42),
+ /* 526 E> */ B(Star), R(0),
+ /* 538 S> */ B(LdaConstant), U8(43),
+ /* 538 E> */ B(Star), R(0),
+ /* 550 S> */ B(LdaConstant), U8(44),
+ /* 550 E> */ B(Star), R(0),
+ /* 562 S> */ B(LdaConstant), U8(45),
+ /* 562 E> */ B(Star), R(0),
+ /* 574 S> */ B(LdaConstant), U8(46),
+ /* 574 E> */ B(Star), R(0),
+ /* 586 S> */ B(LdaConstant), U8(47),
+ /* 586 E> */ B(Star), R(0),
+ /* 598 S> */ B(LdaConstant), U8(48),
+ /* 598 E> */ B(Star), R(0),
+ /* 610 S> */ B(LdaConstant), U8(49),
+ /* 610 E> */ B(Star), R(0),
+ /* 622 S> */ B(LdaConstant), U8(50),
+ /* 622 E> */ B(Star), R(0),
+ /* 634 S> */ B(LdaConstant), U8(51),
+ /* 634 E> */ B(Star), R(0),
+ /* 646 S> */ B(LdaConstant), U8(52),
+ /* 646 E> */ B(Star), R(0),
+ /* 658 S> */ B(LdaConstant), U8(53),
+ /* 658 E> */ B(Star), R(0),
+ /* 670 S> */ B(LdaConstant), U8(54),
+ /* 670 E> */ B(Star), R(0),
+ /* 682 S> */ B(LdaConstant), U8(55),
+ /* 682 E> */ B(Star), R(0),
+ /* 694 S> */ B(LdaConstant), U8(56),
+ /* 694 E> */ B(Star), R(0),
+ /* 706 S> */ B(LdaConstant), U8(57),
+ /* 706 E> */ B(Star), R(0),
+ /* 718 S> */ B(LdaConstant), U8(58),
+ /* 718 E> */ B(Star), R(0),
+ /* 730 S> */ B(LdaConstant), U8(59),
+ /* 730 E> */ B(Star), R(0),
+ /* 742 S> */ B(LdaConstant), U8(60),
+ /* 742 E> */ B(Star), R(0),
+ /* 754 S> */ B(LdaConstant), U8(61),
+ /* 754 E> */ B(Star), R(0),
+ /* 766 S> */ B(LdaConstant), U8(62),
+ /* 766 E> */ B(Star), R(0),
+ /* 778 S> */ B(LdaConstant), U8(63),
+ /* 778 E> */ B(Star), R(0),
+ /* 790 S> */ B(LdaConstant), U8(64),
+ /* 790 E> */ B(Star), R(0),
+ /* 802 S> */ B(LdaConstant), U8(65),
+ /* 802 E> */ B(Star), R(0),
+ /* 814 S> */ B(LdaConstant), U8(66),
+ /* 814 E> */ B(Star), R(0),
+ /* 826 S> */ B(LdaConstant), U8(67),
+ /* 826 E> */ B(Star), R(0),
+ /* 838 S> */ B(LdaConstant), U8(68),
+ /* 838 E> */ B(Star), R(0),
+ /* 850 S> */ B(LdaConstant), U8(69),
+ /* 850 E> */ B(Star), R(0),
+ /* 862 S> */ B(LdaConstant), U8(70),
+ /* 862 E> */ B(Star), R(0),
+ /* 874 S> */ B(LdaConstant), U8(71),
+ /* 874 E> */ B(Star), R(0),
+ /* 886 S> */ B(LdaConstant), U8(72),
+ /* 886 E> */ B(Star), R(0),
+ /* 898 S> */ B(LdaConstant), U8(73),
+ /* 898 E> */ B(Star), R(0),
+ /* 910 S> */ B(LdaConstant), U8(74),
+ /* 910 E> */ B(Star), R(0),
+ /* 922 S> */ B(LdaConstant), U8(75),
+ /* 922 E> */ B(Star), R(0),
+ /* 934 S> */ B(LdaConstant), U8(76),
+ /* 934 E> */ B(Star), R(0),
+ /* 946 S> */ B(LdaConstant), U8(77),
+ /* 946 E> */ B(Star), R(0),
+ /* 958 S> */ B(LdaConstant), U8(78),
+ /* 958 E> */ B(Star), R(0),
+ /* 970 S> */ B(LdaConstant), U8(79),
+ /* 970 E> */ B(Star), R(0),
+ /* 982 S> */ B(LdaConstant), U8(80),
+ /* 982 E> */ B(Star), R(0),
+ /* 994 S> */ B(LdaConstant), U8(81),
+ /* 994 E> */ B(Star), R(0),
+ /* 1006 S> */ B(LdaConstant), U8(82),
+ /* 1006 E> */ B(Star), R(0),
+ /* 1018 S> */ B(LdaConstant), U8(83),
+ /* 1018 E> */ B(Star), R(0),
+ /* 1030 S> */ B(LdaConstant), U8(84),
+ /* 1030 E> */ B(Star), R(0),
+ /* 1042 S> */ B(LdaConstant), U8(85),
+ /* 1042 E> */ B(Star), R(0),
+ /* 1054 S> */ B(LdaConstant), U8(86),
+ /* 1054 E> */ B(Star), R(0),
+ /* 1066 S> */ B(LdaConstant), U8(87),
+ /* 1066 E> */ B(Star), R(0),
+ /* 1078 S> */ B(LdaConstant), U8(88),
+ /* 1078 E> */ B(Star), R(0),
+ /* 1090 S> */ B(LdaConstant), U8(89),
+ /* 1090 E> */ B(Star), R(0),
+ /* 1102 S> */ B(LdaConstant), U8(90),
+ /* 1102 E> */ B(Star), R(0),
+ /* 1114 S> */ B(LdaConstant), U8(91),
+ /* 1114 E> */ B(Star), R(0),
+ /* 1126 S> */ B(LdaConstant), U8(92),
+ /* 1126 E> */ B(Star), R(0),
+ /* 1138 S> */ B(LdaConstant), U8(93),
+ /* 1138 E> */ B(Star), R(0),
+ /* 1150 S> */ B(LdaConstant), U8(94),
+ /* 1150 E> */ B(Star), R(0),
+ /* 1162 S> */ B(LdaConstant), U8(95),
+ /* 1162 E> */ B(Star), R(0),
+ /* 1174 S> */ B(LdaConstant), U8(96),
+ /* 1174 E> */ B(Star), R(0),
+ /* 1186 S> */ B(LdaConstant), U8(97),
+ /* 1186 E> */ B(Star), R(0),
+ /* 1198 S> */ B(LdaConstant), U8(98),
+ /* 1198 E> */ B(Star), R(0),
+ /* 1210 S> */ B(LdaConstant), U8(99),
+ /* 1210 E> */ B(Star), R(0),
+ /* 1222 S> */ B(LdaConstant), U8(100),
+ /* 1222 E> */ B(Star), R(0),
+ /* 1234 S> */ B(LdaConstant), U8(101),
+ /* 1234 E> */ B(Star), R(0),
+ /* 1246 S> */ B(LdaConstant), U8(102),
+ /* 1246 E> */ B(Star), R(0),
+ /* 1258 S> */ B(LdaConstant), U8(103),
+ /* 1258 E> */ B(Star), R(0),
+ /* 1270 S> */ B(LdaConstant), U8(104),
+ /* 1270 E> */ B(Star), R(0),
+ /* 1282 S> */ B(LdaConstant), U8(105),
+ /* 1282 E> */ B(Star), R(0),
+ /* 1294 S> */ B(LdaConstant), U8(106),
+ /* 1294 E> */ B(Star), R(0),
+ /* 1306 S> */ B(LdaConstant), U8(107),
+ /* 1306 E> */ B(Star), R(0),
+ /* 1318 S> */ B(LdaConstant), U8(108),
+ /* 1318 E> */ B(Star), R(0),
+ /* 1330 S> */ B(LdaConstant), U8(109),
+ /* 1330 E> */ B(Star), R(0),
+ /* 1342 S> */ B(LdaConstant), U8(110),
+ /* 1342 E> */ B(Star), R(0),
+ /* 1354 S> */ B(LdaConstant), U8(111),
+ /* 1354 E> */ B(Star), R(0),
+ /* 1366 S> */ B(LdaConstant), U8(112),
+ /* 1366 E> */ B(Star), R(0),
+ /* 1378 S> */ B(LdaConstant), U8(113),
+ /* 1378 E> */ B(Star), R(0),
+ /* 1390 S> */ B(LdaConstant), U8(114),
+ /* 1390 E> */ B(Star), R(0),
+ /* 1402 S> */ B(LdaConstant), U8(115),
+ /* 1402 E> */ B(Star), R(0),
+ /* 1414 S> */ B(LdaConstant), U8(116),
+ /* 1414 E> */ B(Star), R(0),
+ /* 1426 S> */ B(LdaConstant), U8(117),
+ /* 1426 E> */ B(Star), R(0),
+ /* 1438 S> */ B(LdaConstant), U8(118),
+ /* 1438 E> */ B(Star), R(0),
+ /* 1450 S> */ B(LdaConstant), U8(119),
+ /* 1450 E> */ B(Star), R(0),
+ /* 1462 S> */ B(LdaConstant), U8(120),
+ /* 1462 E> */ B(Star), R(0),
+ /* 1474 S> */ B(LdaConstant), U8(121),
+ /* 1474 E> */ B(Star), R(0),
+ /* 1486 S> */ B(LdaConstant), U8(122),
+ /* 1486 E> */ B(Star), R(0),
+ /* 1498 S> */ B(LdaConstant), U8(123),
+ /* 1498 E> */ B(Star), R(0),
+ /* 1510 S> */ B(LdaConstant), U8(124),
+ /* 1510 E> */ B(Star), R(0),
+ /* 1522 S> */ B(LdaConstant), U8(125),
+ /* 1522 E> */ B(Star), R(0),
+ /* 1534 S> */ B(LdaConstant), U8(126),
+ /* 1534 E> */ B(Star), R(0),
+ /* 1546 S> */ B(LdaConstant), U8(127),
+ /* 1546 E> */ B(Star), R(0),
+ /* 1558 S> */ B(LdaConstant), U8(128),
+ /* 1558 E> */ B(Star), R(0),
+ /* 1570 S> */ B(LdaConstant), U8(129),
+ /* 1570 E> */ B(Star), R(0),
+ /* 1582 S> */ B(LdaConstant), U8(130),
+ /* 1582 E> */ B(Star), R(0),
+ /* 1594 S> */ B(LdaConstant), U8(131),
+ /* 1594 E> */ B(Star), R(0),
+ /* 1606 S> */ B(LdaConstant), U8(132),
+ /* 1606 E> */ B(Star), R(0),
+ /* 1618 S> */ B(LdaConstant), U8(133),
+ /* 1618 E> */ B(Star), R(0),
+ /* 1630 S> */ B(LdaConstant), U8(134),
+ /* 1630 E> */ B(Star), R(0),
+ /* 1642 S> */ B(LdaConstant), U8(135),
+ /* 1642 E> */ B(Star), R(0),
+ /* 1654 S> */ B(LdaConstant), U8(136),
+ /* 1654 E> */ B(Star), R(0),
+ /* 1666 S> */ B(LdaConstant), U8(137),
+ /* 1666 E> */ B(Star), R(0),
+ /* 1678 S> */ B(LdaConstant), U8(138),
+ /* 1678 E> */ B(Star), R(0),
+ /* 1690 S> */ B(LdaConstant), U8(139),
+ /* 1690 E> */ B(Star), R(0),
+ /* 1702 S> */ B(LdaConstant), U8(140),
+ /* 1702 E> */ B(Star), R(0),
+ /* 1714 S> */ B(LdaConstant), U8(141),
+ /* 1714 E> */ B(Star), R(0),
+ /* 1726 S> */ B(LdaConstant), U8(142),
+ /* 1726 E> */ B(Star), R(0),
+ /* 1738 S> */ B(LdaConstant), U8(143),
+ /* 1738 E> */ B(Star), R(0),
+ /* 1750 S> */ B(LdaConstant), U8(144),
+ /* 1750 E> */ B(Star), R(0),
+ /* 1762 S> */ B(LdaConstant), U8(145),
+ /* 1762 E> */ B(Star), R(0),
+ /* 1774 S> */ B(LdaConstant), U8(146),
+ /* 1774 E> */ B(Star), R(0),
+ /* 1786 S> */ B(LdaConstant), U8(147),
+ /* 1786 E> */ B(Star), R(0),
+ /* 1798 S> */ B(LdaConstant), U8(148),
+ /* 1798 E> */ B(Star), R(0),
+ /* 1810 S> */ B(LdaConstant), U8(149),
+ /* 1810 E> */ B(Star), R(0),
+ /* 1822 S> */ B(LdaConstant), U8(150),
+ /* 1822 E> */ B(Star), R(0),
+ /* 1834 S> */ B(LdaConstant), U8(151),
+ /* 1834 E> */ B(Star), R(0),
+ /* 1846 S> */ B(LdaConstant), U8(152),
+ /* 1846 E> */ B(Star), R(0),
+ /* 1858 S> */ B(LdaConstant), U8(153),
+ /* 1858 E> */ B(Star), R(0),
+ /* 1870 S> */ B(LdaConstant), U8(154),
+ /* 1870 E> */ B(Star), R(0),
+ /* 1882 S> */ B(LdaConstant), U8(155),
+ /* 1882 E> */ B(Star), R(0),
+ /* 1894 S> */ B(LdaConstant), U8(156),
+ /* 1894 E> */ B(Star), R(0),
+ /* 1906 S> */ B(LdaConstant), U8(157),
+ /* 1906 E> */ B(Star), R(0),
+ /* 1918 S> */ B(LdaConstant), U8(158),
+ /* 1918 E> */ B(Star), R(0),
+ /* 1930 S> */ B(LdaConstant), U8(159),
+ /* 1930 E> */ B(Star), R(0),
+ /* 1942 S> */ B(LdaConstant), U8(160),
+ /* 1942 E> */ B(Star), R(0),
+ /* 1954 S> */ B(LdaConstant), U8(161),
+ /* 1954 E> */ B(Star), R(0),
+ /* 1966 S> */ B(LdaConstant), U8(162),
+ /* 1966 E> */ B(Star), R(0),
+ /* 1978 S> */ B(LdaConstant), U8(163),
+ /* 1978 E> */ B(Star), R(0),
+ /* 1990 S> */ B(LdaConstant), U8(164),
+ /* 1990 E> */ B(Star), R(0),
+ /* 2002 S> */ B(LdaConstant), U8(165),
+ /* 2002 E> */ B(Star), R(0),
+ /* 2014 S> */ B(LdaConstant), U8(166),
+ /* 2014 E> */ B(Star), R(0),
+ /* 2026 S> */ B(LdaConstant), U8(167),
+ /* 2026 E> */ B(Star), R(0),
+ /* 2038 S> */ B(LdaConstant), U8(168),
+ /* 2038 E> */ B(Star), R(0),
+ /* 2050 S> */ B(LdaConstant), U8(169),
+ /* 2050 E> */ B(Star), R(0),
+ /* 2062 S> */ B(LdaConstant), U8(170),
+ /* 2062 E> */ B(Star), R(0),
+ /* 2074 S> */ B(LdaConstant), U8(171),
+ /* 2074 E> */ B(Star), R(0),
+ /* 2086 S> */ B(LdaConstant), U8(172),
+ /* 2086 E> */ B(Star), R(0),
+ /* 2098 S> */ B(LdaConstant), U8(173),
+ /* 2098 E> */ B(Star), R(0),
+ /* 2110 S> */ B(LdaConstant), U8(174),
+ /* 2110 E> */ B(Star), R(0),
+ /* 2122 S> */ B(LdaConstant), U8(175),
+ /* 2122 E> */ B(Star), R(0),
+ /* 2134 S> */ B(LdaConstant), U8(176),
+ /* 2134 E> */ B(Star), R(0),
+ /* 2146 S> */ B(LdaConstant), U8(177),
+ /* 2146 E> */ B(Star), R(0),
+ /* 2158 S> */ B(LdaConstant), U8(178),
+ /* 2158 E> */ B(Star), R(0),
+ /* 2170 S> */ B(LdaConstant), U8(179),
+ /* 2170 E> */ B(Star), R(0),
+ /* 2182 S> */ B(LdaConstant), U8(180),
+ /* 2182 E> */ B(Star), R(0),
+ /* 2194 S> */ B(LdaConstant), U8(181),
+ /* 2194 E> */ B(Star), R(0),
+ /* 2206 S> */ B(LdaConstant), U8(182),
+ /* 2206 E> */ B(Star), R(0),
+ /* 2218 S> */ B(LdaConstant), U8(183),
+ /* 2218 E> */ B(Star), R(0),
+ /* 2230 S> */ B(LdaConstant), U8(184),
+ /* 2230 E> */ B(Star), R(0),
+ /* 2242 S> */ B(LdaConstant), U8(185),
+ /* 2242 E> */ B(Star), R(0),
+ /* 2254 S> */ B(LdaConstant), U8(186),
+ /* 2254 E> */ B(Star), R(0),
+ /* 2266 S> */ B(LdaConstant), U8(187),
+ /* 2266 E> */ B(Star), R(0),
+ /* 2278 S> */ B(LdaConstant), U8(188),
+ /* 2278 E> */ B(Star), R(0),
+ /* 2290 S> */ B(LdaConstant), U8(189),
+ /* 2290 E> */ B(Star), R(0),
+ /* 2302 S> */ B(LdaConstant), U8(190),
+ /* 2302 E> */ B(Star), R(0),
+ /* 2314 S> */ B(LdaConstant), U8(191),
+ /* 2314 E> */ B(Star), R(0),
+ /* 2326 S> */ B(LdaConstant), U8(192),
+ /* 2326 E> */ B(Star), R(0),
+ /* 2338 S> */ B(LdaConstant), U8(193),
+ /* 2338 E> */ B(Star), R(0),
+ /* 2350 S> */ B(LdaConstant), U8(194),
+ /* 2350 E> */ B(Star), R(0),
+ /* 2362 S> */ B(LdaConstant), U8(195),
+ /* 2362 E> */ B(Star), R(0),
+ /* 2374 S> */ B(LdaConstant), U8(196),
+ /* 2374 E> */ B(Star), R(0),
+ /* 2386 S> */ B(LdaConstant), U8(197),
+ /* 2386 E> */ B(Star), R(0),
+ /* 2398 S> */ B(LdaConstant), U8(198),
+ /* 2398 E> */ B(Star), R(0),
+ /* 2410 S> */ B(LdaConstant), U8(199),
+ /* 2410 E> */ B(Star), R(0),
+ /* 2422 S> */ B(LdaConstant), U8(200),
+ /* 2422 E> */ B(Star), R(0),
+ /* 2434 S> */ B(LdaConstant), U8(201),
+ /* 2434 E> */ B(Star), R(0),
+ /* 2446 S> */ B(LdaConstant), U8(202),
+ /* 2446 E> */ B(Star), R(0),
+ /* 2458 S> */ B(LdaConstant), U8(203),
+ /* 2458 E> */ B(Star), R(0),
+ /* 2470 S> */ B(LdaConstant), U8(204),
+ /* 2470 E> */ B(Star), R(0),
+ /* 2482 S> */ B(LdaConstant), U8(205),
+ /* 2482 E> */ B(Star), R(0),
+ /* 2494 S> */ B(LdaConstant), U8(206),
+ /* 2494 E> */ B(Star), R(0),
+ /* 2506 S> */ B(LdaConstant), U8(207),
+ /* 2506 E> */ B(Star), R(0),
+ /* 2518 S> */ B(LdaConstant), U8(208),
+ /* 2518 E> */ B(Star), R(0),
+ /* 2530 S> */ B(LdaConstant), U8(209),
+ /* 2530 E> */ B(Star), R(0),
+ /* 2542 S> */ B(LdaConstant), U8(210),
+ /* 2542 E> */ B(Star), R(0),
+ /* 2554 S> */ B(LdaConstant), U8(211),
+ /* 2554 E> */ B(Star), R(0),
+ /* 2566 S> */ B(LdaConstant), U8(212),
+ /* 2566 E> */ B(Star), R(0),
+ /* 2578 S> */ B(LdaConstant), U8(213),
+ /* 2578 E> */ B(Star), R(0),
+ /* 2590 S> */ B(LdaConstant), U8(214),
+ /* 2590 E> */ B(Star), R(0),
+ /* 2602 S> */ B(LdaConstant), U8(215),
+ /* 2602 E> */ B(Star), R(0),
+ /* 2614 S> */ B(LdaConstant), U8(216),
+ /* 2614 E> */ B(Star), R(0),
+ /* 2626 S> */ B(LdaConstant), U8(217),
+ /* 2626 E> */ B(Star), R(0),
+ /* 2638 S> */ B(LdaConstant), U8(218),
+ /* 2638 E> */ B(Star), R(0),
+ /* 2650 S> */ B(LdaConstant), U8(219),
+ /* 2650 E> */ B(Star), R(0),
+ /* 2662 S> */ B(LdaConstant), U8(220),
+ /* 2662 E> */ B(Star), R(0),
+ /* 2674 S> */ B(LdaConstant), U8(221),
+ /* 2674 E> */ B(Star), R(0),
+ /* 2686 S> */ B(LdaConstant), U8(222),
+ /* 2686 E> */ B(Star), R(0),
+ /* 2698 S> */ B(LdaConstant), U8(223),
+ /* 2698 E> */ B(Star), R(0),
+ /* 2710 S> */ B(LdaConstant), U8(224),
+ /* 2710 E> */ B(Star), R(0),
+ /* 2722 S> */ B(LdaConstant), U8(225),
+ /* 2722 E> */ B(Star), R(0),
+ /* 2734 S> */ B(LdaConstant), U8(226),
+ /* 2734 E> */ B(Star), R(0),
+ /* 2746 S> */ B(LdaConstant), U8(227),
+ /* 2746 E> */ B(Star), R(0),
+ /* 2758 S> */ B(LdaConstant), U8(228),
+ /* 2758 E> */ B(Star), R(0),
+ /* 2770 S> */ B(LdaConstant), U8(229),
+ /* 2770 E> */ B(Star), R(0),
+ /* 2782 S> */ B(LdaConstant), U8(230),
+ /* 2782 E> */ B(Star), R(0),
+ /* 2794 S> */ B(LdaConstant), U8(231),
+ /* 2794 E> */ B(Star), R(0),
+ /* 2806 S> */ B(LdaConstant), U8(232),
+ /* 2806 E> */ B(Star), R(0),
+ /* 2818 S> */ B(LdaConstant), U8(233),
+ /* 2818 E> */ B(Star), R(0),
+ /* 2830 S> */ B(LdaConstant), U8(234),
+ /* 2830 E> */ B(Star), R(0),
+ /* 2842 S> */ B(LdaConstant), U8(235),
+ /* 2842 E> */ B(Star), R(0),
+ /* 2854 S> */ B(LdaConstant), U8(236),
+ /* 2854 E> */ B(Star), R(0),
+ /* 2866 S> */ B(LdaConstant), U8(237),
+ /* 2866 E> */ B(Star), R(0),
+ /* 2878 S> */ B(LdaConstant), U8(238),
+ /* 2878 E> */ B(Star), R(0),
+ /* 2890 S> */ B(LdaConstant), U8(239),
+ /* 2890 E> */ B(Star), R(0),
+ /* 2902 S> */ B(LdaConstant), U8(240),
+ /* 2902 E> */ B(Star), R(0),
+ /* 2914 S> */ B(LdaConstant), U8(241),
+ /* 2914 E> */ B(Star), R(0),
+ /* 2926 S> */ B(LdaConstant), U8(242),
+ /* 2926 E> */ B(Star), R(0),
+ /* 2938 S> */ B(LdaConstant), U8(243),
+ /* 2938 E> */ B(Star), R(0),
+ /* 2950 S> */ B(LdaConstant), U8(244),
+ /* 2950 E> */ B(Star), R(0),
+ /* 2962 S> */ B(LdaConstant), U8(245),
+ /* 2962 E> */ B(Star), R(0),
+ /* 2974 S> */ B(LdaConstant), U8(246),
+ /* 2974 E> */ B(Star), R(0),
+ /* 2986 S> */ B(LdaConstant), U8(247),
+ /* 2986 E> */ B(Star), R(0),
+ /* 2998 S> */ B(LdaConstant), U8(248),
+ /* 2998 E> */ B(Star), R(0),
+ /* 3010 S> */ B(LdaConstant), U8(249),
+ /* 3010 E> */ B(Star), R(0),
+ /* 3022 S> */ B(LdaConstant), U8(250),
+ /* 3022 E> */ B(Star), R(0),
+ /* 3034 S> */ B(LdaConstant), U8(251),
+ /* 3034 E> */ B(Star), R(0),
+ /* 3046 S> */ B(LdaConstant), U8(252),
+ /* 3046 E> */ B(Star), R(0),
+ /* 3058 S> */ B(LdaConstant), U8(253),
+ /* 3058 E> */ B(Star), R(0),
+ /* 3070 S> */ B(LdaConstant), U8(254),
+ /* 3070 E> */ B(Star), R(0),
+ /* 3082 S> */ B(LdaConstant), U8(255),
+ /* 3082 E> */ B(Star), R(0),
+ /* 3086 S> */ B(Wide), B(LdaLookupSlotInsideTypeof), U16(256),
+ B(TypeOf),
+ /* 3102 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
@@ -2384,523 +2384,523 @@
parameter count: 1
bytecode array length: 1033
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(LdaSmi), U8(10),
- B(Wide), B(StaLookupSlotSloppy), U16(256),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 22 S> */ B(LdaConstant), U8(0),
+ /* 22 E> */ B(Star), R(0),
+ /* 34 S> */ B(LdaConstant), U8(1),
+ /* 34 E> */ B(Star), R(0),
+ /* 46 S> */ B(LdaConstant), U8(2),
+ /* 46 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaConstant), U8(3),
+ /* 58 E> */ B(Star), R(0),
+ /* 70 S> */ B(LdaConstant), U8(4),
+ /* 70 E> */ B(Star), R(0),
+ /* 82 S> */ B(LdaConstant), U8(5),
+ /* 82 E> */ B(Star), R(0),
+ /* 94 S> */ B(LdaConstant), U8(6),
+ /* 94 E> */ B(Star), R(0),
+ /* 106 S> */ B(LdaConstant), U8(7),
+ /* 106 E> */ B(Star), R(0),
+ /* 118 S> */ B(LdaConstant), U8(8),
+ /* 118 E> */ B(Star), R(0),
+ /* 130 S> */ B(LdaConstant), U8(9),
+ /* 130 E> */ B(Star), R(0),
+ /* 142 S> */ B(LdaConstant), U8(10),
+ /* 142 E> */ B(Star), R(0),
+ /* 154 S> */ B(LdaConstant), U8(11),
+ /* 154 E> */ B(Star), R(0),
+ /* 166 S> */ B(LdaConstant), U8(12),
+ /* 166 E> */ B(Star), R(0),
+ /* 178 S> */ B(LdaConstant), U8(13),
+ /* 178 E> */ B(Star), R(0),
+ /* 190 S> */ B(LdaConstant), U8(14),
+ /* 190 E> */ B(Star), R(0),
+ /* 202 S> */ B(LdaConstant), U8(15),
+ /* 202 E> */ B(Star), R(0),
+ /* 214 S> */ B(LdaConstant), U8(16),
+ /* 214 E> */ B(Star), R(0),
+ /* 226 S> */ B(LdaConstant), U8(17),
+ /* 226 E> */ B(Star), R(0),
+ /* 238 S> */ B(LdaConstant), U8(18),
+ /* 238 E> */ B(Star), R(0),
+ /* 250 S> */ B(LdaConstant), U8(19),
+ /* 250 E> */ B(Star), R(0),
+ /* 262 S> */ B(LdaConstant), U8(20),
+ /* 262 E> */ B(Star), R(0),
+ /* 274 S> */ B(LdaConstant), U8(21),
+ /* 274 E> */ B(Star), R(0),
+ /* 286 S> */ B(LdaConstant), U8(22),
+ /* 286 E> */ B(Star), R(0),
+ /* 298 S> */ B(LdaConstant), U8(23),
+ /* 298 E> */ B(Star), R(0),
+ /* 310 S> */ B(LdaConstant), U8(24),
+ /* 310 E> */ B(Star), R(0),
+ /* 322 S> */ B(LdaConstant), U8(25),
+ /* 322 E> */ B(Star), R(0),
+ /* 334 S> */ B(LdaConstant), U8(26),
+ /* 334 E> */ B(Star), R(0),
+ /* 346 S> */ B(LdaConstant), U8(27),
+ /* 346 E> */ B(Star), R(0),
+ /* 358 S> */ B(LdaConstant), U8(28),
+ /* 358 E> */ B(Star), R(0),
+ /* 370 S> */ B(LdaConstant), U8(29),
+ /* 370 E> */ B(Star), R(0),
+ /* 382 S> */ B(LdaConstant), U8(30),
+ /* 382 E> */ B(Star), R(0),
+ /* 394 S> */ B(LdaConstant), U8(31),
+ /* 394 E> */ B(Star), R(0),
+ /* 406 S> */ B(LdaConstant), U8(32),
+ /* 406 E> */ B(Star), R(0),
+ /* 418 S> */ B(LdaConstant), U8(33),
+ /* 418 E> */ B(Star), R(0),
+ /* 430 S> */ B(LdaConstant), U8(34),
+ /* 430 E> */ B(Star), R(0),
+ /* 442 S> */ B(LdaConstant), U8(35),
+ /* 442 E> */ B(Star), R(0),
+ /* 454 S> */ B(LdaConstant), U8(36),
+ /* 454 E> */ B(Star), R(0),
+ /* 466 S> */ B(LdaConstant), U8(37),
+ /* 466 E> */ B(Star), R(0),
+ /* 478 S> */ B(LdaConstant), U8(38),
+ /* 478 E> */ B(Star), R(0),
+ /* 490 S> */ B(LdaConstant), U8(39),
+ /* 490 E> */ B(Star), R(0),
+ /* 502 S> */ B(LdaConstant), U8(40),
+ /* 502 E> */ B(Star), R(0),
+ /* 514 S> */ B(LdaConstant), U8(41),
+ /* 514 E> */ B(Star), R(0),
+ /* 526 S> */ B(LdaConstant), U8(42),
+ /* 526 E> */ B(Star), R(0),
+ /* 538 S> */ B(LdaConstant), U8(43),
+ /* 538 E> */ B(Star), R(0),
+ /* 550 S> */ B(LdaConstant), U8(44),
+ /* 550 E> */ B(Star), R(0),
+ /* 562 S> */ B(LdaConstant), U8(45),
+ /* 562 E> */ B(Star), R(0),
+ /* 574 S> */ B(LdaConstant), U8(46),
+ /* 574 E> */ B(Star), R(0),
+ /* 586 S> */ B(LdaConstant), U8(47),
+ /* 586 E> */ B(Star), R(0),
+ /* 598 S> */ B(LdaConstant), U8(48),
+ /* 598 E> */ B(Star), R(0),
+ /* 610 S> */ B(LdaConstant), U8(49),
+ /* 610 E> */ B(Star), R(0),
+ /* 622 S> */ B(LdaConstant), U8(50),
+ /* 622 E> */ B(Star), R(0),
+ /* 634 S> */ B(LdaConstant), U8(51),
+ /* 634 E> */ B(Star), R(0),
+ /* 646 S> */ B(LdaConstant), U8(52),
+ /* 646 E> */ B(Star), R(0),
+ /* 658 S> */ B(LdaConstant), U8(53),
+ /* 658 E> */ B(Star), R(0),
+ /* 670 S> */ B(LdaConstant), U8(54),
+ /* 670 E> */ B(Star), R(0),
+ /* 682 S> */ B(LdaConstant), U8(55),
+ /* 682 E> */ B(Star), R(0),
+ /* 694 S> */ B(LdaConstant), U8(56),
+ /* 694 E> */ B(Star), R(0),
+ /* 706 S> */ B(LdaConstant), U8(57),
+ /* 706 E> */ B(Star), R(0),
+ /* 718 S> */ B(LdaConstant), U8(58),
+ /* 718 E> */ B(Star), R(0),
+ /* 730 S> */ B(LdaConstant), U8(59),
+ /* 730 E> */ B(Star), R(0),
+ /* 742 S> */ B(LdaConstant), U8(60),
+ /* 742 E> */ B(Star), R(0),
+ /* 754 S> */ B(LdaConstant), U8(61),
+ /* 754 E> */ B(Star), R(0),
+ /* 766 S> */ B(LdaConstant), U8(62),
+ /* 766 E> */ B(Star), R(0),
+ /* 778 S> */ B(LdaConstant), U8(63),
+ /* 778 E> */ B(Star), R(0),
+ /* 790 S> */ B(LdaConstant), U8(64),
+ /* 790 E> */ B(Star), R(0),
+ /* 802 S> */ B(LdaConstant), U8(65),
+ /* 802 E> */ B(Star), R(0),
+ /* 814 S> */ B(LdaConstant), U8(66),
+ /* 814 E> */ B(Star), R(0),
+ /* 826 S> */ B(LdaConstant), U8(67),
+ /* 826 E> */ B(Star), R(0),
+ /* 838 S> */ B(LdaConstant), U8(68),
+ /* 838 E> */ B(Star), R(0),
+ /* 850 S> */ B(LdaConstant), U8(69),
+ /* 850 E> */ B(Star), R(0),
+ /* 862 S> */ B(LdaConstant), U8(70),
+ /* 862 E> */ B(Star), R(0),
+ /* 874 S> */ B(LdaConstant), U8(71),
+ /* 874 E> */ B(Star), R(0),
+ /* 886 S> */ B(LdaConstant), U8(72),
+ /* 886 E> */ B(Star), R(0),
+ /* 898 S> */ B(LdaConstant), U8(73),
+ /* 898 E> */ B(Star), R(0),
+ /* 910 S> */ B(LdaConstant), U8(74),
+ /* 910 E> */ B(Star), R(0),
+ /* 922 S> */ B(LdaConstant), U8(75),
+ /* 922 E> */ B(Star), R(0),
+ /* 934 S> */ B(LdaConstant), U8(76),
+ /* 934 E> */ B(Star), R(0),
+ /* 946 S> */ B(LdaConstant), U8(77),
+ /* 946 E> */ B(Star), R(0),
+ /* 958 S> */ B(LdaConstant), U8(78),
+ /* 958 E> */ B(Star), R(0),
+ /* 970 S> */ B(LdaConstant), U8(79),
+ /* 970 E> */ B(Star), R(0),
+ /* 982 S> */ B(LdaConstant), U8(80),
+ /* 982 E> */ B(Star), R(0),
+ /* 994 S> */ B(LdaConstant), U8(81),
+ /* 994 E> */ B(Star), R(0),
+ /* 1006 S> */ B(LdaConstant), U8(82),
+ /* 1006 E> */ B(Star), R(0),
+ /* 1018 S> */ B(LdaConstant), U8(83),
+ /* 1018 E> */ B(Star), R(0),
+ /* 1030 S> */ B(LdaConstant), U8(84),
+ /* 1030 E> */ B(Star), R(0),
+ /* 1042 S> */ B(LdaConstant), U8(85),
+ /* 1042 E> */ B(Star), R(0),
+ /* 1054 S> */ B(LdaConstant), U8(86),
+ /* 1054 E> */ B(Star), R(0),
+ /* 1066 S> */ B(LdaConstant), U8(87),
+ /* 1066 E> */ B(Star), R(0),
+ /* 1078 S> */ B(LdaConstant), U8(88),
+ /* 1078 E> */ B(Star), R(0),
+ /* 1090 S> */ B(LdaConstant), U8(89),
+ /* 1090 E> */ B(Star), R(0),
+ /* 1102 S> */ B(LdaConstant), U8(90),
+ /* 1102 E> */ B(Star), R(0),
+ /* 1114 S> */ B(LdaConstant), U8(91),
+ /* 1114 E> */ B(Star), R(0),
+ /* 1126 S> */ B(LdaConstant), U8(92),
+ /* 1126 E> */ B(Star), R(0),
+ /* 1138 S> */ B(LdaConstant), U8(93),
+ /* 1138 E> */ B(Star), R(0),
+ /* 1150 S> */ B(LdaConstant), U8(94),
+ /* 1150 E> */ B(Star), R(0),
+ /* 1162 S> */ B(LdaConstant), U8(95),
+ /* 1162 E> */ B(Star), R(0),
+ /* 1174 S> */ B(LdaConstant), U8(96),
+ /* 1174 E> */ B(Star), R(0),
+ /* 1186 S> */ B(LdaConstant), U8(97),
+ /* 1186 E> */ B(Star), R(0),
+ /* 1198 S> */ B(LdaConstant), U8(98),
+ /* 1198 E> */ B(Star), R(0),
+ /* 1210 S> */ B(LdaConstant), U8(99),
+ /* 1210 E> */ B(Star), R(0),
+ /* 1222 S> */ B(LdaConstant), U8(100),
+ /* 1222 E> */ B(Star), R(0),
+ /* 1234 S> */ B(LdaConstant), U8(101),
+ /* 1234 E> */ B(Star), R(0),
+ /* 1246 S> */ B(LdaConstant), U8(102),
+ /* 1246 E> */ B(Star), R(0),
+ /* 1258 S> */ B(LdaConstant), U8(103),
+ /* 1258 E> */ B(Star), R(0),
+ /* 1270 S> */ B(LdaConstant), U8(104),
+ /* 1270 E> */ B(Star), R(0),
+ /* 1282 S> */ B(LdaConstant), U8(105),
+ /* 1282 E> */ B(Star), R(0),
+ /* 1294 S> */ B(LdaConstant), U8(106),
+ /* 1294 E> */ B(Star), R(0),
+ /* 1306 S> */ B(LdaConstant), U8(107),
+ /* 1306 E> */ B(Star), R(0),
+ /* 1318 S> */ B(LdaConstant), U8(108),
+ /* 1318 E> */ B(Star), R(0),
+ /* 1330 S> */ B(LdaConstant), U8(109),
+ /* 1330 E> */ B(Star), R(0),
+ /* 1342 S> */ B(LdaConstant), U8(110),
+ /* 1342 E> */ B(Star), R(0),
+ /* 1354 S> */ B(LdaConstant), U8(111),
+ /* 1354 E> */ B(Star), R(0),
+ /* 1366 S> */ B(LdaConstant), U8(112),
+ /* 1366 E> */ B(Star), R(0),
+ /* 1378 S> */ B(LdaConstant), U8(113),
+ /* 1378 E> */ B(Star), R(0),
+ /* 1390 S> */ B(LdaConstant), U8(114),
+ /* 1390 E> */ B(Star), R(0),
+ /* 1402 S> */ B(LdaConstant), U8(115),
+ /* 1402 E> */ B(Star), R(0),
+ /* 1414 S> */ B(LdaConstant), U8(116),
+ /* 1414 E> */ B(Star), R(0),
+ /* 1426 S> */ B(LdaConstant), U8(117),
+ /* 1426 E> */ B(Star), R(0),
+ /* 1438 S> */ B(LdaConstant), U8(118),
+ /* 1438 E> */ B(Star), R(0),
+ /* 1450 S> */ B(LdaConstant), U8(119),
+ /* 1450 E> */ B(Star), R(0),
+ /* 1462 S> */ B(LdaConstant), U8(120),
+ /* 1462 E> */ B(Star), R(0),
+ /* 1474 S> */ B(LdaConstant), U8(121),
+ /* 1474 E> */ B(Star), R(0),
+ /* 1486 S> */ B(LdaConstant), U8(122),
+ /* 1486 E> */ B(Star), R(0),
+ /* 1498 S> */ B(LdaConstant), U8(123),
+ /* 1498 E> */ B(Star), R(0),
+ /* 1510 S> */ B(LdaConstant), U8(124),
+ /* 1510 E> */ B(Star), R(0),
+ /* 1522 S> */ B(LdaConstant), U8(125),
+ /* 1522 E> */ B(Star), R(0),
+ /* 1534 S> */ B(LdaConstant), U8(126),
+ /* 1534 E> */ B(Star), R(0),
+ /* 1546 S> */ B(LdaConstant), U8(127),
+ /* 1546 E> */ B(Star), R(0),
+ /* 1558 S> */ B(LdaConstant), U8(128),
+ /* 1558 E> */ B(Star), R(0),
+ /* 1570 S> */ B(LdaConstant), U8(129),
+ /* 1570 E> */ B(Star), R(0),
+ /* 1582 S> */ B(LdaConstant), U8(130),
+ /* 1582 E> */ B(Star), R(0),
+ /* 1594 S> */ B(LdaConstant), U8(131),
+ /* 1594 E> */ B(Star), R(0),
+ /* 1606 S> */ B(LdaConstant), U8(132),
+ /* 1606 E> */ B(Star), R(0),
+ /* 1618 S> */ B(LdaConstant), U8(133),
+ /* 1618 E> */ B(Star), R(0),
+ /* 1630 S> */ B(LdaConstant), U8(134),
+ /* 1630 E> */ B(Star), R(0),
+ /* 1642 S> */ B(LdaConstant), U8(135),
+ /* 1642 E> */ B(Star), R(0),
+ /* 1654 S> */ B(LdaConstant), U8(136),
+ /* 1654 E> */ B(Star), R(0),
+ /* 1666 S> */ B(LdaConstant), U8(137),
+ /* 1666 E> */ B(Star), R(0),
+ /* 1678 S> */ B(LdaConstant), U8(138),
+ /* 1678 E> */ B(Star), R(0),
+ /* 1690 S> */ B(LdaConstant), U8(139),
+ /* 1690 E> */ B(Star), R(0),
+ /* 1702 S> */ B(LdaConstant), U8(140),
+ /* 1702 E> */ B(Star), R(0),
+ /* 1714 S> */ B(LdaConstant), U8(141),
+ /* 1714 E> */ B(Star), R(0),
+ /* 1726 S> */ B(LdaConstant), U8(142),
+ /* 1726 E> */ B(Star), R(0),
+ /* 1738 S> */ B(LdaConstant), U8(143),
+ /* 1738 E> */ B(Star), R(0),
+ /* 1750 S> */ B(LdaConstant), U8(144),
+ /* 1750 E> */ B(Star), R(0),
+ /* 1762 S> */ B(LdaConstant), U8(145),
+ /* 1762 E> */ B(Star), R(0),
+ /* 1774 S> */ B(LdaConstant), U8(146),
+ /* 1774 E> */ B(Star), R(0),
+ /* 1786 S> */ B(LdaConstant), U8(147),
+ /* 1786 E> */ B(Star), R(0),
+ /* 1798 S> */ B(LdaConstant), U8(148),
+ /* 1798 E> */ B(Star), R(0),
+ /* 1810 S> */ B(LdaConstant), U8(149),
+ /* 1810 E> */ B(Star), R(0),
+ /* 1822 S> */ B(LdaConstant), U8(150),
+ /* 1822 E> */ B(Star), R(0),
+ /* 1834 S> */ B(LdaConstant), U8(151),
+ /* 1834 E> */ B(Star), R(0),
+ /* 1846 S> */ B(LdaConstant), U8(152),
+ /* 1846 E> */ B(Star), R(0),
+ /* 1858 S> */ B(LdaConstant), U8(153),
+ /* 1858 E> */ B(Star), R(0),
+ /* 1870 S> */ B(LdaConstant), U8(154),
+ /* 1870 E> */ B(Star), R(0),
+ /* 1882 S> */ B(LdaConstant), U8(155),
+ /* 1882 E> */ B(Star), R(0),
+ /* 1894 S> */ B(LdaConstant), U8(156),
+ /* 1894 E> */ B(Star), R(0),
+ /* 1906 S> */ B(LdaConstant), U8(157),
+ /* 1906 E> */ B(Star), R(0),
+ /* 1918 S> */ B(LdaConstant), U8(158),
+ /* 1918 E> */ B(Star), R(0),
+ /* 1930 S> */ B(LdaConstant), U8(159),
+ /* 1930 E> */ B(Star), R(0),
+ /* 1942 S> */ B(LdaConstant), U8(160),
+ /* 1942 E> */ B(Star), R(0),
+ /* 1954 S> */ B(LdaConstant), U8(161),
+ /* 1954 E> */ B(Star), R(0),
+ /* 1966 S> */ B(LdaConstant), U8(162),
+ /* 1966 E> */ B(Star), R(0),
+ /* 1978 S> */ B(LdaConstant), U8(163),
+ /* 1978 E> */ B(Star), R(0),
+ /* 1990 S> */ B(LdaConstant), U8(164),
+ /* 1990 E> */ B(Star), R(0),
+ /* 2002 S> */ B(LdaConstant), U8(165),
+ /* 2002 E> */ B(Star), R(0),
+ /* 2014 S> */ B(LdaConstant), U8(166),
+ /* 2014 E> */ B(Star), R(0),
+ /* 2026 S> */ B(LdaConstant), U8(167),
+ /* 2026 E> */ B(Star), R(0),
+ /* 2038 S> */ B(LdaConstant), U8(168),
+ /* 2038 E> */ B(Star), R(0),
+ /* 2050 S> */ B(LdaConstant), U8(169),
+ /* 2050 E> */ B(Star), R(0),
+ /* 2062 S> */ B(LdaConstant), U8(170),
+ /* 2062 E> */ B(Star), R(0),
+ /* 2074 S> */ B(LdaConstant), U8(171),
+ /* 2074 E> */ B(Star), R(0),
+ /* 2086 S> */ B(LdaConstant), U8(172),
+ /* 2086 E> */ B(Star), R(0),
+ /* 2098 S> */ B(LdaConstant), U8(173),
+ /* 2098 E> */ B(Star), R(0),
+ /* 2110 S> */ B(LdaConstant), U8(174),
+ /* 2110 E> */ B(Star), R(0),
+ /* 2122 S> */ B(LdaConstant), U8(175),
+ /* 2122 E> */ B(Star), R(0),
+ /* 2134 S> */ B(LdaConstant), U8(176),
+ /* 2134 E> */ B(Star), R(0),
+ /* 2146 S> */ B(LdaConstant), U8(177),
+ /* 2146 E> */ B(Star), R(0),
+ /* 2158 S> */ B(LdaConstant), U8(178),
+ /* 2158 E> */ B(Star), R(0),
+ /* 2170 S> */ B(LdaConstant), U8(179),
+ /* 2170 E> */ B(Star), R(0),
+ /* 2182 S> */ B(LdaConstant), U8(180),
+ /* 2182 E> */ B(Star), R(0),
+ /* 2194 S> */ B(LdaConstant), U8(181),
+ /* 2194 E> */ B(Star), R(0),
+ /* 2206 S> */ B(LdaConstant), U8(182),
+ /* 2206 E> */ B(Star), R(0),
+ /* 2218 S> */ B(LdaConstant), U8(183),
+ /* 2218 E> */ B(Star), R(0),
+ /* 2230 S> */ B(LdaConstant), U8(184),
+ /* 2230 E> */ B(Star), R(0),
+ /* 2242 S> */ B(LdaConstant), U8(185),
+ /* 2242 E> */ B(Star), R(0),
+ /* 2254 S> */ B(LdaConstant), U8(186),
+ /* 2254 E> */ B(Star), R(0),
+ /* 2266 S> */ B(LdaConstant), U8(187),
+ /* 2266 E> */ B(Star), R(0),
+ /* 2278 S> */ B(LdaConstant), U8(188),
+ /* 2278 E> */ B(Star), R(0),
+ /* 2290 S> */ B(LdaConstant), U8(189),
+ /* 2290 E> */ B(Star), R(0),
+ /* 2302 S> */ B(LdaConstant), U8(190),
+ /* 2302 E> */ B(Star), R(0),
+ /* 2314 S> */ B(LdaConstant), U8(191),
+ /* 2314 E> */ B(Star), R(0),
+ /* 2326 S> */ B(LdaConstant), U8(192),
+ /* 2326 E> */ B(Star), R(0),
+ /* 2338 S> */ B(LdaConstant), U8(193),
+ /* 2338 E> */ B(Star), R(0),
+ /* 2350 S> */ B(LdaConstant), U8(194),
+ /* 2350 E> */ B(Star), R(0),
+ /* 2362 S> */ B(LdaConstant), U8(195),
+ /* 2362 E> */ B(Star), R(0),
+ /* 2374 S> */ B(LdaConstant), U8(196),
+ /* 2374 E> */ B(Star), R(0),
+ /* 2386 S> */ B(LdaConstant), U8(197),
+ /* 2386 E> */ B(Star), R(0),
+ /* 2398 S> */ B(LdaConstant), U8(198),
+ /* 2398 E> */ B(Star), R(0),
+ /* 2410 S> */ B(LdaConstant), U8(199),
+ /* 2410 E> */ B(Star), R(0),
+ /* 2422 S> */ B(LdaConstant), U8(200),
+ /* 2422 E> */ B(Star), R(0),
+ /* 2434 S> */ B(LdaConstant), U8(201),
+ /* 2434 E> */ B(Star), R(0),
+ /* 2446 S> */ B(LdaConstant), U8(202),
+ /* 2446 E> */ B(Star), R(0),
+ /* 2458 S> */ B(LdaConstant), U8(203),
+ /* 2458 E> */ B(Star), R(0),
+ /* 2470 S> */ B(LdaConstant), U8(204),
+ /* 2470 E> */ B(Star), R(0),
+ /* 2482 S> */ B(LdaConstant), U8(205),
+ /* 2482 E> */ B(Star), R(0),
+ /* 2494 S> */ B(LdaConstant), U8(206),
+ /* 2494 E> */ B(Star), R(0),
+ /* 2506 S> */ B(LdaConstant), U8(207),
+ /* 2506 E> */ B(Star), R(0),
+ /* 2518 S> */ B(LdaConstant), U8(208),
+ /* 2518 E> */ B(Star), R(0),
+ /* 2530 S> */ B(LdaConstant), U8(209),
+ /* 2530 E> */ B(Star), R(0),
+ /* 2542 S> */ B(LdaConstant), U8(210),
+ /* 2542 E> */ B(Star), R(0),
+ /* 2554 S> */ B(LdaConstant), U8(211),
+ /* 2554 E> */ B(Star), R(0),
+ /* 2566 S> */ B(LdaConstant), U8(212),
+ /* 2566 E> */ B(Star), R(0),
+ /* 2578 S> */ B(LdaConstant), U8(213),
+ /* 2578 E> */ B(Star), R(0),
+ /* 2590 S> */ B(LdaConstant), U8(214),
+ /* 2590 E> */ B(Star), R(0),
+ /* 2602 S> */ B(LdaConstant), U8(215),
+ /* 2602 E> */ B(Star), R(0),
+ /* 2614 S> */ B(LdaConstant), U8(216),
+ /* 2614 E> */ B(Star), R(0),
+ /* 2626 S> */ B(LdaConstant), U8(217),
+ /* 2626 E> */ B(Star), R(0),
+ /* 2638 S> */ B(LdaConstant), U8(218),
+ /* 2638 E> */ B(Star), R(0),
+ /* 2650 S> */ B(LdaConstant), U8(219),
+ /* 2650 E> */ B(Star), R(0),
+ /* 2662 S> */ B(LdaConstant), U8(220),
+ /* 2662 E> */ B(Star), R(0),
+ /* 2674 S> */ B(LdaConstant), U8(221),
+ /* 2674 E> */ B(Star), R(0),
+ /* 2686 S> */ B(LdaConstant), U8(222),
+ /* 2686 E> */ B(Star), R(0),
+ /* 2698 S> */ B(LdaConstant), U8(223),
+ /* 2698 E> */ B(Star), R(0),
+ /* 2710 S> */ B(LdaConstant), U8(224),
+ /* 2710 E> */ B(Star), R(0),
+ /* 2722 S> */ B(LdaConstant), U8(225),
+ /* 2722 E> */ B(Star), R(0),
+ /* 2734 S> */ B(LdaConstant), U8(226),
+ /* 2734 E> */ B(Star), R(0),
+ /* 2746 S> */ B(LdaConstant), U8(227),
+ /* 2746 E> */ B(Star), R(0),
+ /* 2758 S> */ B(LdaConstant), U8(228),
+ /* 2758 E> */ B(Star), R(0),
+ /* 2770 S> */ B(LdaConstant), U8(229),
+ /* 2770 E> */ B(Star), R(0),
+ /* 2782 S> */ B(LdaConstant), U8(230),
+ /* 2782 E> */ B(Star), R(0),
+ /* 2794 S> */ B(LdaConstant), U8(231),
+ /* 2794 E> */ B(Star), R(0),
+ /* 2806 S> */ B(LdaConstant), U8(232),
+ /* 2806 E> */ B(Star), R(0),
+ /* 2818 S> */ B(LdaConstant), U8(233),
+ /* 2818 E> */ B(Star), R(0),
+ /* 2830 S> */ B(LdaConstant), U8(234),
+ /* 2830 E> */ B(Star), R(0),
+ /* 2842 S> */ B(LdaConstant), U8(235),
+ /* 2842 E> */ B(Star), R(0),
+ /* 2854 S> */ B(LdaConstant), U8(236),
+ /* 2854 E> */ B(Star), R(0),
+ /* 2866 S> */ B(LdaConstant), U8(237),
+ /* 2866 E> */ B(Star), R(0),
+ /* 2878 S> */ B(LdaConstant), U8(238),
+ /* 2878 E> */ B(Star), R(0),
+ /* 2890 S> */ B(LdaConstant), U8(239),
+ /* 2890 E> */ B(Star), R(0),
+ /* 2902 S> */ B(LdaConstant), U8(240),
+ /* 2902 E> */ B(Star), R(0),
+ /* 2914 S> */ B(LdaConstant), U8(241),
+ /* 2914 E> */ B(Star), R(0),
+ /* 2926 S> */ B(LdaConstant), U8(242),
+ /* 2926 E> */ B(Star), R(0),
+ /* 2938 S> */ B(LdaConstant), U8(243),
+ /* 2938 E> */ B(Star), R(0),
+ /* 2950 S> */ B(LdaConstant), U8(244),
+ /* 2950 E> */ B(Star), R(0),
+ /* 2962 S> */ B(LdaConstant), U8(245),
+ /* 2962 E> */ B(Star), R(0),
+ /* 2974 S> */ B(LdaConstant), U8(246),
+ /* 2974 E> */ B(Star), R(0),
+ /* 2986 S> */ B(LdaConstant), U8(247),
+ /* 2986 E> */ B(Star), R(0),
+ /* 2998 S> */ B(LdaConstant), U8(248),
+ /* 2998 E> */ B(Star), R(0),
+ /* 3010 S> */ B(LdaConstant), U8(249),
+ /* 3010 E> */ B(Star), R(0),
+ /* 3022 S> */ B(LdaConstant), U8(250),
+ /* 3022 E> */ B(Star), R(0),
+ /* 3034 S> */ B(LdaConstant), U8(251),
+ /* 3034 E> */ B(Star), R(0),
+ /* 3046 S> */ B(LdaConstant), U8(252),
+ /* 3046 E> */ B(Star), R(0),
+ /* 3058 S> */ B(LdaConstant), U8(253),
+ /* 3058 E> */ B(Star), R(0),
+ /* 3070 S> */ B(LdaConstant), U8(254),
+ /* 3070 E> */ B(Star), R(0),
+ /* 3082 S> */ B(LdaConstant), U8(255),
+ /* 3082 E> */ B(Star), R(0),
+ /* 3086 S> */ B(LdaSmi), U8(10),
+ /* 3088 E> */ B(Wide), B(StaLookupSlotSloppy), U16(256),
+ B(LdaUndefined),
+ /* 3093 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
@@ -3438,523 +3438,523 @@
parameter count: 1
bytecode array length: 1033
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(LdaSmi), U8(10),
- B(Wide), B(StaLookupSlotStrict), U16(256),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 35 S> */ B(LdaConstant), U8(0),
+ /* 35 E> */ B(Star), R(0),
+ /* 47 S> */ B(LdaConstant), U8(1),
+ /* 47 E> */ B(Star), R(0),
+ /* 59 S> */ B(LdaConstant), U8(2),
+ /* 59 E> */ B(Star), R(0),
+ /* 71 S> */ B(LdaConstant), U8(3),
+ /* 71 E> */ B(Star), R(0),
+ /* 83 S> */ B(LdaConstant), U8(4),
+ /* 83 E> */ B(Star), R(0),
+ /* 95 S> */ B(LdaConstant), U8(5),
+ /* 95 E> */ B(Star), R(0),
+ /* 107 S> */ B(LdaConstant), U8(6),
+ /* 107 E> */ B(Star), R(0),
+ /* 119 S> */ B(LdaConstant), U8(7),
+ /* 119 E> */ B(Star), R(0),
+ /* 131 S> */ B(LdaConstant), U8(8),
+ /* 131 E> */ B(Star), R(0),
+ /* 143 S> */ B(LdaConstant), U8(9),
+ /* 143 E> */ B(Star), R(0),
+ /* 155 S> */ B(LdaConstant), U8(10),
+ /* 155 E> */ B(Star), R(0),
+ /* 167 S> */ B(LdaConstant), U8(11),
+ /* 167 E> */ B(Star), R(0),
+ /* 179 S> */ B(LdaConstant), U8(12),
+ /* 179 E> */ B(Star), R(0),
+ /* 191 S> */ B(LdaConstant), U8(13),
+ /* 191 E> */ B(Star), R(0),
+ /* 203 S> */ B(LdaConstant), U8(14),
+ /* 203 E> */ B(Star), R(0),
+ /* 215 S> */ B(LdaConstant), U8(15),
+ /* 215 E> */ B(Star), R(0),
+ /* 227 S> */ B(LdaConstant), U8(16),
+ /* 227 E> */ B(Star), R(0),
+ /* 239 S> */ B(LdaConstant), U8(17),
+ /* 239 E> */ B(Star), R(0),
+ /* 251 S> */ B(LdaConstant), U8(18),
+ /* 251 E> */ B(Star), R(0),
+ /* 263 S> */ B(LdaConstant), U8(19),
+ /* 263 E> */ B(Star), R(0),
+ /* 275 S> */ B(LdaConstant), U8(20),
+ /* 275 E> */ B(Star), R(0),
+ /* 287 S> */ B(LdaConstant), U8(21),
+ /* 287 E> */ B(Star), R(0),
+ /* 299 S> */ B(LdaConstant), U8(22),
+ /* 299 E> */ B(Star), R(0),
+ /* 311 S> */ B(LdaConstant), U8(23),
+ /* 311 E> */ B(Star), R(0),
+ /* 323 S> */ B(LdaConstant), U8(24),
+ /* 323 E> */ B(Star), R(0),
+ /* 335 S> */ B(LdaConstant), U8(25),
+ /* 335 E> */ B(Star), R(0),
+ /* 347 S> */ B(LdaConstant), U8(26),
+ /* 347 E> */ B(Star), R(0),
+ /* 359 S> */ B(LdaConstant), U8(27),
+ /* 359 E> */ B(Star), R(0),
+ /* 371 S> */ B(LdaConstant), U8(28),
+ /* 371 E> */ B(Star), R(0),
+ /* 383 S> */ B(LdaConstant), U8(29),
+ /* 383 E> */ B(Star), R(0),
+ /* 395 S> */ B(LdaConstant), U8(30),
+ /* 395 E> */ B(Star), R(0),
+ /* 407 S> */ B(LdaConstant), U8(31),
+ /* 407 E> */ B(Star), R(0),
+ /* 419 S> */ B(LdaConstant), U8(32),
+ /* 419 E> */ B(Star), R(0),
+ /* 431 S> */ B(LdaConstant), U8(33),
+ /* 431 E> */ B(Star), R(0),
+ /* 443 S> */ B(LdaConstant), U8(34),
+ /* 443 E> */ B(Star), R(0),
+ /* 455 S> */ B(LdaConstant), U8(35),
+ /* 455 E> */ B(Star), R(0),
+ /* 467 S> */ B(LdaConstant), U8(36),
+ /* 467 E> */ B(Star), R(0),
+ /* 479 S> */ B(LdaConstant), U8(37),
+ /* 479 E> */ B(Star), R(0),
+ /* 491 S> */ B(LdaConstant), U8(38),
+ /* 491 E> */ B(Star), R(0),
+ /* 503 S> */ B(LdaConstant), U8(39),
+ /* 503 E> */ B(Star), R(0),
+ /* 515 S> */ B(LdaConstant), U8(40),
+ /* 515 E> */ B(Star), R(0),
+ /* 527 S> */ B(LdaConstant), U8(41),
+ /* 527 E> */ B(Star), R(0),
+ /* 539 S> */ B(LdaConstant), U8(42),
+ /* 539 E> */ B(Star), R(0),
+ /* 551 S> */ B(LdaConstant), U8(43),
+ /* 551 E> */ B(Star), R(0),
+ /* 563 S> */ B(LdaConstant), U8(44),
+ /* 563 E> */ B(Star), R(0),
+ /* 575 S> */ B(LdaConstant), U8(45),
+ /* 575 E> */ B(Star), R(0),
+ /* 587 S> */ B(LdaConstant), U8(46),
+ /* 587 E> */ B(Star), R(0),
+ /* 599 S> */ B(LdaConstant), U8(47),
+ /* 599 E> */ B(Star), R(0),
+ /* 611 S> */ B(LdaConstant), U8(48),
+ /* 611 E> */ B(Star), R(0),
+ /* 623 S> */ B(LdaConstant), U8(49),
+ /* 623 E> */ B(Star), R(0),
+ /* 635 S> */ B(LdaConstant), U8(50),
+ /* 635 E> */ B(Star), R(0),
+ /* 647 S> */ B(LdaConstant), U8(51),
+ /* 647 E> */ B(Star), R(0),
+ /* 659 S> */ B(LdaConstant), U8(52),
+ /* 659 E> */ B(Star), R(0),
+ /* 671 S> */ B(LdaConstant), U8(53),
+ /* 671 E> */ B(Star), R(0),
+ /* 683 S> */ B(LdaConstant), U8(54),
+ /* 683 E> */ B(Star), R(0),
+ /* 695 S> */ B(LdaConstant), U8(55),
+ /* 695 E> */ B(Star), R(0),
+ /* 707 S> */ B(LdaConstant), U8(56),
+ /* 707 E> */ B(Star), R(0),
+ /* 719 S> */ B(LdaConstant), U8(57),
+ /* 719 E> */ B(Star), R(0),
+ /* 731 S> */ B(LdaConstant), U8(58),
+ /* 731 E> */ B(Star), R(0),
+ /* 743 S> */ B(LdaConstant), U8(59),
+ /* 743 E> */ B(Star), R(0),
+ /* 755 S> */ B(LdaConstant), U8(60),
+ /* 755 E> */ B(Star), R(0),
+ /* 767 S> */ B(LdaConstant), U8(61),
+ /* 767 E> */ B(Star), R(0),
+ /* 779 S> */ B(LdaConstant), U8(62),
+ /* 779 E> */ B(Star), R(0),
+ /* 791 S> */ B(LdaConstant), U8(63),
+ /* 791 E> */ B(Star), R(0),
+ /* 803 S> */ B(LdaConstant), U8(64),
+ /* 803 E> */ B(Star), R(0),
+ /* 815 S> */ B(LdaConstant), U8(65),
+ /* 815 E> */ B(Star), R(0),
+ /* 827 S> */ B(LdaConstant), U8(66),
+ /* 827 E> */ B(Star), R(0),
+ /* 839 S> */ B(LdaConstant), U8(67),
+ /* 839 E> */ B(Star), R(0),
+ /* 851 S> */ B(LdaConstant), U8(68),
+ /* 851 E> */ B(Star), R(0),
+ /* 863 S> */ B(LdaConstant), U8(69),
+ /* 863 E> */ B(Star), R(0),
+ /* 875 S> */ B(LdaConstant), U8(70),
+ /* 875 E> */ B(Star), R(0),
+ /* 887 S> */ B(LdaConstant), U8(71),
+ /* 887 E> */ B(Star), R(0),
+ /* 899 S> */ B(LdaConstant), U8(72),
+ /* 899 E> */ B(Star), R(0),
+ /* 911 S> */ B(LdaConstant), U8(73),
+ /* 911 E> */ B(Star), R(0),
+ /* 923 S> */ B(LdaConstant), U8(74),
+ /* 923 E> */ B(Star), R(0),
+ /* 935 S> */ B(LdaConstant), U8(75),
+ /* 935 E> */ B(Star), R(0),
+ /* 947 S> */ B(LdaConstant), U8(76),
+ /* 947 E> */ B(Star), R(0),
+ /* 959 S> */ B(LdaConstant), U8(77),
+ /* 959 E> */ B(Star), R(0),
+ /* 971 S> */ B(LdaConstant), U8(78),
+ /* 971 E> */ B(Star), R(0),
+ /* 983 S> */ B(LdaConstant), U8(79),
+ /* 983 E> */ B(Star), R(0),
+ /* 995 S> */ B(LdaConstant), U8(80),
+ /* 995 E> */ B(Star), R(0),
+ /* 1007 S> */ B(LdaConstant), U8(81),
+ /* 1007 E> */ B(Star), R(0),
+ /* 1019 S> */ B(LdaConstant), U8(82),
+ /* 1019 E> */ B(Star), R(0),
+ /* 1031 S> */ B(LdaConstant), U8(83),
+ /* 1031 E> */ B(Star), R(0),
+ /* 1043 S> */ B(LdaConstant), U8(84),
+ /* 1043 E> */ B(Star), R(0),
+ /* 1055 S> */ B(LdaConstant), U8(85),
+ /* 1055 E> */ B(Star), R(0),
+ /* 1067 S> */ B(LdaConstant), U8(86),
+ /* 1067 E> */ B(Star), R(0),
+ /* 1079 S> */ B(LdaConstant), U8(87),
+ /* 1079 E> */ B(Star), R(0),
+ /* 1091 S> */ B(LdaConstant), U8(88),
+ /* 1091 E> */ B(Star), R(0),
+ /* 1103 S> */ B(LdaConstant), U8(89),
+ /* 1103 E> */ B(Star), R(0),
+ /* 1115 S> */ B(LdaConstant), U8(90),
+ /* 1115 E> */ B(Star), R(0),
+ /* 1127 S> */ B(LdaConstant), U8(91),
+ /* 1127 E> */ B(Star), R(0),
+ /* 1139 S> */ B(LdaConstant), U8(92),
+ /* 1139 E> */ B(Star), R(0),
+ /* 1151 S> */ B(LdaConstant), U8(93),
+ /* 1151 E> */ B(Star), R(0),
+ /* 1163 S> */ B(LdaConstant), U8(94),
+ /* 1163 E> */ B(Star), R(0),
+ /* 1175 S> */ B(LdaConstant), U8(95),
+ /* 1175 E> */ B(Star), R(0),
+ /* 1187 S> */ B(LdaConstant), U8(96),
+ /* 1187 E> */ B(Star), R(0),
+ /* 1199 S> */ B(LdaConstant), U8(97),
+ /* 1199 E> */ B(Star), R(0),
+ /* 1211 S> */ B(LdaConstant), U8(98),
+ /* 1211 E> */ B(Star), R(0),
+ /* 1223 S> */ B(LdaConstant), U8(99),
+ /* 1223 E> */ B(Star), R(0),
+ /* 1235 S> */ B(LdaConstant), U8(100),
+ /* 1235 E> */ B(Star), R(0),
+ /* 1247 S> */ B(LdaConstant), U8(101),
+ /* 1247 E> */ B(Star), R(0),
+ /* 1259 S> */ B(LdaConstant), U8(102),
+ /* 1259 E> */ B(Star), R(0),
+ /* 1271 S> */ B(LdaConstant), U8(103),
+ /* 1271 E> */ B(Star), R(0),
+ /* 1283 S> */ B(LdaConstant), U8(104),
+ /* 1283 E> */ B(Star), R(0),
+ /* 1295 S> */ B(LdaConstant), U8(105),
+ /* 1295 E> */ B(Star), R(0),
+ /* 1307 S> */ B(LdaConstant), U8(106),
+ /* 1307 E> */ B(Star), R(0),
+ /* 1319 S> */ B(LdaConstant), U8(107),
+ /* 1319 E> */ B(Star), R(0),
+ /* 1331 S> */ B(LdaConstant), U8(108),
+ /* 1331 E> */ B(Star), R(0),
+ /* 1343 S> */ B(LdaConstant), U8(109),
+ /* 1343 E> */ B(Star), R(0),
+ /* 1355 S> */ B(LdaConstant), U8(110),
+ /* 1355 E> */ B(Star), R(0),
+ /* 1367 S> */ B(LdaConstant), U8(111),
+ /* 1367 E> */ B(Star), R(0),
+ /* 1379 S> */ B(LdaConstant), U8(112),
+ /* 1379 E> */ B(Star), R(0),
+ /* 1391 S> */ B(LdaConstant), U8(113),
+ /* 1391 E> */ B(Star), R(0),
+ /* 1403 S> */ B(LdaConstant), U8(114),
+ /* 1403 E> */ B(Star), R(0),
+ /* 1415 S> */ B(LdaConstant), U8(115),
+ /* 1415 E> */ B(Star), R(0),
+ /* 1427 S> */ B(LdaConstant), U8(116),
+ /* 1427 E> */ B(Star), R(0),
+ /* 1439 S> */ B(LdaConstant), U8(117),
+ /* 1439 E> */ B(Star), R(0),
+ /* 1451 S> */ B(LdaConstant), U8(118),
+ /* 1451 E> */ B(Star), R(0),
+ /* 1463 S> */ B(LdaConstant), U8(119),
+ /* 1463 E> */ B(Star), R(0),
+ /* 1475 S> */ B(LdaConstant), U8(120),
+ /* 1475 E> */ B(Star), R(0),
+ /* 1487 S> */ B(LdaConstant), U8(121),
+ /* 1487 E> */ B(Star), R(0),
+ /* 1499 S> */ B(LdaConstant), U8(122),
+ /* 1499 E> */ B(Star), R(0),
+ /* 1511 S> */ B(LdaConstant), U8(123),
+ /* 1511 E> */ B(Star), R(0),
+ /* 1523 S> */ B(LdaConstant), U8(124),
+ /* 1523 E> */ B(Star), R(0),
+ /* 1535 S> */ B(LdaConstant), U8(125),
+ /* 1535 E> */ B(Star), R(0),
+ /* 1547 S> */ B(LdaConstant), U8(126),
+ /* 1547 E> */ B(Star), R(0),
+ /* 1559 S> */ B(LdaConstant), U8(127),
+ /* 1559 E> */ B(Star), R(0),
+ /* 1571 S> */ B(LdaConstant), U8(128),
+ /* 1571 E> */ B(Star), R(0),
+ /* 1583 S> */ B(LdaConstant), U8(129),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1595 S> */ B(LdaConstant), U8(130),
+ /* 1595 E> */ B(Star), R(0),
+ /* 1607 S> */ B(LdaConstant), U8(131),
+ /* 1607 E> */ B(Star), R(0),
+ /* 1619 S> */ B(LdaConstant), U8(132),
+ /* 1619 E> */ B(Star), R(0),
+ /* 1631 S> */ B(LdaConstant), U8(133),
+ /* 1631 E> */ B(Star), R(0),
+ /* 1643 S> */ B(LdaConstant), U8(134),
+ /* 1643 E> */ B(Star), R(0),
+ /* 1655 S> */ B(LdaConstant), U8(135),
+ /* 1655 E> */ B(Star), R(0),
+ /* 1667 S> */ B(LdaConstant), U8(136),
+ /* 1667 E> */ B(Star), R(0),
+ /* 1679 S> */ B(LdaConstant), U8(137),
+ /* 1679 E> */ B(Star), R(0),
+ /* 1691 S> */ B(LdaConstant), U8(138),
+ /* 1691 E> */ B(Star), R(0),
+ /* 1703 S> */ B(LdaConstant), U8(139),
+ /* 1703 E> */ B(Star), R(0),
+ /* 1715 S> */ B(LdaConstant), U8(140),
+ /* 1715 E> */ B(Star), R(0),
+ /* 1727 S> */ B(LdaConstant), U8(141),
+ /* 1727 E> */ B(Star), R(0),
+ /* 1739 S> */ B(LdaConstant), U8(142),
+ /* 1739 E> */ B(Star), R(0),
+ /* 1751 S> */ B(LdaConstant), U8(143),
+ /* 1751 E> */ B(Star), R(0),
+ /* 1763 S> */ B(LdaConstant), U8(144),
+ /* 1763 E> */ B(Star), R(0),
+ /* 1775 S> */ B(LdaConstant), U8(145),
+ /* 1775 E> */ B(Star), R(0),
+ /* 1787 S> */ B(LdaConstant), U8(146),
+ /* 1787 E> */ B(Star), R(0),
+ /* 1799 S> */ B(LdaConstant), U8(147),
+ /* 1799 E> */ B(Star), R(0),
+ /* 1811 S> */ B(LdaConstant), U8(148),
+ /* 1811 E> */ B(Star), R(0),
+ /* 1823 S> */ B(LdaConstant), U8(149),
+ /* 1823 E> */ B(Star), R(0),
+ /* 1835 S> */ B(LdaConstant), U8(150),
+ /* 1835 E> */ B(Star), R(0),
+ /* 1847 S> */ B(LdaConstant), U8(151),
+ /* 1847 E> */ B(Star), R(0),
+ /* 1859 S> */ B(LdaConstant), U8(152),
+ /* 1859 E> */ B(Star), R(0),
+ /* 1871 S> */ B(LdaConstant), U8(153),
+ /* 1871 E> */ B(Star), R(0),
+ /* 1883 S> */ B(LdaConstant), U8(154),
+ /* 1883 E> */ B(Star), R(0),
+ /* 1895 S> */ B(LdaConstant), U8(155),
+ /* 1895 E> */ B(Star), R(0),
+ /* 1907 S> */ B(LdaConstant), U8(156),
+ /* 1907 E> */ B(Star), R(0),
+ /* 1919 S> */ B(LdaConstant), U8(157),
+ /* 1919 E> */ B(Star), R(0),
+ /* 1931 S> */ B(LdaConstant), U8(158),
+ /* 1931 E> */ B(Star), R(0),
+ /* 1943 S> */ B(LdaConstant), U8(159),
+ /* 1943 E> */ B(Star), R(0),
+ /* 1955 S> */ B(LdaConstant), U8(160),
+ /* 1955 E> */ B(Star), R(0),
+ /* 1967 S> */ B(LdaConstant), U8(161),
+ /* 1967 E> */ B(Star), R(0),
+ /* 1979 S> */ B(LdaConstant), U8(162),
+ /* 1979 E> */ B(Star), R(0),
+ /* 1991 S> */ B(LdaConstant), U8(163),
+ /* 1991 E> */ B(Star), R(0),
+ /* 2003 S> */ B(LdaConstant), U8(164),
+ /* 2003 E> */ B(Star), R(0),
+ /* 2015 S> */ B(LdaConstant), U8(165),
+ /* 2015 E> */ B(Star), R(0),
+ /* 2027 S> */ B(LdaConstant), U8(166),
+ /* 2027 E> */ B(Star), R(0),
+ /* 2039 S> */ B(LdaConstant), U8(167),
+ /* 2039 E> */ B(Star), R(0),
+ /* 2051 S> */ B(LdaConstant), U8(168),
+ /* 2051 E> */ B(Star), R(0),
+ /* 2063 S> */ B(LdaConstant), U8(169),
+ /* 2063 E> */ B(Star), R(0),
+ /* 2075 S> */ B(LdaConstant), U8(170),
+ /* 2075 E> */ B(Star), R(0),
+ /* 2087 S> */ B(LdaConstant), U8(171),
+ /* 2087 E> */ B(Star), R(0),
+ /* 2099 S> */ B(LdaConstant), U8(172),
+ /* 2099 E> */ B(Star), R(0),
+ /* 2111 S> */ B(LdaConstant), U8(173),
+ /* 2111 E> */ B(Star), R(0),
+ /* 2123 S> */ B(LdaConstant), U8(174),
+ /* 2123 E> */ B(Star), R(0),
+ /* 2135 S> */ B(LdaConstant), U8(175),
+ /* 2135 E> */ B(Star), R(0),
+ /* 2147 S> */ B(LdaConstant), U8(176),
+ /* 2147 E> */ B(Star), R(0),
+ /* 2159 S> */ B(LdaConstant), U8(177),
+ /* 2159 E> */ B(Star), R(0),
+ /* 2171 S> */ B(LdaConstant), U8(178),
+ /* 2171 E> */ B(Star), R(0),
+ /* 2183 S> */ B(LdaConstant), U8(179),
+ /* 2183 E> */ B(Star), R(0),
+ /* 2195 S> */ B(LdaConstant), U8(180),
+ /* 2195 E> */ B(Star), R(0),
+ /* 2207 S> */ B(LdaConstant), U8(181),
+ /* 2207 E> */ B(Star), R(0),
+ /* 2219 S> */ B(LdaConstant), U8(182),
+ /* 2219 E> */ B(Star), R(0),
+ /* 2231 S> */ B(LdaConstant), U8(183),
+ /* 2231 E> */ B(Star), R(0),
+ /* 2243 S> */ B(LdaConstant), U8(184),
+ /* 2243 E> */ B(Star), R(0),
+ /* 2255 S> */ B(LdaConstant), U8(185),
+ /* 2255 E> */ B(Star), R(0),
+ /* 2267 S> */ B(LdaConstant), U8(186),
+ /* 2267 E> */ B(Star), R(0),
+ /* 2279 S> */ B(LdaConstant), U8(187),
+ /* 2279 E> */ B(Star), R(0),
+ /* 2291 S> */ B(LdaConstant), U8(188),
+ /* 2291 E> */ B(Star), R(0),
+ /* 2303 S> */ B(LdaConstant), U8(189),
+ /* 2303 E> */ B(Star), R(0),
+ /* 2315 S> */ B(LdaConstant), U8(190),
+ /* 2315 E> */ B(Star), R(0),
+ /* 2327 S> */ B(LdaConstant), U8(191),
+ /* 2327 E> */ B(Star), R(0),
+ /* 2339 S> */ B(LdaConstant), U8(192),
+ /* 2339 E> */ B(Star), R(0),
+ /* 2351 S> */ B(LdaConstant), U8(193),
+ /* 2351 E> */ B(Star), R(0),
+ /* 2363 S> */ B(LdaConstant), U8(194),
+ /* 2363 E> */ B(Star), R(0),
+ /* 2375 S> */ B(LdaConstant), U8(195),
+ /* 2375 E> */ B(Star), R(0),
+ /* 2387 S> */ B(LdaConstant), U8(196),
+ /* 2387 E> */ B(Star), R(0),
+ /* 2399 S> */ B(LdaConstant), U8(197),
+ /* 2399 E> */ B(Star), R(0),
+ /* 2411 S> */ B(LdaConstant), U8(198),
+ /* 2411 E> */ B(Star), R(0),
+ /* 2423 S> */ B(LdaConstant), U8(199),
+ /* 2423 E> */ B(Star), R(0),
+ /* 2435 S> */ B(LdaConstant), U8(200),
+ /* 2435 E> */ B(Star), R(0),
+ /* 2447 S> */ B(LdaConstant), U8(201),
+ /* 2447 E> */ B(Star), R(0),
+ /* 2459 S> */ B(LdaConstant), U8(202),
+ /* 2459 E> */ B(Star), R(0),
+ /* 2471 S> */ B(LdaConstant), U8(203),
+ /* 2471 E> */ B(Star), R(0),
+ /* 2483 S> */ B(LdaConstant), U8(204),
+ /* 2483 E> */ B(Star), R(0),
+ /* 2495 S> */ B(LdaConstant), U8(205),
+ /* 2495 E> */ B(Star), R(0),
+ /* 2507 S> */ B(LdaConstant), U8(206),
+ /* 2507 E> */ B(Star), R(0),
+ /* 2519 S> */ B(LdaConstant), U8(207),
+ /* 2519 E> */ B(Star), R(0),
+ /* 2531 S> */ B(LdaConstant), U8(208),
+ /* 2531 E> */ B(Star), R(0),
+ /* 2543 S> */ B(LdaConstant), U8(209),
+ /* 2543 E> */ B(Star), R(0),
+ /* 2555 S> */ B(LdaConstant), U8(210),
+ /* 2555 E> */ B(Star), R(0),
+ /* 2567 S> */ B(LdaConstant), U8(211),
+ /* 2567 E> */ B(Star), R(0),
+ /* 2579 S> */ B(LdaConstant), U8(212),
+ /* 2579 E> */ B(Star), R(0),
+ /* 2591 S> */ B(LdaConstant), U8(213),
+ /* 2591 E> */ B(Star), R(0),
+ /* 2603 S> */ B(LdaConstant), U8(214),
+ /* 2603 E> */ B(Star), R(0),
+ /* 2615 S> */ B(LdaConstant), U8(215),
+ /* 2615 E> */ B(Star), R(0),
+ /* 2627 S> */ B(LdaConstant), U8(216),
+ /* 2627 E> */ B(Star), R(0),
+ /* 2639 S> */ B(LdaConstant), U8(217),
+ /* 2639 E> */ B(Star), R(0),
+ /* 2651 S> */ B(LdaConstant), U8(218),
+ /* 2651 E> */ B(Star), R(0),
+ /* 2663 S> */ B(LdaConstant), U8(219),
+ /* 2663 E> */ B(Star), R(0),
+ /* 2675 S> */ B(LdaConstant), U8(220),
+ /* 2675 E> */ B(Star), R(0),
+ /* 2687 S> */ B(LdaConstant), U8(221),
+ /* 2687 E> */ B(Star), R(0),
+ /* 2699 S> */ B(LdaConstant), U8(222),
+ /* 2699 E> */ B(Star), R(0),
+ /* 2711 S> */ B(LdaConstant), U8(223),
+ /* 2711 E> */ B(Star), R(0),
+ /* 2723 S> */ B(LdaConstant), U8(224),
+ /* 2723 E> */ B(Star), R(0),
+ /* 2735 S> */ B(LdaConstant), U8(225),
+ /* 2735 E> */ B(Star), R(0),
+ /* 2747 S> */ B(LdaConstant), U8(226),
+ /* 2747 E> */ B(Star), R(0),
+ /* 2759 S> */ B(LdaConstant), U8(227),
+ /* 2759 E> */ B(Star), R(0),
+ /* 2771 S> */ B(LdaConstant), U8(228),
+ /* 2771 E> */ B(Star), R(0),
+ /* 2783 S> */ B(LdaConstant), U8(229),
+ /* 2783 E> */ B(Star), R(0),
+ /* 2795 S> */ B(LdaConstant), U8(230),
+ /* 2795 E> */ B(Star), R(0),
+ /* 2807 S> */ B(LdaConstant), U8(231),
+ /* 2807 E> */ B(Star), R(0),
+ /* 2819 S> */ B(LdaConstant), U8(232),
+ /* 2819 E> */ B(Star), R(0),
+ /* 2831 S> */ B(LdaConstant), U8(233),
+ /* 2831 E> */ B(Star), R(0),
+ /* 2843 S> */ B(LdaConstant), U8(234),
+ /* 2843 E> */ B(Star), R(0),
+ /* 2855 S> */ B(LdaConstant), U8(235),
+ /* 2855 E> */ B(Star), R(0),
+ /* 2867 S> */ B(LdaConstant), U8(236),
+ /* 2867 E> */ B(Star), R(0),
+ /* 2879 S> */ B(LdaConstant), U8(237),
+ /* 2879 E> */ B(Star), R(0),
+ /* 2891 S> */ B(LdaConstant), U8(238),
+ /* 2891 E> */ B(Star), R(0),
+ /* 2903 S> */ B(LdaConstant), U8(239),
+ /* 2903 E> */ B(Star), R(0),
+ /* 2915 S> */ B(LdaConstant), U8(240),
+ /* 2915 E> */ B(Star), R(0),
+ /* 2927 S> */ B(LdaConstant), U8(241),
+ /* 2927 E> */ B(Star), R(0),
+ /* 2939 S> */ B(LdaConstant), U8(242),
+ /* 2939 E> */ B(Star), R(0),
+ /* 2951 S> */ B(LdaConstant), U8(243),
+ /* 2951 E> */ B(Star), R(0),
+ /* 2963 S> */ B(LdaConstant), U8(244),
+ /* 2963 E> */ B(Star), R(0),
+ /* 2975 S> */ B(LdaConstant), U8(245),
+ /* 2975 E> */ B(Star), R(0),
+ /* 2987 S> */ B(LdaConstant), U8(246),
+ /* 2987 E> */ B(Star), R(0),
+ /* 2999 S> */ B(LdaConstant), U8(247),
+ /* 2999 E> */ B(Star), R(0),
+ /* 3011 S> */ B(LdaConstant), U8(248),
+ /* 3011 E> */ B(Star), R(0),
+ /* 3023 S> */ B(LdaConstant), U8(249),
+ /* 3023 E> */ B(Star), R(0),
+ /* 3035 S> */ B(LdaConstant), U8(250),
+ /* 3035 E> */ B(Star), R(0),
+ /* 3047 S> */ B(LdaConstant), U8(251),
+ /* 3047 E> */ B(Star), R(0),
+ /* 3059 S> */ B(LdaConstant), U8(252),
+ /* 3059 E> */ B(Star), R(0),
+ /* 3071 S> */ B(LdaConstant), U8(253),
+ /* 3071 E> */ B(Star), R(0),
+ /* 3083 S> */ B(LdaConstant), U8(254),
+ /* 3083 E> */ B(Star), R(0),
+ /* 3095 S> */ B(LdaConstant), U8(255),
+ /* 3095 E> */ B(Star), R(0),
+ /* 3099 S> */ B(LdaSmi), U8(10),
+ /* 3101 E> */ B(Wide), B(StaLookupSlotStrict), U16(256),
+ B(LdaUndefined),
+ /* 3106 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/NewTarget.golden b/test/cctest/interpreter/bytecode_expectations/NewTarget.golden
index da2d35e..08d2a13 100644
--- a/test/cctest/interpreter/bytecode_expectations/NewTarget.golden
+++ b/test/cctest/interpreter/bytecode_expectations/NewTarget.golden
@@ -15,15 +15,15 @@
parameter count: 1
bytecode array length: 19
bytecodes: [
- B(Ldar), R(new_target),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
- B(Return),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
+ /* 53 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -39,16 +39,16 @@
parameter count: 1
bytecode array length: 20
bytecodes: [
- B(Ldar), R(new_target),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(1), U8(1),
+ B(LdaUndefined),
+ /* 46 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden b/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
index 063ebbf..831218d 100644
--- a/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
@@ -15,10 +15,10 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(7),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(35),
+ B(Star), R(0),
+ /* 46 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -34,10 +34,10 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ /* 71 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -53,15 +53,15 @@
parameter count: 1
bytecode array length: 20
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Ldar), R(0),
- B(StoreICSloppy), R(1), U8(1), U8(1),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 75 E> */ B(Ldar), R(0),
+ B(StoreICSloppy), R(1), U8(1), U8(1),
+ B(Ldar), R(1),
+ /* 80 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -78,18 +78,18 @@
parameter count: 1
bytecode array length: 26
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(Add), R(2),
- B(StoreICSloppy), R(1), U8(1), U8(1),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ /* 59 E> */ B(Ldar), R(0),
+ /* 67 E> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(Add), R(2),
+ B(StoreICSloppy), R(1), U8(1), U8(1),
+ B(Ldar), R(1),
+ /* 76 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -106,13 +106,13 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(CreateClosure), U8(1), U8(0),
- B(StoreICSloppy), R(0), U8(2), U8(1),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ B(CreateClosure), U8(1), U8(0),
+ B(StoreICSloppy), R(0), U8(2), U8(1),
+ B(Ldar), R(0),
+ /* 67 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -130,13 +130,13 @@
parameter count: 1
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(CreateClosure), U8(1), U8(0),
- B(StoreICSloppy), R(0), U8(2), U8(1),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ B(CreateClosure), U8(1), U8(0),
+ B(StoreICSloppy), R(0), U8(2), U8(1),
+ B(Ldar), R(0),
+ /* 68 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -154,21 +154,21 @@
parameter count: 1
bytecode array length: 33
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(Mov), R(0), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(2),
- B(CreateClosure), U8(2), U8(0),
- B(Star), R(3),
- B(LdaNull),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ B(Mov), R(0), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(2),
+ B(CreateClosure), U8(2), U8(0),
+ B(Star), R(3),
+ B(LdaNull),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
+ B(Ldar), R(0),
+ /* 68 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -186,21 +186,21 @@
parameter count: 1
bytecode array length: 35
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(Mov), R(0), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(2),
- B(CreateClosure), U8(2), U8(0),
- B(Star), R(3),
- B(CreateClosure), U8(3), U8(0),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ B(Mov), R(0), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(2),
+ B(CreateClosure), U8(2), U8(0),
+ B(Star), R(3),
+ B(CreateClosure), U8(3), U8(0),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
+ B(Ldar), R(0),
+ /* 102 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -219,21 +219,21 @@
parameter count: 1
bytecode array length: 33
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(0),
- B(Mov), R(0), R(1),
- B(LdaConstant), U8(1),
- B(Star), R(2),
- B(LdaNull),
- B(Star), R(3),
- B(CreateClosure), U8(2), U8(0),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(0),
+ B(Mov), R(0), R(1),
+ B(LdaConstant), U8(1),
+ B(Star), R(2),
+ B(LdaNull),
+ B(Star), R(3),
+ B(CreateClosure), U8(2), U8(0),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
+ B(Ldar), R(0),
+ /* 74 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -251,21 +251,21 @@
parameter count: 1
bytecode array length: 33
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(Mov), R(1), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(3),
- B(Ldar), R(0),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kSetProperty), R(2), U8(4),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ B(Mov), R(1), R(2),
+ B(LdaSmi), U8(1),
+ B(Star), R(3),
+ /* 57 E> */ B(Ldar), R(0),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kSetProperty), R(2), U8(4),
+ B(Ldar), R(1),
+ /* 62 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -281,15 +281,15 @@
parameter count: 1
bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(7),
- B(Star), R(0),
- B(Mov), R(0), R(1),
- B(LdaNull),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(35),
+ B(Star), R(0),
+ B(Mov), R(0), R(1),
+ B(LdaNull),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2),
+ B(Ldar), R(0),
+ /* 62 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
@@ -305,24 +305,24 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(0), U8(7),
- B(Star), R(1),
- B(Mov), R(1), R(2),
- B(Ldar), R(0),
- B(ToName),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(LdaZero),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35),
+ B(Star), R(1),
+ B(Mov), R(1), R(2),
+ /* 60 E> */ B(Ldar), R(0),
+ B(ToName),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(LdaZero),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
+ B(Ldar), R(1),
+ /* 69 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -339,26 +339,26 @@
parameter count: 1
bytecode array length: 43
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(0), U8(5),
- B(Star), R(1),
- B(Ldar), R(0),
- B(StoreICSloppy), R(1), U8(2), U8(1),
- B(Mov), R(1), R(2),
- B(Ldar), R(0),
- B(ToName),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(LdaZero),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
+ B(Star), R(1),
+ /* 64 E> */ B(Ldar), R(0),
+ B(StoreICSloppy), R(1), U8(2), U8(1),
+ B(Mov), R(1), R(2),
+ /* 68 E> */ B(Ldar), R(0),
+ B(ToName),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(LdaZero),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
+ B(Ldar), R(1),
+ /* 77 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -376,29 +376,29 @@
parameter count: 1
bytecode array length: 53
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(1), U8(7),
- B(Star), R(1),
- B(Mov), R(1), R(2),
- B(Ldar), R(0),
- B(ToName),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(LdaZero),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
- B(Mov), R(1), R(2),
- B(CreateObjectLiteral), U8(1), U8(0), U8(7),
- B(Star), R(4),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(2), U8(2),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(1), U8(35),
+ B(Star), R(1),
+ B(Mov), R(1), R(2),
+ /* 60 E> */ B(Ldar), R(0),
+ B(ToName),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(LdaZero),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
+ B(Mov), R(1), R(2),
+ B(CreateObjectLiteral), U8(1), U8(0), U8(35),
+ B(Star), R(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(2), U8(2),
+ B(Ldar), R(1),
+ /* 84 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
@@ -415,40 +415,40 @@
parameter count: 1
bytecode array length: 77
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(CreateObjectLiteral), U8(1), U8(0), U8(7),
- B(Star), R(1),
- B(Mov), R(1), R(2),
- B(Ldar), R(0),
- B(ToName),
- B(Star), R(3),
- B(LdaConstant), U8(2),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(LdaZero),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
- B(Mov), R(1), R(2),
- B(LdaConstant), U8(3),
- B(Star), R(3),
- B(CreateClosure), U8(4), U8(0),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
- B(Mov), R(1), R(2),
- B(LdaConstant), U8(3),
- B(Star), R(3),
- B(CreateClosure), U8(5), U8(0),
- B(Star), R(4),
- B(LdaZero),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kDefineSetterPropertyUnchecked), R(2), U8(4),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35),
+ B(Star), R(1),
+ B(Mov), R(1), R(2),
+ /* 60 E> */ B(Ldar), R(0),
+ B(ToName),
+ B(Star), R(3),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(LdaZero),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
+ B(Mov), R(1), R(2),
+ B(LdaConstant), U8(3),
+ B(Star), R(3),
+ B(CreateClosure), U8(4), U8(0),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
+ B(Mov), R(1), R(2),
+ B(LdaConstant), U8(3),
+ B(Star), R(3),
+ B(CreateClosure), U8(5), U8(0),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kDefineSetterPropertyUnchecked), R(2), U8(4),
+ B(Ldar), R(1),
+ /* 99 S> */ B(Return),
]
constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden b/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
index 83c6fe9..9f92943 100644
--- a/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
@@ -272,522 +272,522 @@
parameter count: 1
bytecode array length: 1035
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(CreateObjectLiteral), U16(256), U16(0), U8(5),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(LdaConstant), U8(0),
+ /* 43 E> */ B(Star), R(0),
+ /* 51 S> */ B(LdaConstant), U8(1),
+ /* 53 E> */ B(Star), R(0),
+ /* 61 S> */ B(LdaConstant), U8(2),
+ /* 63 E> */ B(Star), R(0),
+ /* 71 S> */ B(LdaConstant), U8(3),
+ /* 73 E> */ B(Star), R(0),
+ /* 81 S> */ B(LdaConstant), U8(4),
+ /* 83 E> */ B(Star), R(0),
+ /* 91 S> */ B(LdaConstant), U8(5),
+ /* 93 E> */ B(Star), R(0),
+ /* 101 S> */ B(LdaConstant), U8(6),
+ /* 103 E> */ B(Star), R(0),
+ /* 111 S> */ B(LdaConstant), U8(7),
+ /* 113 E> */ B(Star), R(0),
+ /* 121 S> */ B(LdaConstant), U8(8),
+ /* 123 E> */ B(Star), R(0),
+ /* 131 S> */ B(LdaConstant), U8(9),
+ /* 133 E> */ B(Star), R(0),
+ /* 141 S> */ B(LdaConstant), U8(10),
+ /* 143 E> */ B(Star), R(0),
+ /* 151 S> */ B(LdaConstant), U8(11),
+ /* 153 E> */ B(Star), R(0),
+ /* 161 S> */ B(LdaConstant), U8(12),
+ /* 163 E> */ B(Star), R(0),
+ /* 171 S> */ B(LdaConstant), U8(13),
+ /* 173 E> */ B(Star), R(0),
+ /* 181 S> */ B(LdaConstant), U8(14),
+ /* 183 E> */ B(Star), R(0),
+ /* 191 S> */ B(LdaConstant), U8(15),
+ /* 193 E> */ B(Star), R(0),
+ /* 201 S> */ B(LdaConstant), U8(16),
+ /* 203 E> */ B(Star), R(0),
+ /* 211 S> */ B(LdaConstant), U8(17),
+ /* 213 E> */ B(Star), R(0),
+ /* 221 S> */ B(LdaConstant), U8(18),
+ /* 223 E> */ B(Star), R(0),
+ /* 231 S> */ B(LdaConstant), U8(19),
+ /* 233 E> */ B(Star), R(0),
+ /* 241 S> */ B(LdaConstant), U8(20),
+ /* 243 E> */ B(Star), R(0),
+ /* 251 S> */ B(LdaConstant), U8(21),
+ /* 253 E> */ B(Star), R(0),
+ /* 261 S> */ B(LdaConstant), U8(22),
+ /* 263 E> */ B(Star), R(0),
+ /* 271 S> */ B(LdaConstant), U8(23),
+ /* 273 E> */ B(Star), R(0),
+ /* 281 S> */ B(LdaConstant), U8(24),
+ /* 283 E> */ B(Star), R(0),
+ /* 291 S> */ B(LdaConstant), U8(25),
+ /* 293 E> */ B(Star), R(0),
+ /* 301 S> */ B(LdaConstant), U8(26),
+ /* 303 E> */ B(Star), R(0),
+ /* 311 S> */ B(LdaConstant), U8(27),
+ /* 313 E> */ B(Star), R(0),
+ /* 321 S> */ B(LdaConstant), U8(28),
+ /* 323 E> */ B(Star), R(0),
+ /* 331 S> */ B(LdaConstant), U8(29),
+ /* 333 E> */ B(Star), R(0),
+ /* 341 S> */ B(LdaConstant), U8(30),
+ /* 343 E> */ B(Star), R(0),
+ /* 351 S> */ B(LdaConstant), U8(31),
+ /* 353 E> */ B(Star), R(0),
+ /* 361 S> */ B(LdaConstant), U8(32),
+ /* 363 E> */ B(Star), R(0),
+ /* 371 S> */ B(LdaConstant), U8(33),
+ /* 373 E> */ B(Star), R(0),
+ /* 381 S> */ B(LdaConstant), U8(34),
+ /* 383 E> */ B(Star), R(0),
+ /* 391 S> */ B(LdaConstant), U8(35),
+ /* 393 E> */ B(Star), R(0),
+ /* 401 S> */ B(LdaConstant), U8(36),
+ /* 403 E> */ B(Star), R(0),
+ /* 411 S> */ B(LdaConstant), U8(37),
+ /* 413 E> */ B(Star), R(0),
+ /* 421 S> */ B(LdaConstant), U8(38),
+ /* 423 E> */ B(Star), R(0),
+ /* 431 S> */ B(LdaConstant), U8(39),
+ /* 433 E> */ B(Star), R(0),
+ /* 441 S> */ B(LdaConstant), U8(40),
+ /* 443 E> */ B(Star), R(0),
+ /* 451 S> */ B(LdaConstant), U8(41),
+ /* 453 E> */ B(Star), R(0),
+ /* 461 S> */ B(LdaConstant), U8(42),
+ /* 463 E> */ B(Star), R(0),
+ /* 471 S> */ B(LdaConstant), U8(43),
+ /* 473 E> */ B(Star), R(0),
+ /* 481 S> */ B(LdaConstant), U8(44),
+ /* 483 E> */ B(Star), R(0),
+ /* 491 S> */ B(LdaConstant), U8(45),
+ /* 493 E> */ B(Star), R(0),
+ /* 501 S> */ B(LdaConstant), U8(46),
+ /* 503 E> */ B(Star), R(0),
+ /* 511 S> */ B(LdaConstant), U8(47),
+ /* 513 E> */ B(Star), R(0),
+ /* 521 S> */ B(LdaConstant), U8(48),
+ /* 523 E> */ B(Star), R(0),
+ /* 531 S> */ B(LdaConstant), U8(49),
+ /* 533 E> */ B(Star), R(0),
+ /* 541 S> */ B(LdaConstant), U8(50),
+ /* 543 E> */ B(Star), R(0),
+ /* 551 S> */ B(LdaConstant), U8(51),
+ /* 553 E> */ B(Star), R(0),
+ /* 561 S> */ B(LdaConstant), U8(52),
+ /* 563 E> */ B(Star), R(0),
+ /* 571 S> */ B(LdaConstant), U8(53),
+ /* 573 E> */ B(Star), R(0),
+ /* 581 S> */ B(LdaConstant), U8(54),
+ /* 583 E> */ B(Star), R(0),
+ /* 591 S> */ B(LdaConstant), U8(55),
+ /* 593 E> */ B(Star), R(0),
+ /* 601 S> */ B(LdaConstant), U8(56),
+ /* 603 E> */ B(Star), R(0),
+ /* 611 S> */ B(LdaConstant), U8(57),
+ /* 613 E> */ B(Star), R(0),
+ /* 621 S> */ B(LdaConstant), U8(58),
+ /* 623 E> */ B(Star), R(0),
+ /* 631 S> */ B(LdaConstant), U8(59),
+ /* 633 E> */ B(Star), R(0),
+ /* 641 S> */ B(LdaConstant), U8(60),
+ /* 643 E> */ B(Star), R(0),
+ /* 651 S> */ B(LdaConstant), U8(61),
+ /* 653 E> */ B(Star), R(0),
+ /* 661 S> */ B(LdaConstant), U8(62),
+ /* 663 E> */ B(Star), R(0),
+ /* 671 S> */ B(LdaConstant), U8(63),
+ /* 673 E> */ B(Star), R(0),
+ /* 681 S> */ B(LdaConstant), U8(64),
+ /* 683 E> */ B(Star), R(0),
+ /* 691 S> */ B(LdaConstant), U8(65),
+ /* 693 E> */ B(Star), R(0),
+ /* 701 S> */ B(LdaConstant), U8(66),
+ /* 703 E> */ B(Star), R(0),
+ /* 711 S> */ B(LdaConstant), U8(67),
+ /* 713 E> */ B(Star), R(0),
+ /* 721 S> */ B(LdaConstant), U8(68),
+ /* 723 E> */ B(Star), R(0),
+ /* 731 S> */ B(LdaConstant), U8(69),
+ /* 733 E> */ B(Star), R(0),
+ /* 741 S> */ B(LdaConstant), U8(70),
+ /* 743 E> */ B(Star), R(0),
+ /* 751 S> */ B(LdaConstant), U8(71),
+ /* 753 E> */ B(Star), R(0),
+ /* 761 S> */ B(LdaConstant), U8(72),
+ /* 763 E> */ B(Star), R(0),
+ /* 771 S> */ B(LdaConstant), U8(73),
+ /* 773 E> */ B(Star), R(0),
+ /* 781 S> */ B(LdaConstant), U8(74),
+ /* 783 E> */ B(Star), R(0),
+ /* 791 S> */ B(LdaConstant), U8(75),
+ /* 793 E> */ B(Star), R(0),
+ /* 801 S> */ B(LdaConstant), U8(76),
+ /* 803 E> */ B(Star), R(0),
+ /* 811 S> */ B(LdaConstant), U8(77),
+ /* 813 E> */ B(Star), R(0),
+ /* 821 S> */ B(LdaConstant), U8(78),
+ /* 823 E> */ B(Star), R(0),
+ /* 831 S> */ B(LdaConstant), U8(79),
+ /* 833 E> */ B(Star), R(0),
+ /* 841 S> */ B(LdaConstant), U8(80),
+ /* 843 E> */ B(Star), R(0),
+ /* 851 S> */ B(LdaConstant), U8(81),
+ /* 853 E> */ B(Star), R(0),
+ /* 861 S> */ B(LdaConstant), U8(82),
+ /* 863 E> */ B(Star), R(0),
+ /* 871 S> */ B(LdaConstant), U8(83),
+ /* 873 E> */ B(Star), R(0),
+ /* 881 S> */ B(LdaConstant), U8(84),
+ /* 883 E> */ B(Star), R(0),
+ /* 891 S> */ B(LdaConstant), U8(85),
+ /* 893 E> */ B(Star), R(0),
+ /* 901 S> */ B(LdaConstant), U8(86),
+ /* 903 E> */ B(Star), R(0),
+ /* 911 S> */ B(LdaConstant), U8(87),
+ /* 913 E> */ B(Star), R(0),
+ /* 921 S> */ B(LdaConstant), U8(88),
+ /* 923 E> */ B(Star), R(0),
+ /* 931 S> */ B(LdaConstant), U8(89),
+ /* 933 E> */ B(Star), R(0),
+ /* 941 S> */ B(LdaConstant), U8(90),
+ /* 943 E> */ B(Star), R(0),
+ /* 951 S> */ B(LdaConstant), U8(91),
+ /* 953 E> */ B(Star), R(0),
+ /* 961 S> */ B(LdaConstant), U8(92),
+ /* 963 E> */ B(Star), R(0),
+ /* 971 S> */ B(LdaConstant), U8(93),
+ /* 973 E> */ B(Star), R(0),
+ /* 981 S> */ B(LdaConstant), U8(94),
+ /* 983 E> */ B(Star), R(0),
+ /* 991 S> */ B(LdaConstant), U8(95),
+ /* 993 E> */ B(Star), R(0),
+ /* 1001 S> */ B(LdaConstant), U8(96),
+ /* 1003 E> */ B(Star), R(0),
+ /* 1011 S> */ B(LdaConstant), U8(97),
+ /* 1013 E> */ B(Star), R(0),
+ /* 1021 S> */ B(LdaConstant), U8(98),
+ /* 1023 E> */ B(Star), R(0),
+ /* 1031 S> */ B(LdaConstant), U8(99),
+ /* 1033 E> */ B(Star), R(0),
+ /* 1041 S> */ B(LdaConstant), U8(100),
+ /* 1043 E> */ B(Star), R(0),
+ /* 1051 S> */ B(LdaConstant), U8(101),
+ /* 1053 E> */ B(Star), R(0),
+ /* 1061 S> */ B(LdaConstant), U8(102),
+ /* 1063 E> */ B(Star), R(0),
+ /* 1071 S> */ B(LdaConstant), U8(103),
+ /* 1073 E> */ B(Star), R(0),
+ /* 1081 S> */ B(LdaConstant), U8(104),
+ /* 1083 E> */ B(Star), R(0),
+ /* 1091 S> */ B(LdaConstant), U8(105),
+ /* 1093 E> */ B(Star), R(0),
+ /* 1101 S> */ B(LdaConstant), U8(106),
+ /* 1103 E> */ B(Star), R(0),
+ /* 1111 S> */ B(LdaConstant), U8(107),
+ /* 1113 E> */ B(Star), R(0),
+ /* 1121 S> */ B(LdaConstant), U8(108),
+ /* 1123 E> */ B(Star), R(0),
+ /* 1131 S> */ B(LdaConstant), U8(109),
+ /* 1133 E> */ B(Star), R(0),
+ /* 1141 S> */ B(LdaConstant), U8(110),
+ /* 1143 E> */ B(Star), R(0),
+ /* 1151 S> */ B(LdaConstant), U8(111),
+ /* 1153 E> */ B(Star), R(0),
+ /* 1161 S> */ B(LdaConstant), U8(112),
+ /* 1163 E> */ B(Star), R(0),
+ /* 1171 S> */ B(LdaConstant), U8(113),
+ /* 1173 E> */ B(Star), R(0),
+ /* 1181 S> */ B(LdaConstant), U8(114),
+ /* 1183 E> */ B(Star), R(0),
+ /* 1191 S> */ B(LdaConstant), U8(115),
+ /* 1193 E> */ B(Star), R(0),
+ /* 1201 S> */ B(LdaConstant), U8(116),
+ /* 1203 E> */ B(Star), R(0),
+ /* 1211 S> */ B(LdaConstant), U8(117),
+ /* 1213 E> */ B(Star), R(0),
+ /* 1221 S> */ B(LdaConstant), U8(118),
+ /* 1223 E> */ B(Star), R(0),
+ /* 1231 S> */ B(LdaConstant), U8(119),
+ /* 1233 E> */ B(Star), R(0),
+ /* 1241 S> */ B(LdaConstant), U8(120),
+ /* 1243 E> */ B(Star), R(0),
+ /* 1251 S> */ B(LdaConstant), U8(121),
+ /* 1253 E> */ B(Star), R(0),
+ /* 1261 S> */ B(LdaConstant), U8(122),
+ /* 1263 E> */ B(Star), R(0),
+ /* 1271 S> */ B(LdaConstant), U8(123),
+ /* 1273 E> */ B(Star), R(0),
+ /* 1281 S> */ B(LdaConstant), U8(124),
+ /* 1283 E> */ B(Star), R(0),
+ /* 1291 S> */ B(LdaConstant), U8(125),
+ /* 1293 E> */ B(Star), R(0),
+ /* 1301 S> */ B(LdaConstant), U8(126),
+ /* 1303 E> */ B(Star), R(0),
+ /* 1311 S> */ B(LdaConstant), U8(127),
+ /* 1313 E> */ B(Star), R(0),
+ /* 1321 S> */ B(LdaConstant), U8(128),
+ /* 1323 E> */ B(Star), R(0),
+ /* 1331 S> */ B(LdaConstant), U8(129),
+ /* 1333 E> */ B(Star), R(0),
+ /* 1341 S> */ B(LdaConstant), U8(130),
+ /* 1343 E> */ B(Star), R(0),
+ /* 1351 S> */ B(LdaConstant), U8(131),
+ /* 1353 E> */ B(Star), R(0),
+ /* 1361 S> */ B(LdaConstant), U8(132),
+ /* 1363 E> */ B(Star), R(0),
+ /* 1371 S> */ B(LdaConstant), U8(133),
+ /* 1373 E> */ B(Star), R(0),
+ /* 1381 S> */ B(LdaConstant), U8(134),
+ /* 1383 E> */ B(Star), R(0),
+ /* 1391 S> */ B(LdaConstant), U8(135),
+ /* 1393 E> */ B(Star), R(0),
+ /* 1401 S> */ B(LdaConstant), U8(136),
+ /* 1403 E> */ B(Star), R(0),
+ /* 1411 S> */ B(LdaConstant), U8(137),
+ /* 1413 E> */ B(Star), R(0),
+ /* 1421 S> */ B(LdaConstant), U8(138),
+ /* 1423 E> */ B(Star), R(0),
+ /* 1431 S> */ B(LdaConstant), U8(139),
+ /* 1433 E> */ B(Star), R(0),
+ /* 1441 S> */ B(LdaConstant), U8(140),
+ /* 1443 E> */ B(Star), R(0),
+ /* 1451 S> */ B(LdaConstant), U8(141),
+ /* 1453 E> */ B(Star), R(0),
+ /* 1461 S> */ B(LdaConstant), U8(142),
+ /* 1463 E> */ B(Star), R(0),
+ /* 1471 S> */ B(LdaConstant), U8(143),
+ /* 1473 E> */ B(Star), R(0),
+ /* 1481 S> */ B(LdaConstant), U8(144),
+ /* 1483 E> */ B(Star), R(0),
+ /* 1491 S> */ B(LdaConstant), U8(145),
+ /* 1493 E> */ B(Star), R(0),
+ /* 1501 S> */ B(LdaConstant), U8(146),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1511 S> */ B(LdaConstant), U8(147),
+ /* 1513 E> */ B(Star), R(0),
+ /* 1521 S> */ B(LdaConstant), U8(148),
+ /* 1523 E> */ B(Star), R(0),
+ /* 1531 S> */ B(LdaConstant), U8(149),
+ /* 1533 E> */ B(Star), R(0),
+ /* 1541 S> */ B(LdaConstant), U8(150),
+ /* 1543 E> */ B(Star), R(0),
+ /* 1551 S> */ B(LdaConstant), U8(151),
+ /* 1553 E> */ B(Star), R(0),
+ /* 1561 S> */ B(LdaConstant), U8(152),
+ /* 1563 E> */ B(Star), R(0),
+ /* 1571 S> */ B(LdaConstant), U8(153),
+ /* 1573 E> */ B(Star), R(0),
+ /* 1581 S> */ B(LdaConstant), U8(154),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1591 S> */ B(LdaConstant), U8(155),
+ /* 1593 E> */ B(Star), R(0),
+ /* 1601 S> */ B(LdaConstant), U8(156),
+ /* 1603 E> */ B(Star), R(0),
+ /* 1611 S> */ B(LdaConstant), U8(157),
+ /* 1613 E> */ B(Star), R(0),
+ /* 1621 S> */ B(LdaConstant), U8(158),
+ /* 1623 E> */ B(Star), R(0),
+ /* 1631 S> */ B(LdaConstant), U8(159),
+ /* 1633 E> */ B(Star), R(0),
+ /* 1641 S> */ B(LdaConstant), U8(160),
+ /* 1643 E> */ B(Star), R(0),
+ /* 1651 S> */ B(LdaConstant), U8(161),
+ /* 1653 E> */ B(Star), R(0),
+ /* 1661 S> */ B(LdaConstant), U8(162),
+ /* 1663 E> */ B(Star), R(0),
+ /* 1671 S> */ B(LdaConstant), U8(163),
+ /* 1673 E> */ B(Star), R(0),
+ /* 1681 S> */ B(LdaConstant), U8(164),
+ /* 1683 E> */ B(Star), R(0),
+ /* 1691 S> */ B(LdaConstant), U8(165),
+ /* 1693 E> */ B(Star), R(0),
+ /* 1701 S> */ B(LdaConstant), U8(166),
+ /* 1703 E> */ B(Star), R(0),
+ /* 1711 S> */ B(LdaConstant), U8(167),
+ /* 1713 E> */ B(Star), R(0),
+ /* 1721 S> */ B(LdaConstant), U8(168),
+ /* 1723 E> */ B(Star), R(0),
+ /* 1731 S> */ B(LdaConstant), U8(169),
+ /* 1733 E> */ B(Star), R(0),
+ /* 1741 S> */ B(LdaConstant), U8(170),
+ /* 1743 E> */ B(Star), R(0),
+ /* 1751 S> */ B(LdaConstant), U8(171),
+ /* 1753 E> */ B(Star), R(0),
+ /* 1761 S> */ B(LdaConstant), U8(172),
+ /* 1763 E> */ B(Star), R(0),
+ /* 1771 S> */ B(LdaConstant), U8(173),
+ /* 1773 E> */ B(Star), R(0),
+ /* 1781 S> */ B(LdaConstant), U8(174),
+ /* 1783 E> */ B(Star), R(0),
+ /* 1791 S> */ B(LdaConstant), U8(175),
+ /* 1793 E> */ B(Star), R(0),
+ /* 1801 S> */ B(LdaConstant), U8(176),
+ /* 1803 E> */ B(Star), R(0),
+ /* 1811 S> */ B(LdaConstant), U8(177),
+ /* 1813 E> */ B(Star), R(0),
+ /* 1821 S> */ B(LdaConstant), U8(178),
+ /* 1823 E> */ B(Star), R(0),
+ /* 1831 S> */ B(LdaConstant), U8(179),
+ /* 1833 E> */ B(Star), R(0),
+ /* 1841 S> */ B(LdaConstant), U8(180),
+ /* 1843 E> */ B(Star), R(0),
+ /* 1851 S> */ B(LdaConstant), U8(181),
+ /* 1853 E> */ B(Star), R(0),
+ /* 1861 S> */ B(LdaConstant), U8(182),
+ /* 1863 E> */ B(Star), R(0),
+ /* 1871 S> */ B(LdaConstant), U8(183),
+ /* 1873 E> */ B(Star), R(0),
+ /* 1881 S> */ B(LdaConstant), U8(184),
+ /* 1883 E> */ B(Star), R(0),
+ /* 1891 S> */ B(LdaConstant), U8(185),
+ /* 1893 E> */ B(Star), R(0),
+ /* 1901 S> */ B(LdaConstant), U8(186),
+ /* 1903 E> */ B(Star), R(0),
+ /* 1911 S> */ B(LdaConstant), U8(187),
+ /* 1913 E> */ B(Star), R(0),
+ /* 1921 S> */ B(LdaConstant), U8(188),
+ /* 1923 E> */ B(Star), R(0),
+ /* 1931 S> */ B(LdaConstant), U8(189),
+ /* 1933 E> */ B(Star), R(0),
+ /* 1941 S> */ B(LdaConstant), U8(190),
+ /* 1943 E> */ B(Star), R(0),
+ /* 1951 S> */ B(LdaConstant), U8(191),
+ /* 1953 E> */ B(Star), R(0),
+ /* 1961 S> */ B(LdaConstant), U8(192),
+ /* 1963 E> */ B(Star), R(0),
+ /* 1971 S> */ B(LdaConstant), U8(193),
+ /* 1973 E> */ B(Star), R(0),
+ /* 1981 S> */ B(LdaConstant), U8(194),
+ /* 1983 E> */ B(Star), R(0),
+ /* 1991 S> */ B(LdaConstant), U8(195),
+ /* 1993 E> */ B(Star), R(0),
+ /* 2001 S> */ B(LdaConstant), U8(196),
+ /* 2003 E> */ B(Star), R(0),
+ /* 2011 S> */ B(LdaConstant), U8(197),
+ /* 2013 E> */ B(Star), R(0),
+ /* 2021 S> */ B(LdaConstant), U8(198),
+ /* 2023 E> */ B(Star), R(0),
+ /* 2031 S> */ B(LdaConstant), U8(199),
+ /* 2033 E> */ B(Star), R(0),
+ /* 2041 S> */ B(LdaConstant), U8(200),
+ /* 2043 E> */ B(Star), R(0),
+ /* 2051 S> */ B(LdaConstant), U8(201),
+ /* 2053 E> */ B(Star), R(0),
+ /* 2061 S> */ B(LdaConstant), U8(202),
+ /* 2063 E> */ B(Star), R(0),
+ /* 2071 S> */ B(LdaConstant), U8(203),
+ /* 2073 E> */ B(Star), R(0),
+ /* 2081 S> */ B(LdaConstant), U8(204),
+ /* 2083 E> */ B(Star), R(0),
+ /* 2091 S> */ B(LdaConstant), U8(205),
+ /* 2093 E> */ B(Star), R(0),
+ /* 2101 S> */ B(LdaConstant), U8(206),
+ /* 2103 E> */ B(Star), R(0),
+ /* 2111 S> */ B(LdaConstant), U8(207),
+ /* 2113 E> */ B(Star), R(0),
+ /* 2121 S> */ B(LdaConstant), U8(208),
+ /* 2123 E> */ B(Star), R(0),
+ /* 2131 S> */ B(LdaConstant), U8(209),
+ /* 2133 E> */ B(Star), R(0),
+ /* 2141 S> */ B(LdaConstant), U8(210),
+ /* 2143 E> */ B(Star), R(0),
+ /* 2151 S> */ B(LdaConstant), U8(211),
+ /* 2153 E> */ B(Star), R(0),
+ /* 2161 S> */ B(LdaConstant), U8(212),
+ /* 2163 E> */ B(Star), R(0),
+ /* 2171 S> */ B(LdaConstant), U8(213),
+ /* 2173 E> */ B(Star), R(0),
+ /* 2181 S> */ B(LdaConstant), U8(214),
+ /* 2183 E> */ B(Star), R(0),
+ /* 2191 S> */ B(LdaConstant), U8(215),
+ /* 2193 E> */ B(Star), R(0),
+ /* 2201 S> */ B(LdaConstant), U8(216),
+ /* 2203 E> */ B(Star), R(0),
+ /* 2211 S> */ B(LdaConstant), U8(217),
+ /* 2213 E> */ B(Star), R(0),
+ /* 2221 S> */ B(LdaConstant), U8(218),
+ /* 2223 E> */ B(Star), R(0),
+ /* 2231 S> */ B(LdaConstant), U8(219),
+ /* 2233 E> */ B(Star), R(0),
+ /* 2241 S> */ B(LdaConstant), U8(220),
+ /* 2243 E> */ B(Star), R(0),
+ /* 2251 S> */ B(LdaConstant), U8(221),
+ /* 2253 E> */ B(Star), R(0),
+ /* 2261 S> */ B(LdaConstant), U8(222),
+ /* 2263 E> */ B(Star), R(0),
+ /* 2271 S> */ B(LdaConstant), U8(223),
+ /* 2273 E> */ B(Star), R(0),
+ /* 2281 S> */ B(LdaConstant), U8(224),
+ /* 2283 E> */ B(Star), R(0),
+ /* 2291 S> */ B(LdaConstant), U8(225),
+ /* 2293 E> */ B(Star), R(0),
+ /* 2301 S> */ B(LdaConstant), U8(226),
+ /* 2303 E> */ B(Star), R(0),
+ /* 2311 S> */ B(LdaConstant), U8(227),
+ /* 2313 E> */ B(Star), R(0),
+ /* 2321 S> */ B(LdaConstant), U8(228),
+ /* 2323 E> */ B(Star), R(0),
+ /* 2331 S> */ B(LdaConstant), U8(229),
+ /* 2333 E> */ B(Star), R(0),
+ /* 2341 S> */ B(LdaConstant), U8(230),
+ /* 2343 E> */ B(Star), R(0),
+ /* 2351 S> */ B(LdaConstant), U8(231),
+ /* 2353 E> */ B(Star), R(0),
+ /* 2361 S> */ B(LdaConstant), U8(232),
+ /* 2363 E> */ B(Star), R(0),
+ /* 2371 S> */ B(LdaConstant), U8(233),
+ /* 2373 E> */ B(Star), R(0),
+ /* 2381 S> */ B(LdaConstant), U8(234),
+ /* 2383 E> */ B(Star), R(0),
+ /* 2391 S> */ B(LdaConstant), U8(235),
+ /* 2393 E> */ B(Star), R(0),
+ /* 2401 S> */ B(LdaConstant), U8(236),
+ /* 2403 E> */ B(Star), R(0),
+ /* 2411 S> */ B(LdaConstant), U8(237),
+ /* 2413 E> */ B(Star), R(0),
+ /* 2421 S> */ B(LdaConstant), U8(238),
+ /* 2423 E> */ B(Star), R(0),
+ /* 2431 S> */ B(LdaConstant), U8(239),
+ /* 2433 E> */ B(Star), R(0),
+ /* 2441 S> */ B(LdaConstant), U8(240),
+ /* 2443 E> */ B(Star), R(0),
+ /* 2451 S> */ B(LdaConstant), U8(241),
+ /* 2453 E> */ B(Star), R(0),
+ /* 2461 S> */ B(LdaConstant), U8(242),
+ /* 2463 E> */ B(Star), R(0),
+ /* 2471 S> */ B(LdaConstant), U8(243),
+ /* 2473 E> */ B(Star), R(0),
+ /* 2481 S> */ B(LdaConstant), U8(244),
+ /* 2483 E> */ B(Star), R(0),
+ /* 2491 S> */ B(LdaConstant), U8(245),
+ /* 2493 E> */ B(Star), R(0),
+ /* 2501 S> */ B(LdaConstant), U8(246),
+ /* 2503 E> */ B(Star), R(0),
+ /* 2511 S> */ B(LdaConstant), U8(247),
+ /* 2513 E> */ B(Star), R(0),
+ /* 2521 S> */ B(LdaConstant), U8(248),
+ /* 2523 E> */ B(Star), R(0),
+ /* 2531 S> */ B(LdaConstant), U8(249),
+ /* 2533 E> */ B(Star), R(0),
+ /* 2541 S> */ B(LdaConstant), U8(250),
+ /* 2543 E> */ B(Star), R(0),
+ /* 2551 S> */ B(LdaConstant), U8(251),
+ /* 2553 E> */ B(Star), R(0),
+ /* 2561 S> */ B(LdaConstant), U8(252),
+ /* 2563 E> */ B(Star), R(0),
+ /* 2571 S> */ B(LdaConstant), U8(253),
+ /* 2573 E> */ B(Star), R(0),
+ /* 2581 S> */ B(LdaConstant), U8(254),
+ /* 2583 E> */ B(Star), R(0),
+ /* 2591 S> */ B(LdaConstant), U8(255),
+ /* 2593 E> */ B(Star), R(0),
+ /* 2601 S> */ B(Wide), B(CreateObjectLiteral), U16(256), U16(0), U8(1),
+ B(Star), R(1),
+ /* 2638 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden b/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
index 378a5b7..af6e942 100644
--- a/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
+++ b/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
@@ -24,16 +24,16 @@
parameter count: 1
bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(Ldar), R(context),
- B(Star), R(0),
- B(LdaContextSlot), R(0), U8(1),
- B(Star), R(0),
- B(LdaContextSlot), R(0), U8(4),
- B(Star), R(1),
- B(LdaContextSlot), R(context), U8(4),
- B(Mul), R(1),
- B(Return),
+ /* 97 E> */ B(StackCheck),
+ /* 102 S> */ B(Ldar), R(context),
+ B(Star), R(0),
+ B(LdaContextSlot), R(0), U8(1),
+ B(Star), R(0),
+ B(LdaContextSlot), R(0), U8(4),
+ B(Star), R(1),
+ /* 120 E> */ B(LdaContextSlot), R(context), U8(4),
+ B(Mul), R(1),
+ /* 130 S> */ B(Return),
]
constant pool: [
]
@@ -56,17 +56,17 @@
parameter count: 1
bytecode array length: 22
bytecodes: [
- B(StackCheck),
- B(LdaContextSlot), R(context), U8(4),
- B(Star), R(0),
- B(Ldar), R(context),
- B(Star), R(1),
- B(LdaContextSlot), R(1), U8(1),
- B(Star), R(1),
- B(Ldar), R(0),
- B(StaContextSlot), R(1), U8(4),
- B(LdaUndefined),
- B(Return),
+ /* 97 E> */ B(StackCheck),
+ /* 102 S> */ B(LdaContextSlot), R(context), U8(4),
+ /* 111 E> */ B(Star), R(0),
+ B(Ldar), R(context),
+ B(Star), R(1),
+ B(LdaContextSlot), R(1), U8(1),
+ B(Star), R(1),
+ B(Ldar), R(0),
+ B(StaContextSlot), R(1), U8(4),
+ B(LdaUndefined),
+ /* 123 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/Parameters.golden b/test/cctest/interpreter/bytecode_expectations/Parameters.golden
index e124788..f26c066 100644
--- a/test/cctest/interpreter/bytecode_expectations/Parameters.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Parameters.golden
@@ -17,9 +17,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Ldar), R(this),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 15 S> */ B(Ldar), R(this),
+ /* 28 S> */ B(Return),
]
constant pool: [
]
@@ -35,9 +35,9 @@
parameter count: 2
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(arg0),
+ /* 32 S> */ B(Return),
]
constant pool: [
]
@@ -53,9 +53,9 @@
parameter count: 2
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Ldar), R(this),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(this),
+ /* 32 S> */ B(Return),
]
constant pool: [
]
@@ -71,9 +71,9 @@
parameter count: 8
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg3),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 55 S> */ B(Ldar), R(arg3),
+ /* 68 S> */ B(Return),
]
constant pool: [
]
@@ -89,9 +89,9 @@
parameter count: 8
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(Ldar), R(this),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 55 S> */ B(Ldar), R(this),
+ /* 68 S> */ B(Return),
]
constant pool: [
]
@@ -107,11 +107,11 @@
parameter count: 2
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(arg0),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(LdaSmi), U8(1),
+ /* 24 E> */ B(Star), R(arg0),
+ B(LdaUndefined),
+ /* 29 S> */ B(Return),
]
constant pool: [
]
@@ -127,11 +127,11 @@
parameter count: 5
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(arg1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 37 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(arg1),
+ B(LdaUndefined),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden b/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
index 08b20dd..b9fd679 100644
--- a/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
+++ b/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
@@ -15,10 +15,10 @@
parameter count: 1
bytecode array length: 5
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 55 S> */ B(Return),
]
constant pool: [
]
@@ -33,13 +33,13 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Add), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Add), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -54,13 +54,13 @@
parameter count: 1
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Sub), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Sub), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -75,13 +75,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(4),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Mul), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(4),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Mul), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -96,13 +96,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(4),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Div), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(4),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Div), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -117,13 +117,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(4),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Mod), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(4),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Mod), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -138,13 +138,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(BitwiseOr), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(BitwiseOr), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -159,13 +159,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(BitwiseXor), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(BitwiseXor), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -180,13 +180,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(BitwiseAnd), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ B(BitwiseAnd), R(1),
+ /* 59 S> */ B(Return),
]
constant pool: [
]
@@ -201,13 +201,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(ShiftLeft), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(ShiftLeft), R(1),
+ /* 61 S> */ B(Return),
]
constant pool: [
]
@@ -222,13 +222,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(ShiftRight), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(ShiftRight), R(1),
+ /* 61 S> */ B(Return),
]
constant pool: [
]
@@ -243,13 +243,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(10),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(ShiftRightLogical), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(10),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(ShiftRightLogical), R(1),
+ /* 62 S> */ B(Return),
]
constant pool: [
]
@@ -264,11 +264,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaSmi), U8(3),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(LdaSmi), U8(3),
+ /* 60 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden b/test/cctest/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden
index 0a23f2b..a707451 100644
--- a/test/cctest/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden
+++ b/test/cctest/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden
@@ -14,9 +14,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(LdaUndefined),
+ /* 34 S> */ B(Return),
]
constant pool: [
]
@@ -31,9 +31,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaUndefined),
+ /* 42 S> */ B(Return),
]
constant pool: [
]
@@ -48,9 +48,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaNull),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaNull),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -65,9 +65,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaTrue),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaTrue),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -82,9 +82,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaFalse),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaFalse),
+ /* 48 S> */ B(Return),
]
constant pool: [
]
@@ -99,9 +99,9 @@
parameter count: 1
bytecode array length: 3
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaZero),
+ /* 44 S> */ B(Return),
]
constant pool: [
]
@@ -116,9 +116,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(1),
+ /* 45 S> */ B(Return),
]
constant pool: [
]
@@ -133,9 +133,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(-1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(-1),
+ /* 45 S> */ B(Return),
]
constant pool: [
]
@@ -150,9 +150,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(127),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(127),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -167,9 +167,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(-128),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(-128),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden b/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
index d6108f1..df4c277 100644
--- a/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
+++ b/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
@@ -17,13 +17,13 @@
parameter count: 2
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(3),
- B(Star), R(0),
- B(Call), R(0), R(1), U8(1), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 24 E> */ B(LoadIC), R(1), U8(0), U8(3),
+ B(Star), R(0),
+ /* 25 E> */ B(Call), R(0), R(1), U8(1), U8(1),
+ /* 33 S> */ B(Return),
]
constant pool: [
"func",
@@ -40,17 +40,17 @@
parameter count: 4
bytecode array length: 25
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(3),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(2),
- B(Ldar), R(arg2),
- B(Star), R(3),
- B(Call), R(0), R(1), U8(3), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 22 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 30 E> */ B(LoadIC), R(1), U8(0), U8(3),
+ B(Star), R(0),
+ /* 36 E> */ B(Ldar), R(arg1),
+ B(Star), R(2),
+ /* 39 E> */ B(Ldar), R(arg2),
+ B(Star), R(3),
+ /* 31 E> */ B(Call), R(0), R(1), U8(3), U8(1),
+ /* 43 S> */ B(Return),
]
constant pool: [
"func",
@@ -67,20 +67,20 @@
parameter count: 3
bytecode array length: 31
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(3),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(3),
- B(Ldar), R(arg1),
- B(Add), R(3),
- B(Star), R(2),
- B(Ldar), R(arg1),
- B(Star), R(3),
- B(Call), R(0), R(1), U8(3), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 27 E> */ B(LoadIC), R(1), U8(0), U8(3),
+ B(Star), R(0),
+ /* 33 E> */ B(Ldar), R(arg1),
+ B(Star), R(3),
+ /* 37 E> */ B(Ldar), R(arg1),
+ B(Add), R(3),
+ B(Star), R(2),
+ /* 40 E> */ B(Ldar), R(arg1),
+ B(Star), R(3),
+ /* 28 E> */ B(Call), R(0), R(1), U8(3), U8(1),
+ /* 44 S> */ B(Return),
]
constant pool: [
"func",
@@ -226,397 +226,397 @@
parameter count: 2
bytecode array length: 1050
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(255),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Wide), B(LoadIC), R16(1), U16(0), U16(259),
- B(Star), R(0),
- B(Wide), B(Call), R16(0), R16(1), U16(1), U16(257),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 17 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 18 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 26 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 27 E> */ B(LoadIC), R(0), U8(0), U8(3),
+ /* 35 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 36 E> */ B(LoadIC), R(0), U8(0), U8(5),
+ /* 44 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 45 E> */ B(LoadIC), R(0), U8(0), U8(7),
+ /* 53 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 54 E> */ B(LoadIC), R(0), U8(0), U8(9),
+ /* 62 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 63 E> */ B(LoadIC), R(0), U8(0), U8(11),
+ /* 71 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 72 E> */ B(LoadIC), R(0), U8(0), U8(13),
+ /* 80 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 81 E> */ B(LoadIC), R(0), U8(0), U8(15),
+ /* 89 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 90 E> */ B(LoadIC), R(0), U8(0), U8(17),
+ /* 98 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 99 E> */ B(LoadIC), R(0), U8(0), U8(19),
+ /* 107 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 108 E> */ B(LoadIC), R(0), U8(0), U8(21),
+ /* 116 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 117 E> */ B(LoadIC), R(0), U8(0), U8(23),
+ /* 125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 126 E> */ B(LoadIC), R(0), U8(0), U8(25),
+ /* 134 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 135 E> */ B(LoadIC), R(0), U8(0), U8(27),
+ /* 143 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 144 E> */ B(LoadIC), R(0), U8(0), U8(29),
+ /* 152 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 153 E> */ B(LoadIC), R(0), U8(0), U8(31),
+ /* 161 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 162 E> */ B(LoadIC), R(0), U8(0), U8(33),
+ /* 170 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 171 E> */ B(LoadIC), R(0), U8(0), U8(35),
+ /* 179 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 180 E> */ B(LoadIC), R(0), U8(0), U8(37),
+ /* 188 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 189 E> */ B(LoadIC), R(0), U8(0), U8(39),
+ /* 197 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 198 E> */ B(LoadIC), R(0), U8(0), U8(41),
+ /* 206 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 207 E> */ B(LoadIC), R(0), U8(0), U8(43),
+ /* 215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 216 E> */ B(LoadIC), R(0), U8(0), U8(45),
+ /* 224 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 225 E> */ B(LoadIC), R(0), U8(0), U8(47),
+ /* 233 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 234 E> */ B(LoadIC), R(0), U8(0), U8(49),
+ /* 242 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 243 E> */ B(LoadIC), R(0), U8(0), U8(51),
+ /* 251 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 252 E> */ B(LoadIC), R(0), U8(0), U8(53),
+ /* 260 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 261 E> */ B(LoadIC), R(0), U8(0), U8(55),
+ /* 269 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 270 E> */ B(LoadIC), R(0), U8(0), U8(57),
+ /* 278 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 279 E> */ B(LoadIC), R(0), U8(0), U8(59),
+ /* 287 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 288 E> */ B(LoadIC), R(0), U8(0), U8(61),
+ /* 296 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 297 E> */ B(LoadIC), R(0), U8(0), U8(63),
+ /* 305 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 306 E> */ B(LoadIC), R(0), U8(0), U8(65),
+ /* 314 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 315 E> */ B(LoadIC), R(0), U8(0), U8(67),
+ /* 323 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 324 E> */ B(LoadIC), R(0), U8(0), U8(69),
+ /* 332 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 333 E> */ B(LoadIC), R(0), U8(0), U8(71),
+ /* 341 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 342 E> */ B(LoadIC), R(0), U8(0), U8(73),
+ /* 350 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 351 E> */ B(LoadIC), R(0), U8(0), U8(75),
+ /* 359 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 360 E> */ B(LoadIC), R(0), U8(0), U8(77),
+ /* 368 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 369 E> */ B(LoadIC), R(0), U8(0), U8(79),
+ /* 377 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 378 E> */ B(LoadIC), R(0), U8(0), U8(81),
+ /* 386 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 387 E> */ B(LoadIC), R(0), U8(0), U8(83),
+ /* 395 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 396 E> */ B(LoadIC), R(0), U8(0), U8(85),
+ /* 404 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 405 E> */ B(LoadIC), R(0), U8(0), U8(87),
+ /* 413 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 414 E> */ B(LoadIC), R(0), U8(0), U8(89),
+ /* 422 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 423 E> */ B(LoadIC), R(0), U8(0), U8(91),
+ /* 431 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 432 E> */ B(LoadIC), R(0), U8(0), U8(93),
+ /* 440 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 441 E> */ B(LoadIC), R(0), U8(0), U8(95),
+ /* 449 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 450 E> */ B(LoadIC), R(0), U8(0), U8(97),
+ /* 458 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 459 E> */ B(LoadIC), R(0), U8(0), U8(99),
+ /* 467 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 468 E> */ B(LoadIC), R(0), U8(0), U8(101),
+ /* 476 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 477 E> */ B(LoadIC), R(0), U8(0), U8(103),
+ /* 485 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 486 E> */ B(LoadIC), R(0), U8(0), U8(105),
+ /* 494 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 495 E> */ B(LoadIC), R(0), U8(0), U8(107),
+ /* 503 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 504 E> */ B(LoadIC), R(0), U8(0), U8(109),
+ /* 512 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 513 E> */ B(LoadIC), R(0), U8(0), U8(111),
+ /* 521 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 522 E> */ B(LoadIC), R(0), U8(0), U8(113),
+ /* 530 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 531 E> */ B(LoadIC), R(0), U8(0), U8(115),
+ /* 539 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 540 E> */ B(LoadIC), R(0), U8(0), U8(117),
+ /* 548 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 549 E> */ B(LoadIC), R(0), U8(0), U8(119),
+ /* 557 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 558 E> */ B(LoadIC), R(0), U8(0), U8(121),
+ /* 566 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 567 E> */ B(LoadIC), R(0), U8(0), U8(123),
+ /* 575 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 576 E> */ B(LoadIC), R(0), U8(0), U8(125),
+ /* 584 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 585 E> */ B(LoadIC), R(0), U8(0), U8(127),
+ /* 593 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 594 E> */ B(LoadIC), R(0), U8(0), U8(129),
+ /* 602 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 603 E> */ B(LoadIC), R(0), U8(0), U8(131),
+ /* 611 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 612 E> */ B(LoadIC), R(0), U8(0), U8(133),
+ /* 620 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 621 E> */ B(LoadIC), R(0), U8(0), U8(135),
+ /* 629 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 630 E> */ B(LoadIC), R(0), U8(0), U8(137),
+ /* 638 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 639 E> */ B(LoadIC), R(0), U8(0), U8(139),
+ /* 647 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 648 E> */ B(LoadIC), R(0), U8(0), U8(141),
+ /* 656 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 657 E> */ B(LoadIC), R(0), U8(0), U8(143),
+ /* 665 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 666 E> */ B(LoadIC), R(0), U8(0), U8(145),
+ /* 674 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 675 E> */ B(LoadIC), R(0), U8(0), U8(147),
+ /* 683 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 684 E> */ B(LoadIC), R(0), U8(0), U8(149),
+ /* 692 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 693 E> */ B(LoadIC), R(0), U8(0), U8(151),
+ /* 701 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 702 E> */ B(LoadIC), R(0), U8(0), U8(153),
+ /* 710 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 711 E> */ B(LoadIC), R(0), U8(0), U8(155),
+ /* 719 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 720 E> */ B(LoadIC), R(0), U8(0), U8(157),
+ /* 728 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 729 E> */ B(LoadIC), R(0), U8(0), U8(159),
+ /* 737 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 738 E> */ B(LoadIC), R(0), U8(0), U8(161),
+ /* 746 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 747 E> */ B(LoadIC), R(0), U8(0), U8(163),
+ /* 755 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 756 E> */ B(LoadIC), R(0), U8(0), U8(165),
+ /* 764 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 765 E> */ B(LoadIC), R(0), U8(0), U8(167),
+ /* 773 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 774 E> */ B(LoadIC), R(0), U8(0), U8(169),
+ /* 782 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 783 E> */ B(LoadIC), R(0), U8(0), U8(171),
+ /* 791 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 792 E> */ B(LoadIC), R(0), U8(0), U8(173),
+ /* 800 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 801 E> */ B(LoadIC), R(0), U8(0), U8(175),
+ /* 809 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 810 E> */ B(LoadIC), R(0), U8(0), U8(177),
+ /* 818 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 819 E> */ B(LoadIC), R(0), U8(0), U8(179),
+ /* 827 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 828 E> */ B(LoadIC), R(0), U8(0), U8(181),
+ /* 836 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 837 E> */ B(LoadIC), R(0), U8(0), U8(183),
+ /* 845 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 846 E> */ B(LoadIC), R(0), U8(0), U8(185),
+ /* 854 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 855 E> */ B(LoadIC), R(0), U8(0), U8(187),
+ /* 863 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 864 E> */ B(LoadIC), R(0), U8(0), U8(189),
+ /* 872 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 873 E> */ B(LoadIC), R(0), U8(0), U8(191),
+ /* 881 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 882 E> */ B(LoadIC), R(0), U8(0), U8(193),
+ /* 890 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 891 E> */ B(LoadIC), R(0), U8(0), U8(195),
+ /* 899 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 900 E> */ B(LoadIC), R(0), U8(0), U8(197),
+ /* 908 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 909 E> */ B(LoadIC), R(0), U8(0), U8(199),
+ /* 917 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 918 E> */ B(LoadIC), R(0), U8(0), U8(201),
+ /* 926 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 927 E> */ B(LoadIC), R(0), U8(0), U8(203),
+ /* 935 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 936 E> */ B(LoadIC), R(0), U8(0), U8(205),
+ /* 944 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 945 E> */ B(LoadIC), R(0), U8(0), U8(207),
+ /* 953 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 954 E> */ B(LoadIC), R(0), U8(0), U8(209),
+ /* 962 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 963 E> */ B(LoadIC), R(0), U8(0), U8(211),
+ /* 971 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 972 E> */ B(LoadIC), R(0), U8(0), U8(213),
+ /* 980 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 981 E> */ B(LoadIC), R(0), U8(0), U8(215),
+ /* 989 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 990 E> */ B(LoadIC), R(0), U8(0), U8(217),
+ /* 998 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 999 E> */ B(LoadIC), R(0), U8(0), U8(219),
+ /* 1007 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1008 E> */ B(LoadIC), R(0), U8(0), U8(221),
+ /* 1016 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1017 E> */ B(LoadIC), R(0), U8(0), U8(223),
+ /* 1025 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1026 E> */ B(LoadIC), R(0), U8(0), U8(225),
+ /* 1034 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1035 E> */ B(LoadIC), R(0), U8(0), U8(227),
+ /* 1043 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1044 E> */ B(LoadIC), R(0), U8(0), U8(229),
+ /* 1052 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1053 E> */ B(LoadIC), R(0), U8(0), U8(231),
+ /* 1061 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1062 E> */ B(LoadIC), R(0), U8(0), U8(233),
+ /* 1070 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1071 E> */ B(LoadIC), R(0), U8(0), U8(235),
+ /* 1079 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1080 E> */ B(LoadIC), R(0), U8(0), U8(237),
+ /* 1088 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1089 E> */ B(LoadIC), R(0), U8(0), U8(239),
+ /* 1097 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1098 E> */ B(LoadIC), R(0), U8(0), U8(241),
+ /* 1106 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1107 E> */ B(LoadIC), R(0), U8(0), U8(243),
+ /* 1115 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1116 E> */ B(LoadIC), R(0), U8(0), U8(245),
+ /* 1124 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1125 E> */ B(LoadIC), R(0), U8(0), U8(247),
+ /* 1133 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1134 E> */ B(LoadIC), R(0), U8(0), U8(249),
+ /* 1142 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1143 E> */ B(LoadIC), R(0), U8(0), U8(251),
+ /* 1151 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1152 E> */ B(LoadIC), R(0), U8(0), U8(253),
+ /* 1160 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1161 E> */ B(LoadIC), R(0), U8(0), U8(255),
+ /* 1169 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1177 E> */ B(Wide), B(LoadIC), R16(1), U16(0), U16(259),
+ B(Star), R(0),
+ /* 1178 E> */ B(Wide), B(Call), R16(0), R16(1), U16(1), U16(257),
+ /* 1186 S> */ B(Return),
]
constant pool: [
"func",
diff --git a/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden b/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
index 7d5a58e..76741cb 100644
--- a/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
+++ b/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
@@ -17,11 +17,11 @@
parameter count: 2
bytecode array length: 10
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 24 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 31 S> */ B(Return),
]
constant pool: [
"name",
@@ -38,11 +38,11 @@
parameter count: 2
bytecode array length: 10
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 24 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 33 S> */ B(Return),
]
constant pool: [
"key",
@@ -59,12 +59,12 @@
parameter count: 2
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(100),
- B(KeyedLoadIC), R(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 24 E> */ B(LdaSmi), U8(100),
+ B(KeyedLoadIC), R(0), U8(1),
+ /* 31 S> */ B(Return),
]
constant pool: [
]
@@ -80,12 +80,12 @@
parameter count: 3
bytecode array length: 11
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(0), U8(1),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 27 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(0), U8(1),
+ /* 32 S> */ B(Return),
]
constant pool: [
]
@@ -101,16 +101,16 @@
parameter count: 2
bytecode array length: 21
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(1),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LdaSmi), U8(-124),
- B(KeyedLoadIC), R(1), U8(3),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 25 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 25 E> */ B(LoadIC), R(1), U8(0), U8(1),
+ /* 25 E> */ B(Star), R(0),
+ /* 32 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 40 E> */ B(LdaSmi), U8(-124),
+ B(KeyedLoadIC), R(1), U8(3),
+ /* 48 S> */ B(Return),
]
constant pool: [
"name",
@@ -258,523 +258,523 @@
parameter count: 2
bytecode array length: 1294
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(1),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(3),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(5),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(7),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(9),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(11),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(13),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(15),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(17),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(19),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(21),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(23),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(25),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(27),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(29),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(31),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(33),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(35),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(37),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(39),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(41),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(43),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(45),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(47),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(49),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(51),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(53),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(55),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(57),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(59),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(61),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(63),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(65),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(67),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(69),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(71),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(73),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(75),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(77),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(79),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(81),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(83),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(85),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(87),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(89),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(91),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(93),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(95),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(97),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(99),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(101),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(103),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(105),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(107),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(109),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(111),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(113),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(115),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(117),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(119),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(121),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(123),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(125),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(127),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(129),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(131),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(133),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(135),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(137),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(139),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(141),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(143),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(145),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(147),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(149),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(151),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(153),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(155),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(157),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(159),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(161),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(163),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(165),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(167),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(169),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(171),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(173),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(175),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(177),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(179),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(181),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(183),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(185),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(187),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(189),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(191),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(193),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(195),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(197),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(199),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(201),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(203),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(205),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(207),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(209),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(211),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(213),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(215),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(217),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(219),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(221),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(223),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(225),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(227),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(229),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(231),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(233),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(235),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(237),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(239),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(241),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(243),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(245),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(247),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(249),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(251),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(253),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(0), U8(255),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Wide), B(LoadIC), R16(1), U16(0), U16(257),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 27 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 32 E> */ B(LoadIC), R(1), U8(0), U8(1),
+ /* 29 E> */ B(Star), R(0),
+ /* 41 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 46 E> */ B(LoadIC), R(1), U8(0), U8(3),
+ /* 43 E> */ B(Star), R(0),
+ /* 55 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 60 E> */ B(LoadIC), R(1), U8(0), U8(5),
+ /* 57 E> */ B(Star), R(0),
+ /* 69 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 74 E> */ B(LoadIC), R(1), U8(0), U8(7),
+ /* 71 E> */ B(Star), R(0),
+ /* 83 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 88 E> */ B(LoadIC), R(1), U8(0), U8(9),
+ /* 85 E> */ B(Star), R(0),
+ /* 97 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 102 E> */ B(LoadIC), R(1), U8(0), U8(11),
+ /* 99 E> */ B(Star), R(0),
+ /* 111 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 116 E> */ B(LoadIC), R(1), U8(0), U8(13),
+ /* 113 E> */ B(Star), R(0),
+ /* 125 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 130 E> */ B(LoadIC), R(1), U8(0), U8(15),
+ /* 127 E> */ B(Star), R(0),
+ /* 139 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 144 E> */ B(LoadIC), R(1), U8(0), U8(17),
+ /* 141 E> */ B(Star), R(0),
+ /* 153 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 158 E> */ B(LoadIC), R(1), U8(0), U8(19),
+ /* 155 E> */ B(Star), R(0),
+ /* 167 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 172 E> */ B(LoadIC), R(1), U8(0), U8(21),
+ /* 169 E> */ B(Star), R(0),
+ /* 181 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 186 E> */ B(LoadIC), R(1), U8(0), U8(23),
+ /* 183 E> */ B(Star), R(0),
+ /* 195 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 200 E> */ B(LoadIC), R(1), U8(0), U8(25),
+ /* 197 E> */ B(Star), R(0),
+ /* 209 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 214 E> */ B(LoadIC), R(1), U8(0), U8(27),
+ /* 211 E> */ B(Star), R(0),
+ /* 223 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 228 E> */ B(LoadIC), R(1), U8(0), U8(29),
+ /* 225 E> */ B(Star), R(0),
+ /* 237 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 242 E> */ B(LoadIC), R(1), U8(0), U8(31),
+ /* 239 E> */ B(Star), R(0),
+ /* 251 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 256 E> */ B(LoadIC), R(1), U8(0), U8(33),
+ /* 253 E> */ B(Star), R(0),
+ /* 265 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 270 E> */ B(LoadIC), R(1), U8(0), U8(35),
+ /* 267 E> */ B(Star), R(0),
+ /* 279 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 284 E> */ B(LoadIC), R(1), U8(0), U8(37),
+ /* 281 E> */ B(Star), R(0),
+ /* 293 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 298 E> */ B(LoadIC), R(1), U8(0), U8(39),
+ /* 295 E> */ B(Star), R(0),
+ /* 307 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 312 E> */ B(LoadIC), R(1), U8(0), U8(41),
+ /* 309 E> */ B(Star), R(0),
+ /* 321 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 326 E> */ B(LoadIC), R(1), U8(0), U8(43),
+ /* 323 E> */ B(Star), R(0),
+ /* 335 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 340 E> */ B(LoadIC), R(1), U8(0), U8(45),
+ /* 337 E> */ B(Star), R(0),
+ /* 349 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 354 E> */ B(LoadIC), R(1), U8(0), U8(47),
+ /* 351 E> */ B(Star), R(0),
+ /* 363 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 368 E> */ B(LoadIC), R(1), U8(0), U8(49),
+ /* 365 E> */ B(Star), R(0),
+ /* 377 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 382 E> */ B(LoadIC), R(1), U8(0), U8(51),
+ /* 379 E> */ B(Star), R(0),
+ /* 391 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 396 E> */ B(LoadIC), R(1), U8(0), U8(53),
+ /* 393 E> */ B(Star), R(0),
+ /* 405 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 410 E> */ B(LoadIC), R(1), U8(0), U8(55),
+ /* 407 E> */ B(Star), R(0),
+ /* 419 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 424 E> */ B(LoadIC), R(1), U8(0), U8(57),
+ /* 421 E> */ B(Star), R(0),
+ /* 433 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 438 E> */ B(LoadIC), R(1), U8(0), U8(59),
+ /* 435 E> */ B(Star), R(0),
+ /* 447 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 452 E> */ B(LoadIC), R(1), U8(0), U8(61),
+ /* 449 E> */ B(Star), R(0),
+ /* 461 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 466 E> */ B(LoadIC), R(1), U8(0), U8(63),
+ /* 463 E> */ B(Star), R(0),
+ /* 475 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 480 E> */ B(LoadIC), R(1), U8(0), U8(65),
+ /* 477 E> */ B(Star), R(0),
+ /* 489 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 494 E> */ B(LoadIC), R(1), U8(0), U8(67),
+ /* 491 E> */ B(Star), R(0),
+ /* 503 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 508 E> */ B(LoadIC), R(1), U8(0), U8(69),
+ /* 505 E> */ B(Star), R(0),
+ /* 517 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 522 E> */ B(LoadIC), R(1), U8(0), U8(71),
+ /* 519 E> */ B(Star), R(0),
+ /* 531 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 536 E> */ B(LoadIC), R(1), U8(0), U8(73),
+ /* 533 E> */ B(Star), R(0),
+ /* 545 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 550 E> */ B(LoadIC), R(1), U8(0), U8(75),
+ /* 547 E> */ B(Star), R(0),
+ /* 559 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 564 E> */ B(LoadIC), R(1), U8(0), U8(77),
+ /* 561 E> */ B(Star), R(0),
+ /* 573 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 578 E> */ B(LoadIC), R(1), U8(0), U8(79),
+ /* 575 E> */ B(Star), R(0),
+ /* 587 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 592 E> */ B(LoadIC), R(1), U8(0), U8(81),
+ /* 589 E> */ B(Star), R(0),
+ /* 601 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 606 E> */ B(LoadIC), R(1), U8(0), U8(83),
+ /* 603 E> */ B(Star), R(0),
+ /* 615 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 620 E> */ B(LoadIC), R(1), U8(0), U8(85),
+ /* 617 E> */ B(Star), R(0),
+ /* 629 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 634 E> */ B(LoadIC), R(1), U8(0), U8(87),
+ /* 631 E> */ B(Star), R(0),
+ /* 643 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 648 E> */ B(LoadIC), R(1), U8(0), U8(89),
+ /* 645 E> */ B(Star), R(0),
+ /* 657 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 662 E> */ B(LoadIC), R(1), U8(0), U8(91),
+ /* 659 E> */ B(Star), R(0),
+ /* 671 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 676 E> */ B(LoadIC), R(1), U8(0), U8(93),
+ /* 673 E> */ B(Star), R(0),
+ /* 685 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 690 E> */ B(LoadIC), R(1), U8(0), U8(95),
+ /* 687 E> */ B(Star), R(0),
+ /* 699 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 704 E> */ B(LoadIC), R(1), U8(0), U8(97),
+ /* 701 E> */ B(Star), R(0),
+ /* 713 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 718 E> */ B(LoadIC), R(1), U8(0), U8(99),
+ /* 715 E> */ B(Star), R(0),
+ /* 727 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 732 E> */ B(LoadIC), R(1), U8(0), U8(101),
+ /* 729 E> */ B(Star), R(0),
+ /* 741 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 746 E> */ B(LoadIC), R(1), U8(0), U8(103),
+ /* 743 E> */ B(Star), R(0),
+ /* 755 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 760 E> */ B(LoadIC), R(1), U8(0), U8(105),
+ /* 757 E> */ B(Star), R(0),
+ /* 769 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 774 E> */ B(LoadIC), R(1), U8(0), U8(107),
+ /* 771 E> */ B(Star), R(0),
+ /* 783 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 788 E> */ B(LoadIC), R(1), U8(0), U8(109),
+ /* 785 E> */ B(Star), R(0),
+ /* 797 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 802 E> */ B(LoadIC), R(1), U8(0), U8(111),
+ /* 799 E> */ B(Star), R(0),
+ /* 811 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 816 E> */ B(LoadIC), R(1), U8(0), U8(113),
+ /* 813 E> */ B(Star), R(0),
+ /* 825 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 830 E> */ B(LoadIC), R(1), U8(0), U8(115),
+ /* 827 E> */ B(Star), R(0),
+ /* 839 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 844 E> */ B(LoadIC), R(1), U8(0), U8(117),
+ /* 841 E> */ B(Star), R(0),
+ /* 853 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 858 E> */ B(LoadIC), R(1), U8(0), U8(119),
+ /* 855 E> */ B(Star), R(0),
+ /* 867 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 872 E> */ B(LoadIC), R(1), U8(0), U8(121),
+ /* 869 E> */ B(Star), R(0),
+ /* 881 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 886 E> */ B(LoadIC), R(1), U8(0), U8(123),
+ /* 883 E> */ B(Star), R(0),
+ /* 895 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 900 E> */ B(LoadIC), R(1), U8(0), U8(125),
+ /* 897 E> */ B(Star), R(0),
+ /* 909 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 914 E> */ B(LoadIC), R(1), U8(0), U8(127),
+ /* 911 E> */ B(Star), R(0),
+ /* 923 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 928 E> */ B(LoadIC), R(1), U8(0), U8(129),
+ /* 925 E> */ B(Star), R(0),
+ /* 937 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 942 E> */ B(LoadIC), R(1), U8(0), U8(131),
+ /* 939 E> */ B(Star), R(0),
+ /* 951 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 956 E> */ B(LoadIC), R(1), U8(0), U8(133),
+ /* 953 E> */ B(Star), R(0),
+ /* 965 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 970 E> */ B(LoadIC), R(1), U8(0), U8(135),
+ /* 967 E> */ B(Star), R(0),
+ /* 979 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 984 E> */ B(LoadIC), R(1), U8(0), U8(137),
+ /* 981 E> */ B(Star), R(0),
+ /* 993 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 998 E> */ B(LoadIC), R(1), U8(0), U8(139),
+ /* 995 E> */ B(Star), R(0),
+ /* 1007 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1012 E> */ B(LoadIC), R(1), U8(0), U8(141),
+ /* 1009 E> */ B(Star), R(0),
+ /* 1021 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1026 E> */ B(LoadIC), R(1), U8(0), U8(143),
+ /* 1023 E> */ B(Star), R(0),
+ /* 1035 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1040 E> */ B(LoadIC), R(1), U8(0), U8(145),
+ /* 1037 E> */ B(Star), R(0),
+ /* 1049 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1054 E> */ B(LoadIC), R(1), U8(0), U8(147),
+ /* 1051 E> */ B(Star), R(0),
+ /* 1063 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1068 E> */ B(LoadIC), R(1), U8(0), U8(149),
+ /* 1065 E> */ B(Star), R(0),
+ /* 1077 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1082 E> */ B(LoadIC), R(1), U8(0), U8(151),
+ /* 1079 E> */ B(Star), R(0),
+ /* 1091 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1096 E> */ B(LoadIC), R(1), U8(0), U8(153),
+ /* 1093 E> */ B(Star), R(0),
+ /* 1105 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1110 E> */ B(LoadIC), R(1), U8(0), U8(155),
+ /* 1107 E> */ B(Star), R(0),
+ /* 1119 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1124 E> */ B(LoadIC), R(1), U8(0), U8(157),
+ /* 1121 E> */ B(Star), R(0),
+ /* 1133 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1138 E> */ B(LoadIC), R(1), U8(0), U8(159),
+ /* 1135 E> */ B(Star), R(0),
+ /* 1147 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1152 E> */ B(LoadIC), R(1), U8(0), U8(161),
+ /* 1149 E> */ B(Star), R(0),
+ /* 1161 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1166 E> */ B(LoadIC), R(1), U8(0), U8(163),
+ /* 1163 E> */ B(Star), R(0),
+ /* 1175 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1180 E> */ B(LoadIC), R(1), U8(0), U8(165),
+ /* 1177 E> */ B(Star), R(0),
+ /* 1189 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1194 E> */ B(LoadIC), R(1), U8(0), U8(167),
+ /* 1191 E> */ B(Star), R(0),
+ /* 1203 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1208 E> */ B(LoadIC), R(1), U8(0), U8(169),
+ /* 1205 E> */ B(Star), R(0),
+ /* 1217 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1222 E> */ B(LoadIC), R(1), U8(0), U8(171),
+ /* 1219 E> */ B(Star), R(0),
+ /* 1231 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1236 E> */ B(LoadIC), R(1), U8(0), U8(173),
+ /* 1233 E> */ B(Star), R(0),
+ /* 1245 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1250 E> */ B(LoadIC), R(1), U8(0), U8(175),
+ /* 1247 E> */ B(Star), R(0),
+ /* 1259 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1264 E> */ B(LoadIC), R(1), U8(0), U8(177),
+ /* 1261 E> */ B(Star), R(0),
+ /* 1273 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1278 E> */ B(LoadIC), R(1), U8(0), U8(179),
+ /* 1275 E> */ B(Star), R(0),
+ /* 1287 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1292 E> */ B(LoadIC), R(1), U8(0), U8(181),
+ /* 1289 E> */ B(Star), R(0),
+ /* 1301 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1306 E> */ B(LoadIC), R(1), U8(0), U8(183),
+ /* 1303 E> */ B(Star), R(0),
+ /* 1315 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1320 E> */ B(LoadIC), R(1), U8(0), U8(185),
+ /* 1317 E> */ B(Star), R(0),
+ /* 1329 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1334 E> */ B(LoadIC), R(1), U8(0), U8(187),
+ /* 1331 E> */ B(Star), R(0),
+ /* 1343 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1348 E> */ B(LoadIC), R(1), U8(0), U8(189),
+ /* 1345 E> */ B(Star), R(0),
+ /* 1357 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1362 E> */ B(LoadIC), R(1), U8(0), U8(191),
+ /* 1359 E> */ B(Star), R(0),
+ /* 1371 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1376 E> */ B(LoadIC), R(1), U8(0), U8(193),
+ /* 1373 E> */ B(Star), R(0),
+ /* 1385 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1390 E> */ B(LoadIC), R(1), U8(0), U8(195),
+ /* 1387 E> */ B(Star), R(0),
+ /* 1399 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1404 E> */ B(LoadIC), R(1), U8(0), U8(197),
+ /* 1401 E> */ B(Star), R(0),
+ /* 1413 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1418 E> */ B(LoadIC), R(1), U8(0), U8(199),
+ /* 1415 E> */ B(Star), R(0),
+ /* 1427 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1432 E> */ B(LoadIC), R(1), U8(0), U8(201),
+ /* 1429 E> */ B(Star), R(0),
+ /* 1441 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1446 E> */ B(LoadIC), R(1), U8(0), U8(203),
+ /* 1443 E> */ B(Star), R(0),
+ /* 1455 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1460 E> */ B(LoadIC), R(1), U8(0), U8(205),
+ /* 1457 E> */ B(Star), R(0),
+ /* 1469 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1474 E> */ B(LoadIC), R(1), U8(0), U8(207),
+ /* 1471 E> */ B(Star), R(0),
+ /* 1483 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1488 E> */ B(LoadIC), R(1), U8(0), U8(209),
+ /* 1485 E> */ B(Star), R(0),
+ /* 1497 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1502 E> */ B(LoadIC), R(1), U8(0), U8(211),
+ /* 1499 E> */ B(Star), R(0),
+ /* 1511 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1516 E> */ B(LoadIC), R(1), U8(0), U8(213),
+ /* 1513 E> */ B(Star), R(0),
+ /* 1525 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1530 E> */ B(LoadIC), R(1), U8(0), U8(215),
+ /* 1527 E> */ B(Star), R(0),
+ /* 1539 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1544 E> */ B(LoadIC), R(1), U8(0), U8(217),
+ /* 1541 E> */ B(Star), R(0),
+ /* 1553 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1558 E> */ B(LoadIC), R(1), U8(0), U8(219),
+ /* 1555 E> */ B(Star), R(0),
+ /* 1567 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1572 E> */ B(LoadIC), R(1), U8(0), U8(221),
+ /* 1569 E> */ B(Star), R(0),
+ /* 1581 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1586 E> */ B(LoadIC), R(1), U8(0), U8(223),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1595 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1600 E> */ B(LoadIC), R(1), U8(0), U8(225),
+ /* 1597 E> */ B(Star), R(0),
+ /* 1609 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1614 E> */ B(LoadIC), R(1), U8(0), U8(227),
+ /* 1611 E> */ B(Star), R(0),
+ /* 1623 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1628 E> */ B(LoadIC), R(1), U8(0), U8(229),
+ /* 1625 E> */ B(Star), R(0),
+ /* 1637 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1642 E> */ B(LoadIC), R(1), U8(0), U8(231),
+ /* 1639 E> */ B(Star), R(0),
+ /* 1651 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1656 E> */ B(LoadIC), R(1), U8(0), U8(233),
+ /* 1653 E> */ B(Star), R(0),
+ /* 1665 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1670 E> */ B(LoadIC), R(1), U8(0), U8(235),
+ /* 1667 E> */ B(Star), R(0),
+ /* 1679 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1684 E> */ B(LoadIC), R(1), U8(0), U8(237),
+ /* 1681 E> */ B(Star), R(0),
+ /* 1693 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1698 E> */ B(LoadIC), R(1), U8(0), U8(239),
+ /* 1695 E> */ B(Star), R(0),
+ /* 1707 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1712 E> */ B(LoadIC), R(1), U8(0), U8(241),
+ /* 1709 E> */ B(Star), R(0),
+ /* 1721 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1726 E> */ B(LoadIC), R(1), U8(0), U8(243),
+ /* 1723 E> */ B(Star), R(0),
+ /* 1735 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1740 E> */ B(LoadIC), R(1), U8(0), U8(245),
+ /* 1737 E> */ B(Star), R(0),
+ /* 1749 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1754 E> */ B(LoadIC), R(1), U8(0), U8(247),
+ /* 1751 E> */ B(Star), R(0),
+ /* 1763 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1768 E> */ B(LoadIC), R(1), U8(0), U8(249),
+ /* 1765 E> */ B(Star), R(0),
+ /* 1777 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1782 E> */ B(LoadIC), R(1), U8(0), U8(251),
+ /* 1779 E> */ B(Star), R(0),
+ /* 1791 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1796 E> */ B(LoadIC), R(1), U8(0), U8(253),
+ /* 1793 E> */ B(Star), R(0),
+ /* 1805 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1810 E> */ B(LoadIC), R(1), U8(0), U8(255),
+ /* 1807 E> */ B(Star), R(0),
+ /* 1819 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1827 E> */ B(Wide), B(LoadIC), R16(1), U16(0), U16(257),
+ /* 1834 S> */ B(Return),
]
constant pool: [
"name",
@@ -922,652 +922,652 @@
parameter count: 3
bytecode array length: 1422
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(1),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(3),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(5),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(7),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(9),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(11),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(13),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(15),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(17),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(19),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(21),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(23),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(25),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(27),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(29),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(31),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(33),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(35),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(37),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(39),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(41),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(43),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(45),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(47),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(49),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(51),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(53),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(55),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(57),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(59),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(61),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(63),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(65),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(67),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(69),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(71),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(73),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(75),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(77),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(79),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(81),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(83),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(85),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(87),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(89),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(91),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(93),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(95),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(97),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(99),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(101),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(103),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(105),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(107),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(109),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(111),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(113),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(115),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(117),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(119),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(121),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(123),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(125),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(127),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(129),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(131),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(133),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(135),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(137),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(139),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(141),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(143),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(145),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(147),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(149),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(151),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(153),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(155),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(157),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(159),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(161),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(163),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(165),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(167),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(169),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(171),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(173),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(175),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(177),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(179),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(181),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(183),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(185),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(187),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(189),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(191),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(193),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(195),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(197),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(199),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(201),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(203),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(205),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(207),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(209),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(211),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(213),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(215),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(217),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(219),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(221),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(223),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(225),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(227),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(229),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(231),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(233),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(235),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(237),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(239),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(241),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(243),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(245),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(247),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(249),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(251),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(253),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(KeyedLoadIC), R(1), U8(255),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(Ldar), R(arg1),
- B(Wide), B(KeyedLoadIC), R16(1), U16(257),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 30 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 35 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(1),
+ /* 32 E> */ B(Star), R(0),
+ /* 42 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 47 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(3),
+ /* 44 E> */ B(Star), R(0),
+ /* 54 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 59 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(5),
+ /* 56 E> */ B(Star), R(0),
+ /* 66 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 71 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(7),
+ /* 68 E> */ B(Star), R(0),
+ /* 78 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 83 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(9),
+ /* 80 E> */ B(Star), R(0),
+ /* 90 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 95 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(11),
+ /* 92 E> */ B(Star), R(0),
+ /* 102 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 107 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(13),
+ /* 104 E> */ B(Star), R(0),
+ /* 114 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 119 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(15),
+ /* 116 E> */ B(Star), R(0),
+ /* 126 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 131 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(17),
+ /* 128 E> */ B(Star), R(0),
+ /* 138 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 143 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(19),
+ /* 140 E> */ B(Star), R(0),
+ /* 150 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 155 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(21),
+ /* 152 E> */ B(Star), R(0),
+ /* 162 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 167 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(23),
+ /* 164 E> */ B(Star), R(0),
+ /* 174 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 179 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(25),
+ /* 176 E> */ B(Star), R(0),
+ /* 186 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 191 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(27),
+ /* 188 E> */ B(Star), R(0),
+ /* 198 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 203 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(29),
+ /* 200 E> */ B(Star), R(0),
+ /* 210 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 215 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(31),
+ /* 212 E> */ B(Star), R(0),
+ /* 222 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 227 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(33),
+ /* 224 E> */ B(Star), R(0),
+ /* 234 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 239 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(35),
+ /* 236 E> */ B(Star), R(0),
+ /* 246 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 251 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(37),
+ /* 248 E> */ B(Star), R(0),
+ /* 258 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 263 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(39),
+ /* 260 E> */ B(Star), R(0),
+ /* 270 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 275 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(41),
+ /* 272 E> */ B(Star), R(0),
+ /* 282 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 287 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(43),
+ /* 284 E> */ B(Star), R(0),
+ /* 294 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 299 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(45),
+ /* 296 E> */ B(Star), R(0),
+ /* 306 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 311 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(47),
+ /* 308 E> */ B(Star), R(0),
+ /* 318 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 323 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(49),
+ /* 320 E> */ B(Star), R(0),
+ /* 330 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 335 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(51),
+ /* 332 E> */ B(Star), R(0),
+ /* 342 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 347 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(53),
+ /* 344 E> */ B(Star), R(0),
+ /* 354 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 359 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(55),
+ /* 356 E> */ B(Star), R(0),
+ /* 366 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 371 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(57),
+ /* 368 E> */ B(Star), R(0),
+ /* 378 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 383 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(59),
+ /* 380 E> */ B(Star), R(0),
+ /* 390 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 395 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(61),
+ /* 392 E> */ B(Star), R(0),
+ /* 402 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 407 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(63),
+ /* 404 E> */ B(Star), R(0),
+ /* 414 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 419 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(65),
+ /* 416 E> */ B(Star), R(0),
+ /* 426 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 431 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(67),
+ /* 428 E> */ B(Star), R(0),
+ /* 438 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 443 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(69),
+ /* 440 E> */ B(Star), R(0),
+ /* 450 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 455 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(71),
+ /* 452 E> */ B(Star), R(0),
+ /* 462 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 467 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(73),
+ /* 464 E> */ B(Star), R(0),
+ /* 474 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 479 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(75),
+ /* 476 E> */ B(Star), R(0),
+ /* 486 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 491 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(77),
+ /* 488 E> */ B(Star), R(0),
+ /* 498 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 503 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(79),
+ /* 500 E> */ B(Star), R(0),
+ /* 510 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 515 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(81),
+ /* 512 E> */ B(Star), R(0),
+ /* 522 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 527 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(83),
+ /* 524 E> */ B(Star), R(0),
+ /* 534 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 539 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(85),
+ /* 536 E> */ B(Star), R(0),
+ /* 546 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 551 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(87),
+ /* 548 E> */ B(Star), R(0),
+ /* 558 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 563 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(89),
+ /* 560 E> */ B(Star), R(0),
+ /* 570 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 575 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(91),
+ /* 572 E> */ B(Star), R(0),
+ /* 582 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 587 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(93),
+ /* 584 E> */ B(Star), R(0),
+ /* 594 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 599 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(95),
+ /* 596 E> */ B(Star), R(0),
+ /* 606 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 611 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(97),
+ /* 608 E> */ B(Star), R(0),
+ /* 618 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 623 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(99),
+ /* 620 E> */ B(Star), R(0),
+ /* 630 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 635 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(101),
+ /* 632 E> */ B(Star), R(0),
+ /* 642 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 647 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(103),
+ /* 644 E> */ B(Star), R(0),
+ /* 654 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 659 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(105),
+ /* 656 E> */ B(Star), R(0),
+ /* 666 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 671 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(107),
+ /* 668 E> */ B(Star), R(0),
+ /* 678 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 683 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(109),
+ /* 680 E> */ B(Star), R(0),
+ /* 690 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 695 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(111),
+ /* 692 E> */ B(Star), R(0),
+ /* 702 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 707 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(113),
+ /* 704 E> */ B(Star), R(0),
+ /* 714 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 719 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(115),
+ /* 716 E> */ B(Star), R(0),
+ /* 726 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 731 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(117),
+ /* 728 E> */ B(Star), R(0),
+ /* 738 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 743 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(119),
+ /* 740 E> */ B(Star), R(0),
+ /* 750 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 755 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(121),
+ /* 752 E> */ B(Star), R(0),
+ /* 762 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 767 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(123),
+ /* 764 E> */ B(Star), R(0),
+ /* 774 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 779 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(125),
+ /* 776 E> */ B(Star), R(0),
+ /* 786 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 791 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(127),
+ /* 788 E> */ B(Star), R(0),
+ /* 798 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 803 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(129),
+ /* 800 E> */ B(Star), R(0),
+ /* 810 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 815 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(131),
+ /* 812 E> */ B(Star), R(0),
+ /* 822 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 827 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(133),
+ /* 824 E> */ B(Star), R(0),
+ /* 834 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 839 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(135),
+ /* 836 E> */ B(Star), R(0),
+ /* 846 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 851 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(137),
+ /* 848 E> */ B(Star), R(0),
+ /* 858 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 863 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(139),
+ /* 860 E> */ B(Star), R(0),
+ /* 870 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 875 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(141),
+ /* 872 E> */ B(Star), R(0),
+ /* 882 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 887 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(143),
+ /* 884 E> */ B(Star), R(0),
+ /* 894 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 899 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(145),
+ /* 896 E> */ B(Star), R(0),
+ /* 906 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 911 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(147),
+ /* 908 E> */ B(Star), R(0),
+ /* 918 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 923 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(149),
+ /* 920 E> */ B(Star), R(0),
+ /* 930 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 935 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(151),
+ /* 932 E> */ B(Star), R(0),
+ /* 942 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 947 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(153),
+ /* 944 E> */ B(Star), R(0),
+ /* 954 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 959 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(155),
+ /* 956 E> */ B(Star), R(0),
+ /* 966 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 971 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(157),
+ /* 968 E> */ B(Star), R(0),
+ /* 978 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 983 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(159),
+ /* 980 E> */ B(Star), R(0),
+ /* 990 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 995 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(161),
+ /* 992 E> */ B(Star), R(0),
+ /* 1002 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1007 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(163),
+ /* 1004 E> */ B(Star), R(0),
+ /* 1014 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1019 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(165),
+ /* 1016 E> */ B(Star), R(0),
+ /* 1026 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1031 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(167),
+ /* 1028 E> */ B(Star), R(0),
+ /* 1038 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1043 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(169),
+ /* 1040 E> */ B(Star), R(0),
+ /* 1050 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1055 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(171),
+ /* 1052 E> */ B(Star), R(0),
+ /* 1062 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1067 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(173),
+ /* 1064 E> */ B(Star), R(0),
+ /* 1074 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1079 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(175),
+ /* 1076 E> */ B(Star), R(0),
+ /* 1086 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1091 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(177),
+ /* 1088 E> */ B(Star), R(0),
+ /* 1098 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1103 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(179),
+ /* 1100 E> */ B(Star), R(0),
+ /* 1110 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1115 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(181),
+ /* 1112 E> */ B(Star), R(0),
+ /* 1122 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1127 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(183),
+ /* 1124 E> */ B(Star), R(0),
+ /* 1134 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1139 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(185),
+ /* 1136 E> */ B(Star), R(0),
+ /* 1146 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1151 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(187),
+ /* 1148 E> */ B(Star), R(0),
+ /* 1158 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1163 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(189),
+ /* 1160 E> */ B(Star), R(0),
+ /* 1170 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1175 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(191),
+ /* 1172 E> */ B(Star), R(0),
+ /* 1182 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1187 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(193),
+ /* 1184 E> */ B(Star), R(0),
+ /* 1194 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1199 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(195),
+ /* 1196 E> */ B(Star), R(0),
+ /* 1206 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1211 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(197),
+ /* 1208 E> */ B(Star), R(0),
+ /* 1218 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1223 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(199),
+ /* 1220 E> */ B(Star), R(0),
+ /* 1230 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1235 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(201),
+ /* 1232 E> */ B(Star), R(0),
+ /* 1242 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1247 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(203),
+ /* 1244 E> */ B(Star), R(0),
+ /* 1254 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1259 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(205),
+ /* 1256 E> */ B(Star), R(0),
+ /* 1266 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1271 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(207),
+ /* 1268 E> */ B(Star), R(0),
+ /* 1278 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1283 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(209),
+ /* 1280 E> */ B(Star), R(0),
+ /* 1290 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1295 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(211),
+ /* 1292 E> */ B(Star), R(0),
+ /* 1302 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1307 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(213),
+ /* 1304 E> */ B(Star), R(0),
+ /* 1314 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1319 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(215),
+ /* 1316 E> */ B(Star), R(0),
+ /* 1326 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1331 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(217),
+ /* 1328 E> */ B(Star), R(0),
+ /* 1338 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1343 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(219),
+ /* 1340 E> */ B(Star), R(0),
+ /* 1350 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1355 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(221),
+ /* 1352 E> */ B(Star), R(0),
+ /* 1362 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1367 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(223),
+ /* 1364 E> */ B(Star), R(0),
+ /* 1374 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1379 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(225),
+ /* 1376 E> */ B(Star), R(0),
+ /* 1386 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1391 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(227),
+ /* 1388 E> */ B(Star), R(0),
+ /* 1398 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1403 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(229),
+ /* 1400 E> */ B(Star), R(0),
+ /* 1410 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1415 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(231),
+ /* 1412 E> */ B(Star), R(0),
+ /* 1422 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1427 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(233),
+ /* 1424 E> */ B(Star), R(0),
+ /* 1434 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1439 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(235),
+ /* 1436 E> */ B(Star), R(0),
+ /* 1446 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1451 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(237),
+ /* 1448 E> */ B(Star), R(0),
+ /* 1458 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1463 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(239),
+ /* 1460 E> */ B(Star), R(0),
+ /* 1470 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1475 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(241),
+ /* 1472 E> */ B(Star), R(0),
+ /* 1482 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1487 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(243),
+ /* 1484 E> */ B(Star), R(0),
+ /* 1494 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1499 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(245),
+ /* 1496 E> */ B(Star), R(0),
+ /* 1506 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1511 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(247),
+ /* 1508 E> */ B(Star), R(0),
+ /* 1518 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1523 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(249),
+ /* 1520 E> */ B(Star), R(0),
+ /* 1530 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1535 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(251),
+ /* 1532 E> */ B(Star), R(0),
+ /* 1542 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1547 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(253),
+ /* 1544 E> */ B(Star), R(0),
+ /* 1554 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1559 E> */ B(Ldar), R(arg1),
+ B(KeyedLoadIC), R(1), U8(255),
+ /* 1556 E> */ B(Star), R(0),
+ /* 1566 S> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 1574 E> */ B(Ldar), R(arg1),
+ B(Wide), B(KeyedLoadIC), R16(1), U16(257),
+ /* 1579 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden b/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
index 9e67a90..340aa43 100644
--- a/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
+++ b/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
@@ -17,13 +17,13 @@
parameter count: 2
bytecode array length: 13
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaConstant), U8(0),
- B(StoreICSloppy), R(0), U8(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaConstant), U8(0),
+ /* 23 E> */ B(StoreICSloppy), R(0), U8(1), U8(1),
+ B(LdaUndefined),
+ /* 32 S> */ B(Return),
]
constant pool: [
"val",
@@ -41,13 +41,13 @@
parameter count: 2
bytecode array length: 13
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaConstant), U8(0),
- B(StoreICSloppy), R(0), U8(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaConstant), U8(0),
+ /* 25 E> */ B(StoreICSloppy), R(0), U8(1), U8(1),
+ B(LdaUndefined),
+ /* 34 S> */ B(Return),
]
constant pool: [
"val",
@@ -65,15 +65,15 @@
parameter count: 2
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(100),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(KeyedStoreICSloppy), R(0), R(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(100),
+ B(Star), R(1),
+ B(LdaConstant), U8(0),
+ /* 23 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(1),
+ B(LdaUndefined),
+ /* 32 S> */ B(Return),
]
constant pool: [
"val",
@@ -90,15 +90,15 @@
parameter count: 3
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(KeyedStoreICSloppy), R(0), R(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 19 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 21 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaConstant), U8(0),
+ /* 24 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(1),
+ B(LdaUndefined),
+ /* 33 S> */ B(Return),
]
constant pool: [
"val",
@@ -115,16 +115,16 @@
parameter count: 2
bytecode array length: 20
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg0),
- B(Star), R(1),
- B(LdaSmi), U8(-124),
- B(KeyedLoadIC), R(1), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(3),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 16 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 25 E> */ B(Ldar), R(arg0),
+ B(Star), R(1),
+ /* 26 E> */ B(LdaSmi), U8(-124),
+ B(KeyedLoadIC), R(1), U8(1),
+ /* 23 E> */ B(StoreICSloppy), R(0), U8(0), U8(3),
+ B(LdaUndefined),
+ /* 34 S> */ B(Return),
]
constant pool: [
"name",
@@ -141,13 +141,13 @@
parameter count: 2
bytecode array length: 13
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaConstant), U8(0),
- B(StoreICStrict), R(0), U8(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 30 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaConstant), U8(0),
+ /* 37 E> */ B(StoreICStrict), R(0), U8(1), U8(1),
+ B(LdaUndefined),
+ /* 46 S> */ B(Return),
]
constant pool: [
"val",
@@ -165,15 +165,15 @@
parameter count: 3
bytecode array length: 17
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(KeyedStoreICStrict), R(0), R(1), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 33 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 35 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaConstant), U8(0),
+ /* 38 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(1),
+ B(LdaUndefined),
+ /* 47 S> */ B(Return),
]
constant pool: [
"val",
@@ -320,525 +320,525 @@
parameter count: 2
bytecode array length: 1297
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICSloppy), R(0), U8(0), U8(255),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Wide), B(StoreICSloppy), R16(0), U16(0), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 18 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 25 E> */ B(StoreICSloppy), R(0), U8(0), U8(1),
+ /* 32 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 39 E> */ B(StoreICSloppy), R(0), U8(0), U8(3),
+ /* 46 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 53 E> */ B(StoreICSloppy), R(0), U8(0), U8(5),
+ /* 60 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 67 E> */ B(StoreICSloppy), R(0), U8(0), U8(7),
+ /* 74 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 81 E> */ B(StoreICSloppy), R(0), U8(0), U8(9),
+ /* 88 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 95 E> */ B(StoreICSloppy), R(0), U8(0), U8(11),
+ /* 102 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 109 E> */ B(StoreICSloppy), R(0), U8(0), U8(13),
+ /* 116 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 123 E> */ B(StoreICSloppy), R(0), U8(0), U8(15),
+ /* 130 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 137 E> */ B(StoreICSloppy), R(0), U8(0), U8(17),
+ /* 144 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 151 E> */ B(StoreICSloppy), R(0), U8(0), U8(19),
+ /* 158 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 165 E> */ B(StoreICSloppy), R(0), U8(0), U8(21),
+ /* 172 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 179 E> */ B(StoreICSloppy), R(0), U8(0), U8(23),
+ /* 186 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 193 E> */ B(StoreICSloppy), R(0), U8(0), U8(25),
+ /* 200 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 207 E> */ B(StoreICSloppy), R(0), U8(0), U8(27),
+ /* 214 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 221 E> */ B(StoreICSloppy), R(0), U8(0), U8(29),
+ /* 228 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 235 E> */ B(StoreICSloppy), R(0), U8(0), U8(31),
+ /* 242 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 249 E> */ B(StoreICSloppy), R(0), U8(0), U8(33),
+ /* 256 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 263 E> */ B(StoreICSloppy), R(0), U8(0), U8(35),
+ /* 270 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 277 E> */ B(StoreICSloppy), R(0), U8(0), U8(37),
+ /* 284 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 291 E> */ B(StoreICSloppy), R(0), U8(0), U8(39),
+ /* 298 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 305 E> */ B(StoreICSloppy), R(0), U8(0), U8(41),
+ /* 312 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 319 E> */ B(StoreICSloppy), R(0), U8(0), U8(43),
+ /* 326 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 333 E> */ B(StoreICSloppy), R(0), U8(0), U8(45),
+ /* 340 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 347 E> */ B(StoreICSloppy), R(0), U8(0), U8(47),
+ /* 354 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 361 E> */ B(StoreICSloppy), R(0), U8(0), U8(49),
+ /* 368 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 375 E> */ B(StoreICSloppy), R(0), U8(0), U8(51),
+ /* 382 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 389 E> */ B(StoreICSloppy), R(0), U8(0), U8(53),
+ /* 396 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 403 E> */ B(StoreICSloppy), R(0), U8(0), U8(55),
+ /* 410 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 417 E> */ B(StoreICSloppy), R(0), U8(0), U8(57),
+ /* 424 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 431 E> */ B(StoreICSloppy), R(0), U8(0), U8(59),
+ /* 438 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 445 E> */ B(StoreICSloppy), R(0), U8(0), U8(61),
+ /* 452 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 459 E> */ B(StoreICSloppy), R(0), U8(0), U8(63),
+ /* 466 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 473 E> */ B(StoreICSloppy), R(0), U8(0), U8(65),
+ /* 480 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 487 E> */ B(StoreICSloppy), R(0), U8(0), U8(67),
+ /* 494 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 501 E> */ B(StoreICSloppy), R(0), U8(0), U8(69),
+ /* 508 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 515 E> */ B(StoreICSloppy), R(0), U8(0), U8(71),
+ /* 522 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 529 E> */ B(StoreICSloppy), R(0), U8(0), U8(73),
+ /* 536 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 543 E> */ B(StoreICSloppy), R(0), U8(0), U8(75),
+ /* 550 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 557 E> */ B(StoreICSloppy), R(0), U8(0), U8(77),
+ /* 564 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 571 E> */ B(StoreICSloppy), R(0), U8(0), U8(79),
+ /* 578 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 585 E> */ B(StoreICSloppy), R(0), U8(0), U8(81),
+ /* 592 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 599 E> */ B(StoreICSloppy), R(0), U8(0), U8(83),
+ /* 606 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 613 E> */ B(StoreICSloppy), R(0), U8(0), U8(85),
+ /* 620 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 627 E> */ B(StoreICSloppy), R(0), U8(0), U8(87),
+ /* 634 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 641 E> */ B(StoreICSloppy), R(0), U8(0), U8(89),
+ /* 648 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 655 E> */ B(StoreICSloppy), R(0), U8(0), U8(91),
+ /* 662 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 669 E> */ B(StoreICSloppy), R(0), U8(0), U8(93),
+ /* 676 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 683 E> */ B(StoreICSloppy), R(0), U8(0), U8(95),
+ /* 690 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 697 E> */ B(StoreICSloppy), R(0), U8(0), U8(97),
+ /* 704 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 711 E> */ B(StoreICSloppy), R(0), U8(0), U8(99),
+ /* 718 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 725 E> */ B(StoreICSloppy), R(0), U8(0), U8(101),
+ /* 732 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 739 E> */ B(StoreICSloppy), R(0), U8(0), U8(103),
+ /* 746 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 753 E> */ B(StoreICSloppy), R(0), U8(0), U8(105),
+ /* 760 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 767 E> */ B(StoreICSloppy), R(0), U8(0), U8(107),
+ /* 774 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 781 E> */ B(StoreICSloppy), R(0), U8(0), U8(109),
+ /* 788 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 795 E> */ B(StoreICSloppy), R(0), U8(0), U8(111),
+ /* 802 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 809 E> */ B(StoreICSloppy), R(0), U8(0), U8(113),
+ /* 816 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 823 E> */ B(StoreICSloppy), R(0), U8(0), U8(115),
+ /* 830 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 837 E> */ B(StoreICSloppy), R(0), U8(0), U8(117),
+ /* 844 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 851 E> */ B(StoreICSloppy), R(0), U8(0), U8(119),
+ /* 858 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 865 E> */ B(StoreICSloppy), R(0), U8(0), U8(121),
+ /* 872 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 879 E> */ B(StoreICSloppy), R(0), U8(0), U8(123),
+ /* 886 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 893 E> */ B(StoreICSloppy), R(0), U8(0), U8(125),
+ /* 900 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 907 E> */ B(StoreICSloppy), R(0), U8(0), U8(127),
+ /* 914 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 921 E> */ B(StoreICSloppy), R(0), U8(0), U8(129),
+ /* 928 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 935 E> */ B(StoreICSloppy), R(0), U8(0), U8(131),
+ /* 942 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 949 E> */ B(StoreICSloppy), R(0), U8(0), U8(133),
+ /* 956 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 963 E> */ B(StoreICSloppy), R(0), U8(0), U8(135),
+ /* 970 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 977 E> */ B(StoreICSloppy), R(0), U8(0), U8(137),
+ /* 984 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 991 E> */ B(StoreICSloppy), R(0), U8(0), U8(139),
+ /* 998 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1005 E> */ B(StoreICSloppy), R(0), U8(0), U8(141),
+ /* 1012 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1019 E> */ B(StoreICSloppy), R(0), U8(0), U8(143),
+ /* 1026 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1033 E> */ B(StoreICSloppy), R(0), U8(0), U8(145),
+ /* 1040 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1047 E> */ B(StoreICSloppy), R(0), U8(0), U8(147),
+ /* 1054 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1061 E> */ B(StoreICSloppy), R(0), U8(0), U8(149),
+ /* 1068 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1075 E> */ B(StoreICSloppy), R(0), U8(0), U8(151),
+ /* 1082 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1089 E> */ B(StoreICSloppy), R(0), U8(0), U8(153),
+ /* 1096 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1103 E> */ B(StoreICSloppy), R(0), U8(0), U8(155),
+ /* 1110 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1117 E> */ B(StoreICSloppy), R(0), U8(0), U8(157),
+ /* 1124 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1131 E> */ B(StoreICSloppy), R(0), U8(0), U8(159),
+ /* 1138 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1145 E> */ B(StoreICSloppy), R(0), U8(0), U8(161),
+ /* 1152 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1159 E> */ B(StoreICSloppy), R(0), U8(0), U8(163),
+ /* 1166 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1173 E> */ B(StoreICSloppy), R(0), U8(0), U8(165),
+ /* 1180 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1187 E> */ B(StoreICSloppy), R(0), U8(0), U8(167),
+ /* 1194 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1201 E> */ B(StoreICSloppy), R(0), U8(0), U8(169),
+ /* 1208 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1215 E> */ B(StoreICSloppy), R(0), U8(0), U8(171),
+ /* 1222 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1229 E> */ B(StoreICSloppy), R(0), U8(0), U8(173),
+ /* 1236 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1243 E> */ B(StoreICSloppy), R(0), U8(0), U8(175),
+ /* 1250 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1257 E> */ B(StoreICSloppy), R(0), U8(0), U8(177),
+ /* 1264 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1271 E> */ B(StoreICSloppy), R(0), U8(0), U8(179),
+ /* 1278 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1285 E> */ B(StoreICSloppy), R(0), U8(0), U8(181),
+ /* 1292 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1299 E> */ B(StoreICSloppy), R(0), U8(0), U8(183),
+ /* 1306 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1313 E> */ B(StoreICSloppy), R(0), U8(0), U8(185),
+ /* 1320 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1327 E> */ B(StoreICSloppy), R(0), U8(0), U8(187),
+ /* 1334 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1341 E> */ B(StoreICSloppy), R(0), U8(0), U8(189),
+ /* 1348 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1355 E> */ B(StoreICSloppy), R(0), U8(0), U8(191),
+ /* 1362 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1369 E> */ B(StoreICSloppy), R(0), U8(0), U8(193),
+ /* 1376 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1383 E> */ B(StoreICSloppy), R(0), U8(0), U8(195),
+ /* 1390 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1397 E> */ B(StoreICSloppy), R(0), U8(0), U8(197),
+ /* 1404 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1411 E> */ B(StoreICSloppy), R(0), U8(0), U8(199),
+ /* 1418 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1425 E> */ B(StoreICSloppy), R(0), U8(0), U8(201),
+ /* 1432 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1439 E> */ B(StoreICSloppy), R(0), U8(0), U8(203),
+ /* 1446 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1453 E> */ B(StoreICSloppy), R(0), U8(0), U8(205),
+ /* 1460 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1467 E> */ B(StoreICSloppy), R(0), U8(0), U8(207),
+ /* 1474 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1481 E> */ B(StoreICSloppy), R(0), U8(0), U8(209),
+ /* 1488 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1495 E> */ B(StoreICSloppy), R(0), U8(0), U8(211),
+ /* 1502 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1509 E> */ B(StoreICSloppy), R(0), U8(0), U8(213),
+ /* 1516 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1523 E> */ B(StoreICSloppy), R(0), U8(0), U8(215),
+ /* 1530 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1537 E> */ B(StoreICSloppy), R(0), U8(0), U8(217),
+ /* 1544 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1551 E> */ B(StoreICSloppy), R(0), U8(0), U8(219),
+ /* 1558 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1565 E> */ B(StoreICSloppy), R(0), U8(0), U8(221),
+ /* 1572 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1579 E> */ B(StoreICSloppy), R(0), U8(0), U8(223),
+ /* 1586 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1593 E> */ B(StoreICSloppy), R(0), U8(0), U8(225),
+ /* 1600 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1607 E> */ B(StoreICSloppy), R(0), U8(0), U8(227),
+ /* 1614 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1621 E> */ B(StoreICSloppy), R(0), U8(0), U8(229),
+ /* 1628 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1635 E> */ B(StoreICSloppy), R(0), U8(0), U8(231),
+ /* 1642 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1649 E> */ B(StoreICSloppy), R(0), U8(0), U8(233),
+ /* 1656 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1663 E> */ B(StoreICSloppy), R(0), U8(0), U8(235),
+ /* 1670 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1677 E> */ B(StoreICSloppy), R(0), U8(0), U8(237),
+ /* 1684 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1691 E> */ B(StoreICSloppy), R(0), U8(0), U8(239),
+ /* 1698 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1705 E> */ B(StoreICSloppy), R(0), U8(0), U8(241),
+ /* 1712 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1719 E> */ B(StoreICSloppy), R(0), U8(0), U8(243),
+ /* 1726 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1733 E> */ B(StoreICSloppy), R(0), U8(0), U8(245),
+ /* 1740 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1747 E> */ B(StoreICSloppy), R(0), U8(0), U8(247),
+ /* 1754 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1761 E> */ B(StoreICSloppy), R(0), U8(0), U8(249),
+ /* 1768 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1775 E> */ B(StoreICSloppy), R(0), U8(0), U8(251),
+ /* 1782 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1789 E> */ B(StoreICSloppy), R(0), U8(0), U8(253),
+ /* 1796 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1803 E> */ B(StoreICSloppy), R(0), U8(0), U8(255),
+ /* 1810 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(2),
+ /* 1817 E> */ B(Wide), B(StoreICSloppy), R16(0), U16(0), U16(257),
+ B(LdaUndefined),
+ /* 1822 S> */ B(Return),
]
constant pool: [
"name",
@@ -986,525 +986,525 @@
parameter count: 2
bytecode array length: 1297
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(1),
- B(StoreICStrict), R(0), U8(0), U8(255),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LdaSmi), U8(2),
- B(Wide), B(StoreICStrict), R16(0), U16(0), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 33 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 40 E> */ B(StoreICStrict), R(0), U8(0), U8(1),
+ /* 47 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 54 E> */ B(StoreICStrict), R(0), U8(0), U8(3),
+ /* 61 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 68 E> */ B(StoreICStrict), R(0), U8(0), U8(5),
+ /* 75 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 82 E> */ B(StoreICStrict), R(0), U8(0), U8(7),
+ /* 89 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 96 E> */ B(StoreICStrict), R(0), U8(0), U8(9),
+ /* 103 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 110 E> */ B(StoreICStrict), R(0), U8(0), U8(11),
+ /* 117 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 124 E> */ B(StoreICStrict), R(0), U8(0), U8(13),
+ /* 131 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 138 E> */ B(StoreICStrict), R(0), U8(0), U8(15),
+ /* 145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 152 E> */ B(StoreICStrict), R(0), U8(0), U8(17),
+ /* 159 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 166 E> */ B(StoreICStrict), R(0), U8(0), U8(19),
+ /* 173 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 180 E> */ B(StoreICStrict), R(0), U8(0), U8(21),
+ /* 187 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 194 E> */ B(StoreICStrict), R(0), U8(0), U8(23),
+ /* 201 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 208 E> */ B(StoreICStrict), R(0), U8(0), U8(25),
+ /* 215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 222 E> */ B(StoreICStrict), R(0), U8(0), U8(27),
+ /* 229 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 236 E> */ B(StoreICStrict), R(0), U8(0), U8(29),
+ /* 243 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 250 E> */ B(StoreICStrict), R(0), U8(0), U8(31),
+ /* 257 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 264 E> */ B(StoreICStrict), R(0), U8(0), U8(33),
+ /* 271 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 278 E> */ B(StoreICStrict), R(0), U8(0), U8(35),
+ /* 285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 292 E> */ B(StoreICStrict), R(0), U8(0), U8(37),
+ /* 299 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 306 E> */ B(StoreICStrict), R(0), U8(0), U8(39),
+ /* 313 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 320 E> */ B(StoreICStrict), R(0), U8(0), U8(41),
+ /* 327 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 334 E> */ B(StoreICStrict), R(0), U8(0), U8(43),
+ /* 341 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 348 E> */ B(StoreICStrict), R(0), U8(0), U8(45),
+ /* 355 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 362 E> */ B(StoreICStrict), R(0), U8(0), U8(47),
+ /* 369 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 376 E> */ B(StoreICStrict), R(0), U8(0), U8(49),
+ /* 383 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 390 E> */ B(StoreICStrict), R(0), U8(0), U8(51),
+ /* 397 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 404 E> */ B(StoreICStrict), R(0), U8(0), U8(53),
+ /* 411 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 418 E> */ B(StoreICStrict), R(0), U8(0), U8(55),
+ /* 425 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 432 E> */ B(StoreICStrict), R(0), U8(0), U8(57),
+ /* 439 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 446 E> */ B(StoreICStrict), R(0), U8(0), U8(59),
+ /* 453 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 460 E> */ B(StoreICStrict), R(0), U8(0), U8(61),
+ /* 467 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 474 E> */ B(StoreICStrict), R(0), U8(0), U8(63),
+ /* 481 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 488 E> */ B(StoreICStrict), R(0), U8(0), U8(65),
+ /* 495 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 502 E> */ B(StoreICStrict), R(0), U8(0), U8(67),
+ /* 509 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 516 E> */ B(StoreICStrict), R(0), U8(0), U8(69),
+ /* 523 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 530 E> */ B(StoreICStrict), R(0), U8(0), U8(71),
+ /* 537 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 544 E> */ B(StoreICStrict), R(0), U8(0), U8(73),
+ /* 551 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 558 E> */ B(StoreICStrict), R(0), U8(0), U8(75),
+ /* 565 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 572 E> */ B(StoreICStrict), R(0), U8(0), U8(77),
+ /* 579 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 586 E> */ B(StoreICStrict), R(0), U8(0), U8(79),
+ /* 593 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 600 E> */ B(StoreICStrict), R(0), U8(0), U8(81),
+ /* 607 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 614 E> */ B(StoreICStrict), R(0), U8(0), U8(83),
+ /* 621 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 628 E> */ B(StoreICStrict), R(0), U8(0), U8(85),
+ /* 635 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 642 E> */ B(StoreICStrict), R(0), U8(0), U8(87),
+ /* 649 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 656 E> */ B(StoreICStrict), R(0), U8(0), U8(89),
+ /* 663 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 670 E> */ B(StoreICStrict), R(0), U8(0), U8(91),
+ /* 677 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 684 E> */ B(StoreICStrict), R(0), U8(0), U8(93),
+ /* 691 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 698 E> */ B(StoreICStrict), R(0), U8(0), U8(95),
+ /* 705 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 712 E> */ B(StoreICStrict), R(0), U8(0), U8(97),
+ /* 719 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 726 E> */ B(StoreICStrict), R(0), U8(0), U8(99),
+ /* 733 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 740 E> */ B(StoreICStrict), R(0), U8(0), U8(101),
+ /* 747 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 754 E> */ B(StoreICStrict), R(0), U8(0), U8(103),
+ /* 761 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 768 E> */ B(StoreICStrict), R(0), U8(0), U8(105),
+ /* 775 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 782 E> */ B(StoreICStrict), R(0), U8(0), U8(107),
+ /* 789 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 796 E> */ B(StoreICStrict), R(0), U8(0), U8(109),
+ /* 803 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 810 E> */ B(StoreICStrict), R(0), U8(0), U8(111),
+ /* 817 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 824 E> */ B(StoreICStrict), R(0), U8(0), U8(113),
+ /* 831 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 838 E> */ B(StoreICStrict), R(0), U8(0), U8(115),
+ /* 845 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 852 E> */ B(StoreICStrict), R(0), U8(0), U8(117),
+ /* 859 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 866 E> */ B(StoreICStrict), R(0), U8(0), U8(119),
+ /* 873 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 880 E> */ B(StoreICStrict), R(0), U8(0), U8(121),
+ /* 887 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 894 E> */ B(StoreICStrict), R(0), U8(0), U8(123),
+ /* 901 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 908 E> */ B(StoreICStrict), R(0), U8(0), U8(125),
+ /* 915 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 922 E> */ B(StoreICStrict), R(0), U8(0), U8(127),
+ /* 929 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 936 E> */ B(StoreICStrict), R(0), U8(0), U8(129),
+ /* 943 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 950 E> */ B(StoreICStrict), R(0), U8(0), U8(131),
+ /* 957 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 964 E> */ B(StoreICStrict), R(0), U8(0), U8(133),
+ /* 971 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 978 E> */ B(StoreICStrict), R(0), U8(0), U8(135),
+ /* 985 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 992 E> */ B(StoreICStrict), R(0), U8(0), U8(137),
+ /* 999 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1006 E> */ B(StoreICStrict), R(0), U8(0), U8(139),
+ /* 1013 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1020 E> */ B(StoreICStrict), R(0), U8(0), U8(141),
+ /* 1027 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1034 E> */ B(StoreICStrict), R(0), U8(0), U8(143),
+ /* 1041 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1048 E> */ B(StoreICStrict), R(0), U8(0), U8(145),
+ /* 1055 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1062 E> */ B(StoreICStrict), R(0), U8(0), U8(147),
+ /* 1069 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1076 E> */ B(StoreICStrict), R(0), U8(0), U8(149),
+ /* 1083 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1090 E> */ B(StoreICStrict), R(0), U8(0), U8(151),
+ /* 1097 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1104 E> */ B(StoreICStrict), R(0), U8(0), U8(153),
+ /* 1111 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1118 E> */ B(StoreICStrict), R(0), U8(0), U8(155),
+ /* 1125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1132 E> */ B(StoreICStrict), R(0), U8(0), U8(157),
+ /* 1139 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1146 E> */ B(StoreICStrict), R(0), U8(0), U8(159),
+ /* 1153 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1160 E> */ B(StoreICStrict), R(0), U8(0), U8(161),
+ /* 1167 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1174 E> */ B(StoreICStrict), R(0), U8(0), U8(163),
+ /* 1181 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1188 E> */ B(StoreICStrict), R(0), U8(0), U8(165),
+ /* 1195 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1202 E> */ B(StoreICStrict), R(0), U8(0), U8(167),
+ /* 1209 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1216 E> */ B(StoreICStrict), R(0), U8(0), U8(169),
+ /* 1223 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1230 E> */ B(StoreICStrict), R(0), U8(0), U8(171),
+ /* 1237 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1244 E> */ B(StoreICStrict), R(0), U8(0), U8(173),
+ /* 1251 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1258 E> */ B(StoreICStrict), R(0), U8(0), U8(175),
+ /* 1265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1272 E> */ B(StoreICStrict), R(0), U8(0), U8(177),
+ /* 1279 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1286 E> */ B(StoreICStrict), R(0), U8(0), U8(179),
+ /* 1293 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1300 E> */ B(StoreICStrict), R(0), U8(0), U8(181),
+ /* 1307 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1314 E> */ B(StoreICStrict), R(0), U8(0), U8(183),
+ /* 1321 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1328 E> */ B(StoreICStrict), R(0), U8(0), U8(185),
+ /* 1335 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1342 E> */ B(StoreICStrict), R(0), U8(0), U8(187),
+ /* 1349 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1356 E> */ B(StoreICStrict), R(0), U8(0), U8(189),
+ /* 1363 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1370 E> */ B(StoreICStrict), R(0), U8(0), U8(191),
+ /* 1377 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1384 E> */ B(StoreICStrict), R(0), U8(0), U8(193),
+ /* 1391 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1398 E> */ B(StoreICStrict), R(0), U8(0), U8(195),
+ /* 1405 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1412 E> */ B(StoreICStrict), R(0), U8(0), U8(197),
+ /* 1419 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1426 E> */ B(StoreICStrict), R(0), U8(0), U8(199),
+ /* 1433 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1440 E> */ B(StoreICStrict), R(0), U8(0), U8(201),
+ /* 1447 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1454 E> */ B(StoreICStrict), R(0), U8(0), U8(203),
+ /* 1461 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1468 E> */ B(StoreICStrict), R(0), U8(0), U8(205),
+ /* 1475 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1482 E> */ B(StoreICStrict), R(0), U8(0), U8(207),
+ /* 1489 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1496 E> */ B(StoreICStrict), R(0), U8(0), U8(209),
+ /* 1503 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1510 E> */ B(StoreICStrict), R(0), U8(0), U8(211),
+ /* 1517 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1524 E> */ B(StoreICStrict), R(0), U8(0), U8(213),
+ /* 1531 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1538 E> */ B(StoreICStrict), R(0), U8(0), U8(215),
+ /* 1545 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1552 E> */ B(StoreICStrict), R(0), U8(0), U8(217),
+ /* 1559 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1566 E> */ B(StoreICStrict), R(0), U8(0), U8(219),
+ /* 1573 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1580 E> */ B(StoreICStrict), R(0), U8(0), U8(221),
+ /* 1587 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1594 E> */ B(StoreICStrict), R(0), U8(0), U8(223),
+ /* 1601 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1608 E> */ B(StoreICStrict), R(0), U8(0), U8(225),
+ /* 1615 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1622 E> */ B(StoreICStrict), R(0), U8(0), U8(227),
+ /* 1629 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1636 E> */ B(StoreICStrict), R(0), U8(0), U8(229),
+ /* 1643 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1650 E> */ B(StoreICStrict), R(0), U8(0), U8(231),
+ /* 1657 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1664 E> */ B(StoreICStrict), R(0), U8(0), U8(233),
+ /* 1671 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1678 E> */ B(StoreICStrict), R(0), U8(0), U8(235),
+ /* 1685 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1692 E> */ B(StoreICStrict), R(0), U8(0), U8(237),
+ /* 1699 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1706 E> */ B(StoreICStrict), R(0), U8(0), U8(239),
+ /* 1713 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1720 E> */ B(StoreICStrict), R(0), U8(0), U8(241),
+ /* 1727 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1734 E> */ B(StoreICStrict), R(0), U8(0), U8(243),
+ /* 1741 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1748 E> */ B(StoreICStrict), R(0), U8(0), U8(245),
+ /* 1755 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1762 E> */ B(StoreICStrict), R(0), U8(0), U8(247),
+ /* 1769 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1776 E> */ B(StoreICStrict), R(0), U8(0), U8(249),
+ /* 1783 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1790 E> */ B(StoreICStrict), R(0), U8(0), U8(251),
+ /* 1797 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1804 E> */ B(StoreICStrict), R(0), U8(0), U8(253),
+ /* 1811 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(1),
+ /* 1818 E> */ B(StoreICStrict), R(0), U8(0), U8(255),
+ /* 1825 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ B(LdaSmi), U8(2),
+ /* 1832 E> */ B(Wide), B(StoreICStrict), R16(0), U16(0), U16(257),
+ B(LdaUndefined),
+ /* 1837 S> */ B(Return),
]
constant pool: [
"name",
@@ -1651,783 +1651,783 @@
parameter count: 3
bytecode array length: 1813
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICSloppy), R(0), R(1), U8(255),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Wide), B(KeyedStoreICSloppy), R16(0), R16(1), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 21 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 23 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 26 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(1),
+ /* 33 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 35 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 38 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(3),
+ /* 45 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 47 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 50 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(5),
+ /* 57 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 59 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 62 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(7),
+ /* 69 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 71 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 74 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(9),
+ /* 81 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 83 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 86 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(11),
+ /* 93 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 95 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 98 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(13),
+ /* 105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 107 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 110 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(15),
+ /* 117 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 119 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 122 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(17),
+ /* 129 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 131 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 134 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(19),
+ /* 141 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 143 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 146 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(21),
+ /* 153 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 155 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 158 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(23),
+ /* 165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 167 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 170 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(25),
+ /* 177 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 179 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 182 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(27),
+ /* 189 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 191 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 194 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(29),
+ /* 201 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 203 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 206 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(31),
+ /* 213 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 215 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 218 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(33),
+ /* 225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 227 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 230 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(35),
+ /* 237 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 239 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 242 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(37),
+ /* 249 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 251 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 254 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(39),
+ /* 261 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 263 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 266 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(41),
+ /* 273 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 275 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 278 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(43),
+ /* 285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 287 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 290 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(45),
+ /* 297 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 299 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 302 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(47),
+ /* 309 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 311 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 314 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(49),
+ /* 321 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 323 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 326 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(51),
+ /* 333 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 335 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 338 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(53),
+ /* 345 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 347 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 350 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(55),
+ /* 357 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 359 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 362 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(57),
+ /* 369 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 371 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 374 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(59),
+ /* 381 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 383 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 386 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(61),
+ /* 393 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 395 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 398 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(63),
+ /* 405 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 407 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 410 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(65),
+ /* 417 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 419 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 422 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(67),
+ /* 429 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 431 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 434 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(69),
+ /* 441 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 443 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 446 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(71),
+ /* 453 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 455 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 458 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(73),
+ /* 465 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 467 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 470 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(75),
+ /* 477 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 479 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 482 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(77),
+ /* 489 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 491 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 494 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(79),
+ /* 501 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 503 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 506 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(81),
+ /* 513 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 515 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 518 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(83),
+ /* 525 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 527 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 530 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(85),
+ /* 537 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 539 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 542 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(87),
+ /* 549 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 551 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 554 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(89),
+ /* 561 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 563 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 566 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(91),
+ /* 573 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 575 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 578 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(93),
+ /* 585 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 587 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 590 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(95),
+ /* 597 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 599 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 602 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(97),
+ /* 609 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 611 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 614 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(99),
+ /* 621 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 623 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 626 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(101),
+ /* 633 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 635 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 638 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(103),
+ /* 645 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 647 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 650 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(105),
+ /* 657 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 659 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 662 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(107),
+ /* 669 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 671 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 674 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(109),
+ /* 681 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 683 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 686 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(111),
+ /* 693 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 695 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 698 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(113),
+ /* 705 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 707 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 710 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(115),
+ /* 717 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 719 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 722 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(117),
+ /* 729 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 731 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 734 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(119),
+ /* 741 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 743 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 746 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(121),
+ /* 753 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 755 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 758 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(123),
+ /* 765 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 767 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 770 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(125),
+ /* 777 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 779 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 782 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(127),
+ /* 789 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 791 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 794 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(129),
+ /* 801 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 803 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 806 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(131),
+ /* 813 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 815 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 818 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(133),
+ /* 825 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 827 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 830 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(135),
+ /* 837 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 839 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 842 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(137),
+ /* 849 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 851 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 854 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(139),
+ /* 861 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 863 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 866 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(141),
+ /* 873 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 875 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 878 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(143),
+ /* 885 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 887 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 890 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(145),
+ /* 897 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 899 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 902 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(147),
+ /* 909 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 911 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 914 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(149),
+ /* 921 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 923 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 926 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(151),
+ /* 933 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 935 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 938 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(153),
+ /* 945 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 947 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 950 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(155),
+ /* 957 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 959 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 962 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(157),
+ /* 969 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 971 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 974 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(159),
+ /* 981 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 983 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 986 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(161),
+ /* 993 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 995 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 998 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(163),
+ /* 1005 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1007 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1010 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(165),
+ /* 1017 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1019 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1022 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(167),
+ /* 1029 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1031 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1034 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(169),
+ /* 1041 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1043 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1046 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(171),
+ /* 1053 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1055 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1058 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(173),
+ /* 1065 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1067 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1070 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(175),
+ /* 1077 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1079 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1082 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(177),
+ /* 1089 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1091 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1094 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(179),
+ /* 1101 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1103 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1106 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(181),
+ /* 1113 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1115 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1118 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(183),
+ /* 1125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1127 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1130 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(185),
+ /* 1137 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1139 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1142 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(187),
+ /* 1149 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1151 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1154 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(189),
+ /* 1161 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1163 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1166 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(191),
+ /* 1173 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1175 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1178 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(193),
+ /* 1185 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1187 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1190 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(195),
+ /* 1197 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1199 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1202 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(197),
+ /* 1209 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1211 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1214 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(199),
+ /* 1221 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1223 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1226 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(201),
+ /* 1233 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1235 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1238 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(203),
+ /* 1245 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1247 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1250 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(205),
+ /* 1257 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1259 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1262 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(207),
+ /* 1269 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1271 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1274 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(209),
+ /* 1281 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1283 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1286 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(211),
+ /* 1293 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1295 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1298 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(213),
+ /* 1305 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1307 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1310 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(215),
+ /* 1317 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1319 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1322 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(217),
+ /* 1329 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1331 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1334 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(219),
+ /* 1341 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1343 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1346 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(221),
+ /* 1353 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1355 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1358 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(223),
+ /* 1365 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1367 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1370 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(225),
+ /* 1377 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1379 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1382 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(227),
+ /* 1389 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1391 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1394 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(229),
+ /* 1401 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1403 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1406 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(231),
+ /* 1413 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1415 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1418 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(233),
+ /* 1425 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1427 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1430 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(235),
+ /* 1437 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1439 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1442 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(237),
+ /* 1449 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1451 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1454 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(239),
+ /* 1461 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1463 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1466 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(241),
+ /* 1473 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1475 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1478 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(243),
+ /* 1485 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1487 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1490 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(245),
+ /* 1497 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1499 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1502 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(247),
+ /* 1509 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1511 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1514 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(249),
+ /* 1521 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1523 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1526 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(251),
+ /* 1533 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1535 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1538 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(253),
+ /* 1545 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1547 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1550 E> */ B(KeyedStoreICSloppy), R(0), R(1), U8(255),
+ /* 1557 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1559 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 1562 E> */ B(Wide), B(KeyedStoreICSloppy), R16(0), R16(1), U16(257),
+ B(LdaUndefined),
+ /* 1567 S> */ B(Return),
]
constant pool: [
]
@@ -2574,783 +2574,783 @@
parameter count: 3
bytecode array length: 1813
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(KeyedStoreICStrict), R(0), R(1), U8(255),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(Ldar), R(arg1),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Wide), B(KeyedStoreICStrict), R16(0), R16(1), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 37 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 39 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 42 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(1),
+ /* 49 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 51 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 54 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(3),
+ /* 61 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 63 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 66 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(5),
+ /* 73 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 75 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 78 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(7),
+ /* 85 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 87 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 90 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(9),
+ /* 97 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 99 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 102 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(11),
+ /* 109 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 111 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 114 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(13),
+ /* 121 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 123 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 126 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(15),
+ /* 133 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 135 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 138 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(17),
+ /* 145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 147 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 150 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(19),
+ /* 157 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 159 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 162 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(21),
+ /* 169 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 171 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 174 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(23),
+ /* 181 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 183 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 186 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(25),
+ /* 193 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 195 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 198 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(27),
+ /* 205 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 207 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 210 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(29),
+ /* 217 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 219 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 222 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(31),
+ /* 229 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 231 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 234 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(33),
+ /* 241 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 243 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 246 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(35),
+ /* 253 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 255 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 258 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(37),
+ /* 265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 267 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 270 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(39),
+ /* 277 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 279 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 282 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(41),
+ /* 289 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 291 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 294 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(43),
+ /* 301 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 303 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 306 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(45),
+ /* 313 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 315 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 318 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(47),
+ /* 325 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 327 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 330 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(49),
+ /* 337 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 339 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 342 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(51),
+ /* 349 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 351 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 354 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(53),
+ /* 361 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 363 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 366 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(55),
+ /* 373 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 375 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 378 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(57),
+ /* 385 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 387 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 390 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(59),
+ /* 397 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 399 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 402 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(61),
+ /* 409 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 411 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 414 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(63),
+ /* 421 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 423 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 426 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(65),
+ /* 433 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 435 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 438 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(67),
+ /* 445 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 447 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 450 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(69),
+ /* 457 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 459 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 462 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(71),
+ /* 469 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 471 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 474 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(73),
+ /* 481 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 483 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 486 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(75),
+ /* 493 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 495 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 498 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(77),
+ /* 505 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 507 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 510 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(79),
+ /* 517 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 519 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 522 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(81),
+ /* 529 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 531 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 534 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(83),
+ /* 541 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 543 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 546 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(85),
+ /* 553 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 555 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 558 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(87),
+ /* 565 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 567 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 570 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(89),
+ /* 577 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 579 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 582 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(91),
+ /* 589 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 591 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 594 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(93),
+ /* 601 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 603 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 606 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(95),
+ /* 613 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 615 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 618 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(97),
+ /* 625 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 627 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 630 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(99),
+ /* 637 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 639 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 642 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(101),
+ /* 649 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 651 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 654 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(103),
+ /* 661 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 663 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 666 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(105),
+ /* 673 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 675 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 678 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(107),
+ /* 685 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 687 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 690 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(109),
+ /* 697 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 699 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 702 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(111),
+ /* 709 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 711 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 714 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(113),
+ /* 721 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 723 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 726 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(115),
+ /* 733 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 735 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 738 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(117),
+ /* 745 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 747 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 750 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(119),
+ /* 757 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 759 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 762 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(121),
+ /* 769 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 771 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 774 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(123),
+ /* 781 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 783 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 786 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(125),
+ /* 793 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 795 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 798 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(127),
+ /* 805 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 807 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 810 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(129),
+ /* 817 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 819 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 822 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(131),
+ /* 829 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 831 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 834 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(133),
+ /* 841 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 843 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 846 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(135),
+ /* 853 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 855 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 858 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(137),
+ /* 865 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 867 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 870 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(139),
+ /* 877 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 879 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 882 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(141),
+ /* 889 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 891 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 894 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(143),
+ /* 901 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 903 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 906 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(145),
+ /* 913 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 915 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 918 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(147),
+ /* 925 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 927 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 930 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(149),
+ /* 937 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 939 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 942 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(151),
+ /* 949 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 951 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 954 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(153),
+ /* 961 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 963 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 966 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(155),
+ /* 973 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 975 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 978 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(157),
+ /* 985 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 987 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 990 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(159),
+ /* 997 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 999 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1002 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(161),
+ /* 1009 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1011 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1014 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(163),
+ /* 1021 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1023 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1026 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(165),
+ /* 1033 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1035 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1038 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(167),
+ /* 1045 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1047 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1050 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(169),
+ /* 1057 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1059 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1062 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(171),
+ /* 1069 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1071 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1074 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(173),
+ /* 1081 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1083 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1086 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(175),
+ /* 1093 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1095 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1098 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(177),
+ /* 1105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1107 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1110 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(179),
+ /* 1117 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1119 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1122 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(181),
+ /* 1129 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1131 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1134 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(183),
+ /* 1141 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1143 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1146 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(185),
+ /* 1153 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1155 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1158 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(187),
+ /* 1165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1167 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1170 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(189),
+ /* 1177 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1179 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1182 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(191),
+ /* 1189 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1191 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1194 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(193),
+ /* 1201 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1203 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1206 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(195),
+ /* 1213 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1215 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1218 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(197),
+ /* 1225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1227 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1230 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(199),
+ /* 1237 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1239 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1242 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(201),
+ /* 1249 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1251 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1254 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(203),
+ /* 1261 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1263 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1266 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(205),
+ /* 1273 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1275 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1278 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(207),
+ /* 1285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1287 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1290 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(209),
+ /* 1297 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1299 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1302 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(211),
+ /* 1309 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1311 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1314 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(213),
+ /* 1321 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1323 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1326 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(215),
+ /* 1333 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1335 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1338 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(217),
+ /* 1345 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1347 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1350 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(219),
+ /* 1357 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1359 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1362 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(221),
+ /* 1369 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1371 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1374 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(223),
+ /* 1381 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1383 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1386 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(225),
+ /* 1393 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1395 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1398 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(227),
+ /* 1405 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1407 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1410 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(229),
+ /* 1417 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1419 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1422 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(231),
+ /* 1429 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1431 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1434 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(233),
+ /* 1441 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1443 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1446 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(235),
+ /* 1453 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1455 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1458 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(237),
+ /* 1465 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1467 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1470 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(239),
+ /* 1477 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1479 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1482 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(241),
+ /* 1489 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1491 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1494 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(243),
+ /* 1501 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1503 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1506 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(245),
+ /* 1513 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1515 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1518 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(247),
+ /* 1525 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1527 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1530 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(249),
+ /* 1537 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1539 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1542 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(251),
+ /* 1549 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1551 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1554 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(253),
+ /* 1561 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1563 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ /* 1566 E> */ B(KeyedStoreICStrict), R(0), R(1), U8(255),
+ /* 1573 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1575 E> */ B(Ldar), R(arg1),
+ B(Star), R(1),
+ B(LdaSmi), U8(2),
+ /* 1578 E> */ B(Wide), B(KeyedStoreICStrict), R16(0), R16(1), U16(257),
+ B(LdaUndefined),
+ /* 1583 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden b/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
index adffb75..01ae49c 100644
--- a/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(CreateRegExpLiteral), U8(0), U8(0), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(0), U8(0),
+ /* 49 S> */ B(Return),
]
constant pool: [
"ab+d",
@@ -33,9 +33,9 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(CreateRegExpLiteral), U8(0), U8(0), U8(2),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(0), U8(2),
+ /* 58 S> */ B(Return),
]
constant pool: [
"(\x5cw+)\x5cs(\x5cw+)",
@@ -51,15 +51,15 @@
parameter count: 1
bytecode array length: 23
bytecodes: [
- B(StackCheck),
- B(CreateRegExpLiteral), U8(0), U8(0), U8(0),
- B(Star), R(1),
- B(LoadIC), R(1), U8(1), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(2),
- B(Call), R(0), R(1), U8(2), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(0), U8(0),
+ B(Star), R(1),
+ /* 47 E> */ B(LoadIC), R(1), U8(1), U8(3),
+ B(Star), R(0),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ /* 48 E> */ B(Call), R(0), R(1), U8(2), U8(1),
+ /* 62 S> */ B(Return),
]
constant pool: [
"ab+d",
diff --git a/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden b/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
index d6fb160..a8345a6 100644
--- a/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
+++ b/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
@@ -272,521 +272,521 @@
parameter count: 1
bytecode array length: 1033
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Star), R(0),
- B(LdaConstant), U8(2),
- B(Star), R(0),
- B(LdaConstant), U8(3),
- B(Star), R(0),
- B(LdaConstant), U8(4),
- B(Star), R(0),
- B(LdaConstant), U8(5),
- B(Star), R(0),
- B(LdaConstant), U8(6),
- B(Star), R(0),
- B(LdaConstant), U8(7),
- B(Star), R(0),
- B(LdaConstant), U8(8),
- B(Star), R(0),
- B(LdaConstant), U8(9),
- B(Star), R(0),
- B(LdaConstant), U8(10),
- B(Star), R(0),
- B(LdaConstant), U8(11),
- B(Star), R(0),
- B(LdaConstant), U8(12),
- B(Star), R(0),
- B(LdaConstant), U8(13),
- B(Star), R(0),
- B(LdaConstant), U8(14),
- B(Star), R(0),
- B(LdaConstant), U8(15),
- B(Star), R(0),
- B(LdaConstant), U8(16),
- B(Star), R(0),
- B(LdaConstant), U8(17),
- B(Star), R(0),
- B(LdaConstant), U8(18),
- B(Star), R(0),
- B(LdaConstant), U8(19),
- B(Star), R(0),
- B(LdaConstant), U8(20),
- B(Star), R(0),
- B(LdaConstant), U8(21),
- B(Star), R(0),
- B(LdaConstant), U8(22),
- B(Star), R(0),
- B(LdaConstant), U8(23),
- B(Star), R(0),
- B(LdaConstant), U8(24),
- B(Star), R(0),
- B(LdaConstant), U8(25),
- B(Star), R(0),
- B(LdaConstant), U8(26),
- B(Star), R(0),
- B(LdaConstant), U8(27),
- B(Star), R(0),
- B(LdaConstant), U8(28),
- B(Star), R(0),
- B(LdaConstant), U8(29),
- B(Star), R(0),
- B(LdaConstant), U8(30),
- B(Star), R(0),
- B(LdaConstant), U8(31),
- B(Star), R(0),
- B(LdaConstant), U8(32),
- B(Star), R(0),
- B(LdaConstant), U8(33),
- B(Star), R(0),
- B(LdaConstant), U8(34),
- B(Star), R(0),
- B(LdaConstant), U8(35),
- B(Star), R(0),
- B(LdaConstant), U8(36),
- B(Star), R(0),
- B(LdaConstant), U8(37),
- B(Star), R(0),
- B(LdaConstant), U8(38),
- B(Star), R(0),
- B(LdaConstant), U8(39),
- B(Star), R(0),
- B(LdaConstant), U8(40),
- B(Star), R(0),
- B(LdaConstant), U8(41),
- B(Star), R(0),
- B(LdaConstant), U8(42),
- B(Star), R(0),
- B(LdaConstant), U8(43),
- B(Star), R(0),
- B(LdaConstant), U8(44),
- B(Star), R(0),
- B(LdaConstant), U8(45),
- B(Star), R(0),
- B(LdaConstant), U8(46),
- B(Star), R(0),
- B(LdaConstant), U8(47),
- B(Star), R(0),
- B(LdaConstant), U8(48),
- B(Star), R(0),
- B(LdaConstant), U8(49),
- B(Star), R(0),
- B(LdaConstant), U8(50),
- B(Star), R(0),
- B(LdaConstant), U8(51),
- B(Star), R(0),
- B(LdaConstant), U8(52),
- B(Star), R(0),
- B(LdaConstant), U8(53),
- B(Star), R(0),
- B(LdaConstant), U8(54),
- B(Star), R(0),
- B(LdaConstant), U8(55),
- B(Star), R(0),
- B(LdaConstant), U8(56),
- B(Star), R(0),
- B(LdaConstant), U8(57),
- B(Star), R(0),
- B(LdaConstant), U8(58),
- B(Star), R(0),
- B(LdaConstant), U8(59),
- B(Star), R(0),
- B(LdaConstant), U8(60),
- B(Star), R(0),
- B(LdaConstant), U8(61),
- B(Star), R(0),
- B(LdaConstant), U8(62),
- B(Star), R(0),
- B(LdaConstant), U8(63),
- B(Star), R(0),
- B(LdaConstant), U8(64),
- B(Star), R(0),
- B(LdaConstant), U8(65),
- B(Star), R(0),
- B(LdaConstant), U8(66),
- B(Star), R(0),
- B(LdaConstant), U8(67),
- B(Star), R(0),
- B(LdaConstant), U8(68),
- B(Star), R(0),
- B(LdaConstant), U8(69),
- B(Star), R(0),
- B(LdaConstant), U8(70),
- B(Star), R(0),
- B(LdaConstant), U8(71),
- B(Star), R(0),
- B(LdaConstant), U8(72),
- B(Star), R(0),
- B(LdaConstant), U8(73),
- B(Star), R(0),
- B(LdaConstant), U8(74),
- B(Star), R(0),
- B(LdaConstant), U8(75),
- B(Star), R(0),
- B(LdaConstant), U8(76),
- B(Star), R(0),
- B(LdaConstant), U8(77),
- B(Star), R(0),
- B(LdaConstant), U8(78),
- B(Star), R(0),
- B(LdaConstant), U8(79),
- B(Star), R(0),
- B(LdaConstant), U8(80),
- B(Star), R(0),
- B(LdaConstant), U8(81),
- B(Star), R(0),
- B(LdaConstant), U8(82),
- B(Star), R(0),
- B(LdaConstant), U8(83),
- B(Star), R(0),
- B(LdaConstant), U8(84),
- B(Star), R(0),
- B(LdaConstant), U8(85),
- B(Star), R(0),
- B(LdaConstant), U8(86),
- B(Star), R(0),
- B(LdaConstant), U8(87),
- B(Star), R(0),
- B(LdaConstant), U8(88),
- B(Star), R(0),
- B(LdaConstant), U8(89),
- B(Star), R(0),
- B(LdaConstant), U8(90),
- B(Star), R(0),
- B(LdaConstant), U8(91),
- B(Star), R(0),
- B(LdaConstant), U8(92),
- B(Star), R(0),
- B(LdaConstant), U8(93),
- B(Star), R(0),
- B(LdaConstant), U8(94),
- B(Star), R(0),
- B(LdaConstant), U8(95),
- B(Star), R(0),
- B(LdaConstant), U8(96),
- B(Star), R(0),
- B(LdaConstant), U8(97),
- B(Star), R(0),
- B(LdaConstant), U8(98),
- B(Star), R(0),
- B(LdaConstant), U8(99),
- B(Star), R(0),
- B(LdaConstant), U8(100),
- B(Star), R(0),
- B(LdaConstant), U8(101),
- B(Star), R(0),
- B(LdaConstant), U8(102),
- B(Star), R(0),
- B(LdaConstant), U8(103),
- B(Star), R(0),
- B(LdaConstant), U8(104),
- B(Star), R(0),
- B(LdaConstant), U8(105),
- B(Star), R(0),
- B(LdaConstant), U8(106),
- B(Star), R(0),
- B(LdaConstant), U8(107),
- B(Star), R(0),
- B(LdaConstant), U8(108),
- B(Star), R(0),
- B(LdaConstant), U8(109),
- B(Star), R(0),
- B(LdaConstant), U8(110),
- B(Star), R(0),
- B(LdaConstant), U8(111),
- B(Star), R(0),
- B(LdaConstant), U8(112),
- B(Star), R(0),
- B(LdaConstant), U8(113),
- B(Star), R(0),
- B(LdaConstant), U8(114),
- B(Star), R(0),
- B(LdaConstant), U8(115),
- B(Star), R(0),
- B(LdaConstant), U8(116),
- B(Star), R(0),
- B(LdaConstant), U8(117),
- B(Star), R(0),
- B(LdaConstant), U8(118),
- B(Star), R(0),
- B(LdaConstant), U8(119),
- B(Star), R(0),
- B(LdaConstant), U8(120),
- B(Star), R(0),
- B(LdaConstant), U8(121),
- B(Star), R(0),
- B(LdaConstant), U8(122),
- B(Star), R(0),
- B(LdaConstant), U8(123),
- B(Star), R(0),
- B(LdaConstant), U8(124),
- B(Star), R(0),
- B(LdaConstant), U8(125),
- B(Star), R(0),
- B(LdaConstant), U8(126),
- B(Star), R(0),
- B(LdaConstant), U8(127),
- B(Star), R(0),
- B(LdaConstant), U8(128),
- B(Star), R(0),
- B(LdaConstant), U8(129),
- B(Star), R(0),
- B(LdaConstant), U8(130),
- B(Star), R(0),
- B(LdaConstant), U8(131),
- B(Star), R(0),
- B(LdaConstant), U8(132),
- B(Star), R(0),
- B(LdaConstant), U8(133),
- B(Star), R(0),
- B(LdaConstant), U8(134),
- B(Star), R(0),
- B(LdaConstant), U8(135),
- B(Star), R(0),
- B(LdaConstant), U8(136),
- B(Star), R(0),
- B(LdaConstant), U8(137),
- B(Star), R(0),
- B(LdaConstant), U8(138),
- B(Star), R(0),
- B(LdaConstant), U8(139),
- B(Star), R(0),
- B(LdaConstant), U8(140),
- B(Star), R(0),
- B(LdaConstant), U8(141),
- B(Star), R(0),
- B(LdaConstant), U8(142),
- B(Star), R(0),
- B(LdaConstant), U8(143),
- B(Star), R(0),
- B(LdaConstant), U8(144),
- B(Star), R(0),
- B(LdaConstant), U8(145),
- B(Star), R(0),
- B(LdaConstant), U8(146),
- B(Star), R(0),
- B(LdaConstant), U8(147),
- B(Star), R(0),
- B(LdaConstant), U8(148),
- B(Star), R(0),
- B(LdaConstant), U8(149),
- B(Star), R(0),
- B(LdaConstant), U8(150),
- B(Star), R(0),
- B(LdaConstant), U8(151),
- B(Star), R(0),
- B(LdaConstant), U8(152),
- B(Star), R(0),
- B(LdaConstant), U8(153),
- B(Star), R(0),
- B(LdaConstant), U8(154),
- B(Star), R(0),
- B(LdaConstant), U8(155),
- B(Star), R(0),
- B(LdaConstant), U8(156),
- B(Star), R(0),
- B(LdaConstant), U8(157),
- B(Star), R(0),
- B(LdaConstant), U8(158),
- B(Star), R(0),
- B(LdaConstant), U8(159),
- B(Star), R(0),
- B(LdaConstant), U8(160),
- B(Star), R(0),
- B(LdaConstant), U8(161),
- B(Star), R(0),
- B(LdaConstant), U8(162),
- B(Star), R(0),
- B(LdaConstant), U8(163),
- B(Star), R(0),
- B(LdaConstant), U8(164),
- B(Star), R(0),
- B(LdaConstant), U8(165),
- B(Star), R(0),
- B(LdaConstant), U8(166),
- B(Star), R(0),
- B(LdaConstant), U8(167),
- B(Star), R(0),
- B(LdaConstant), U8(168),
- B(Star), R(0),
- B(LdaConstant), U8(169),
- B(Star), R(0),
- B(LdaConstant), U8(170),
- B(Star), R(0),
- B(LdaConstant), U8(171),
- B(Star), R(0),
- B(LdaConstant), U8(172),
- B(Star), R(0),
- B(LdaConstant), U8(173),
- B(Star), R(0),
- B(LdaConstant), U8(174),
- B(Star), R(0),
- B(LdaConstant), U8(175),
- B(Star), R(0),
- B(LdaConstant), U8(176),
- B(Star), R(0),
- B(LdaConstant), U8(177),
- B(Star), R(0),
- B(LdaConstant), U8(178),
- B(Star), R(0),
- B(LdaConstant), U8(179),
- B(Star), R(0),
- B(LdaConstant), U8(180),
- B(Star), R(0),
- B(LdaConstant), U8(181),
- B(Star), R(0),
- B(LdaConstant), U8(182),
- B(Star), R(0),
- B(LdaConstant), U8(183),
- B(Star), R(0),
- B(LdaConstant), U8(184),
- B(Star), R(0),
- B(LdaConstant), U8(185),
- B(Star), R(0),
- B(LdaConstant), U8(186),
- B(Star), R(0),
- B(LdaConstant), U8(187),
- B(Star), R(0),
- B(LdaConstant), U8(188),
- B(Star), R(0),
- B(LdaConstant), U8(189),
- B(Star), R(0),
- B(LdaConstant), U8(190),
- B(Star), R(0),
- B(LdaConstant), U8(191),
- B(Star), R(0),
- B(LdaConstant), U8(192),
- B(Star), R(0),
- B(LdaConstant), U8(193),
- B(Star), R(0),
- B(LdaConstant), U8(194),
- B(Star), R(0),
- B(LdaConstant), U8(195),
- B(Star), R(0),
- B(LdaConstant), U8(196),
- B(Star), R(0),
- B(LdaConstant), U8(197),
- B(Star), R(0),
- B(LdaConstant), U8(198),
- B(Star), R(0),
- B(LdaConstant), U8(199),
- B(Star), R(0),
- B(LdaConstant), U8(200),
- B(Star), R(0),
- B(LdaConstant), U8(201),
- B(Star), R(0),
- B(LdaConstant), U8(202),
- B(Star), R(0),
- B(LdaConstant), U8(203),
- B(Star), R(0),
- B(LdaConstant), U8(204),
- B(Star), R(0),
- B(LdaConstant), U8(205),
- B(Star), R(0),
- B(LdaConstant), U8(206),
- B(Star), R(0),
- B(LdaConstant), U8(207),
- B(Star), R(0),
- B(LdaConstant), U8(208),
- B(Star), R(0),
- B(LdaConstant), U8(209),
- B(Star), R(0),
- B(LdaConstant), U8(210),
- B(Star), R(0),
- B(LdaConstant), U8(211),
- B(Star), R(0),
- B(LdaConstant), U8(212),
- B(Star), R(0),
- B(LdaConstant), U8(213),
- B(Star), R(0),
- B(LdaConstant), U8(214),
- B(Star), R(0),
- B(LdaConstant), U8(215),
- B(Star), R(0),
- B(LdaConstant), U8(216),
- B(Star), R(0),
- B(LdaConstant), U8(217),
- B(Star), R(0),
- B(LdaConstant), U8(218),
- B(Star), R(0),
- B(LdaConstant), U8(219),
- B(Star), R(0),
- B(LdaConstant), U8(220),
- B(Star), R(0),
- B(LdaConstant), U8(221),
- B(Star), R(0),
- B(LdaConstant), U8(222),
- B(Star), R(0),
- B(LdaConstant), U8(223),
- B(Star), R(0),
- B(LdaConstant), U8(224),
- B(Star), R(0),
- B(LdaConstant), U8(225),
- B(Star), R(0),
- B(LdaConstant), U8(226),
- B(Star), R(0),
- B(LdaConstant), U8(227),
- B(Star), R(0),
- B(LdaConstant), U8(228),
- B(Star), R(0),
- B(LdaConstant), U8(229),
- B(Star), R(0),
- B(LdaConstant), U8(230),
- B(Star), R(0),
- B(LdaConstant), U8(231),
- B(Star), R(0),
- B(LdaConstant), U8(232),
- B(Star), R(0),
- B(LdaConstant), U8(233),
- B(Star), R(0),
- B(LdaConstant), U8(234),
- B(Star), R(0),
- B(LdaConstant), U8(235),
- B(Star), R(0),
- B(LdaConstant), U8(236),
- B(Star), R(0),
- B(LdaConstant), U8(237),
- B(Star), R(0),
- B(LdaConstant), U8(238),
- B(Star), R(0),
- B(LdaConstant), U8(239),
- B(Star), R(0),
- B(LdaConstant), U8(240),
- B(Star), R(0),
- B(LdaConstant), U8(241),
- B(Star), R(0),
- B(LdaConstant), U8(242),
- B(Star), R(0),
- B(LdaConstant), U8(243),
- B(Star), R(0),
- B(LdaConstant), U8(244),
- B(Star), R(0),
- B(LdaConstant), U8(245),
- B(Star), R(0),
- B(LdaConstant), U8(246),
- B(Star), R(0),
- B(LdaConstant), U8(247),
- B(Star), R(0),
- B(LdaConstant), U8(248),
- B(Star), R(0),
- B(LdaConstant), U8(249),
- B(Star), R(0),
- B(LdaConstant), U8(250),
- B(Star), R(0),
- B(LdaConstant), U8(251),
- B(Star), R(0),
- B(LdaConstant), U8(252),
- B(Star), R(0),
- B(LdaConstant), U8(253),
- B(Star), R(0),
- B(LdaConstant), U8(254),
- B(Star), R(0),
- B(LdaConstant), U8(255),
- B(Star), R(0),
- B(Wide), B(CreateRegExpLiteral), U16(256), U16(0), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 41 S> */ B(LdaConstant), U8(0),
+ /* 43 E> */ B(Star), R(0),
+ /* 51 S> */ B(LdaConstant), U8(1),
+ /* 53 E> */ B(Star), R(0),
+ /* 61 S> */ B(LdaConstant), U8(2),
+ /* 63 E> */ B(Star), R(0),
+ /* 71 S> */ B(LdaConstant), U8(3),
+ /* 73 E> */ B(Star), R(0),
+ /* 81 S> */ B(LdaConstant), U8(4),
+ /* 83 E> */ B(Star), R(0),
+ /* 91 S> */ B(LdaConstant), U8(5),
+ /* 93 E> */ B(Star), R(0),
+ /* 101 S> */ B(LdaConstant), U8(6),
+ /* 103 E> */ B(Star), R(0),
+ /* 111 S> */ B(LdaConstant), U8(7),
+ /* 113 E> */ B(Star), R(0),
+ /* 121 S> */ B(LdaConstant), U8(8),
+ /* 123 E> */ B(Star), R(0),
+ /* 131 S> */ B(LdaConstant), U8(9),
+ /* 133 E> */ B(Star), R(0),
+ /* 141 S> */ B(LdaConstant), U8(10),
+ /* 143 E> */ B(Star), R(0),
+ /* 151 S> */ B(LdaConstant), U8(11),
+ /* 153 E> */ B(Star), R(0),
+ /* 161 S> */ B(LdaConstant), U8(12),
+ /* 163 E> */ B(Star), R(0),
+ /* 171 S> */ B(LdaConstant), U8(13),
+ /* 173 E> */ B(Star), R(0),
+ /* 181 S> */ B(LdaConstant), U8(14),
+ /* 183 E> */ B(Star), R(0),
+ /* 191 S> */ B(LdaConstant), U8(15),
+ /* 193 E> */ B(Star), R(0),
+ /* 201 S> */ B(LdaConstant), U8(16),
+ /* 203 E> */ B(Star), R(0),
+ /* 211 S> */ B(LdaConstant), U8(17),
+ /* 213 E> */ B(Star), R(0),
+ /* 221 S> */ B(LdaConstant), U8(18),
+ /* 223 E> */ B(Star), R(0),
+ /* 231 S> */ B(LdaConstant), U8(19),
+ /* 233 E> */ B(Star), R(0),
+ /* 241 S> */ B(LdaConstant), U8(20),
+ /* 243 E> */ B(Star), R(0),
+ /* 251 S> */ B(LdaConstant), U8(21),
+ /* 253 E> */ B(Star), R(0),
+ /* 261 S> */ B(LdaConstant), U8(22),
+ /* 263 E> */ B(Star), R(0),
+ /* 271 S> */ B(LdaConstant), U8(23),
+ /* 273 E> */ B(Star), R(0),
+ /* 281 S> */ B(LdaConstant), U8(24),
+ /* 283 E> */ B(Star), R(0),
+ /* 291 S> */ B(LdaConstant), U8(25),
+ /* 293 E> */ B(Star), R(0),
+ /* 301 S> */ B(LdaConstant), U8(26),
+ /* 303 E> */ B(Star), R(0),
+ /* 311 S> */ B(LdaConstant), U8(27),
+ /* 313 E> */ B(Star), R(0),
+ /* 321 S> */ B(LdaConstant), U8(28),
+ /* 323 E> */ B(Star), R(0),
+ /* 331 S> */ B(LdaConstant), U8(29),
+ /* 333 E> */ B(Star), R(0),
+ /* 341 S> */ B(LdaConstant), U8(30),
+ /* 343 E> */ B(Star), R(0),
+ /* 351 S> */ B(LdaConstant), U8(31),
+ /* 353 E> */ B(Star), R(0),
+ /* 361 S> */ B(LdaConstant), U8(32),
+ /* 363 E> */ B(Star), R(0),
+ /* 371 S> */ B(LdaConstant), U8(33),
+ /* 373 E> */ B(Star), R(0),
+ /* 381 S> */ B(LdaConstant), U8(34),
+ /* 383 E> */ B(Star), R(0),
+ /* 391 S> */ B(LdaConstant), U8(35),
+ /* 393 E> */ B(Star), R(0),
+ /* 401 S> */ B(LdaConstant), U8(36),
+ /* 403 E> */ B(Star), R(0),
+ /* 411 S> */ B(LdaConstant), U8(37),
+ /* 413 E> */ B(Star), R(0),
+ /* 421 S> */ B(LdaConstant), U8(38),
+ /* 423 E> */ B(Star), R(0),
+ /* 431 S> */ B(LdaConstant), U8(39),
+ /* 433 E> */ B(Star), R(0),
+ /* 441 S> */ B(LdaConstant), U8(40),
+ /* 443 E> */ B(Star), R(0),
+ /* 451 S> */ B(LdaConstant), U8(41),
+ /* 453 E> */ B(Star), R(0),
+ /* 461 S> */ B(LdaConstant), U8(42),
+ /* 463 E> */ B(Star), R(0),
+ /* 471 S> */ B(LdaConstant), U8(43),
+ /* 473 E> */ B(Star), R(0),
+ /* 481 S> */ B(LdaConstant), U8(44),
+ /* 483 E> */ B(Star), R(0),
+ /* 491 S> */ B(LdaConstant), U8(45),
+ /* 493 E> */ B(Star), R(0),
+ /* 501 S> */ B(LdaConstant), U8(46),
+ /* 503 E> */ B(Star), R(0),
+ /* 511 S> */ B(LdaConstant), U8(47),
+ /* 513 E> */ B(Star), R(0),
+ /* 521 S> */ B(LdaConstant), U8(48),
+ /* 523 E> */ B(Star), R(0),
+ /* 531 S> */ B(LdaConstant), U8(49),
+ /* 533 E> */ B(Star), R(0),
+ /* 541 S> */ B(LdaConstant), U8(50),
+ /* 543 E> */ B(Star), R(0),
+ /* 551 S> */ B(LdaConstant), U8(51),
+ /* 553 E> */ B(Star), R(0),
+ /* 561 S> */ B(LdaConstant), U8(52),
+ /* 563 E> */ B(Star), R(0),
+ /* 571 S> */ B(LdaConstant), U8(53),
+ /* 573 E> */ B(Star), R(0),
+ /* 581 S> */ B(LdaConstant), U8(54),
+ /* 583 E> */ B(Star), R(0),
+ /* 591 S> */ B(LdaConstant), U8(55),
+ /* 593 E> */ B(Star), R(0),
+ /* 601 S> */ B(LdaConstant), U8(56),
+ /* 603 E> */ B(Star), R(0),
+ /* 611 S> */ B(LdaConstant), U8(57),
+ /* 613 E> */ B(Star), R(0),
+ /* 621 S> */ B(LdaConstant), U8(58),
+ /* 623 E> */ B(Star), R(0),
+ /* 631 S> */ B(LdaConstant), U8(59),
+ /* 633 E> */ B(Star), R(0),
+ /* 641 S> */ B(LdaConstant), U8(60),
+ /* 643 E> */ B(Star), R(0),
+ /* 651 S> */ B(LdaConstant), U8(61),
+ /* 653 E> */ B(Star), R(0),
+ /* 661 S> */ B(LdaConstant), U8(62),
+ /* 663 E> */ B(Star), R(0),
+ /* 671 S> */ B(LdaConstant), U8(63),
+ /* 673 E> */ B(Star), R(0),
+ /* 681 S> */ B(LdaConstant), U8(64),
+ /* 683 E> */ B(Star), R(0),
+ /* 691 S> */ B(LdaConstant), U8(65),
+ /* 693 E> */ B(Star), R(0),
+ /* 701 S> */ B(LdaConstant), U8(66),
+ /* 703 E> */ B(Star), R(0),
+ /* 711 S> */ B(LdaConstant), U8(67),
+ /* 713 E> */ B(Star), R(0),
+ /* 721 S> */ B(LdaConstant), U8(68),
+ /* 723 E> */ B(Star), R(0),
+ /* 731 S> */ B(LdaConstant), U8(69),
+ /* 733 E> */ B(Star), R(0),
+ /* 741 S> */ B(LdaConstant), U8(70),
+ /* 743 E> */ B(Star), R(0),
+ /* 751 S> */ B(LdaConstant), U8(71),
+ /* 753 E> */ B(Star), R(0),
+ /* 761 S> */ B(LdaConstant), U8(72),
+ /* 763 E> */ B(Star), R(0),
+ /* 771 S> */ B(LdaConstant), U8(73),
+ /* 773 E> */ B(Star), R(0),
+ /* 781 S> */ B(LdaConstant), U8(74),
+ /* 783 E> */ B(Star), R(0),
+ /* 791 S> */ B(LdaConstant), U8(75),
+ /* 793 E> */ B(Star), R(0),
+ /* 801 S> */ B(LdaConstant), U8(76),
+ /* 803 E> */ B(Star), R(0),
+ /* 811 S> */ B(LdaConstant), U8(77),
+ /* 813 E> */ B(Star), R(0),
+ /* 821 S> */ B(LdaConstant), U8(78),
+ /* 823 E> */ B(Star), R(0),
+ /* 831 S> */ B(LdaConstant), U8(79),
+ /* 833 E> */ B(Star), R(0),
+ /* 841 S> */ B(LdaConstant), U8(80),
+ /* 843 E> */ B(Star), R(0),
+ /* 851 S> */ B(LdaConstant), U8(81),
+ /* 853 E> */ B(Star), R(0),
+ /* 861 S> */ B(LdaConstant), U8(82),
+ /* 863 E> */ B(Star), R(0),
+ /* 871 S> */ B(LdaConstant), U8(83),
+ /* 873 E> */ B(Star), R(0),
+ /* 881 S> */ B(LdaConstant), U8(84),
+ /* 883 E> */ B(Star), R(0),
+ /* 891 S> */ B(LdaConstant), U8(85),
+ /* 893 E> */ B(Star), R(0),
+ /* 901 S> */ B(LdaConstant), U8(86),
+ /* 903 E> */ B(Star), R(0),
+ /* 911 S> */ B(LdaConstant), U8(87),
+ /* 913 E> */ B(Star), R(0),
+ /* 921 S> */ B(LdaConstant), U8(88),
+ /* 923 E> */ B(Star), R(0),
+ /* 931 S> */ B(LdaConstant), U8(89),
+ /* 933 E> */ B(Star), R(0),
+ /* 941 S> */ B(LdaConstant), U8(90),
+ /* 943 E> */ B(Star), R(0),
+ /* 951 S> */ B(LdaConstant), U8(91),
+ /* 953 E> */ B(Star), R(0),
+ /* 961 S> */ B(LdaConstant), U8(92),
+ /* 963 E> */ B(Star), R(0),
+ /* 971 S> */ B(LdaConstant), U8(93),
+ /* 973 E> */ B(Star), R(0),
+ /* 981 S> */ B(LdaConstant), U8(94),
+ /* 983 E> */ B(Star), R(0),
+ /* 991 S> */ B(LdaConstant), U8(95),
+ /* 993 E> */ B(Star), R(0),
+ /* 1001 S> */ B(LdaConstant), U8(96),
+ /* 1003 E> */ B(Star), R(0),
+ /* 1011 S> */ B(LdaConstant), U8(97),
+ /* 1013 E> */ B(Star), R(0),
+ /* 1021 S> */ B(LdaConstant), U8(98),
+ /* 1023 E> */ B(Star), R(0),
+ /* 1031 S> */ B(LdaConstant), U8(99),
+ /* 1033 E> */ B(Star), R(0),
+ /* 1041 S> */ B(LdaConstant), U8(100),
+ /* 1043 E> */ B(Star), R(0),
+ /* 1051 S> */ B(LdaConstant), U8(101),
+ /* 1053 E> */ B(Star), R(0),
+ /* 1061 S> */ B(LdaConstant), U8(102),
+ /* 1063 E> */ B(Star), R(0),
+ /* 1071 S> */ B(LdaConstant), U8(103),
+ /* 1073 E> */ B(Star), R(0),
+ /* 1081 S> */ B(LdaConstant), U8(104),
+ /* 1083 E> */ B(Star), R(0),
+ /* 1091 S> */ B(LdaConstant), U8(105),
+ /* 1093 E> */ B(Star), R(0),
+ /* 1101 S> */ B(LdaConstant), U8(106),
+ /* 1103 E> */ B(Star), R(0),
+ /* 1111 S> */ B(LdaConstant), U8(107),
+ /* 1113 E> */ B(Star), R(0),
+ /* 1121 S> */ B(LdaConstant), U8(108),
+ /* 1123 E> */ B(Star), R(0),
+ /* 1131 S> */ B(LdaConstant), U8(109),
+ /* 1133 E> */ B(Star), R(0),
+ /* 1141 S> */ B(LdaConstant), U8(110),
+ /* 1143 E> */ B(Star), R(0),
+ /* 1151 S> */ B(LdaConstant), U8(111),
+ /* 1153 E> */ B(Star), R(0),
+ /* 1161 S> */ B(LdaConstant), U8(112),
+ /* 1163 E> */ B(Star), R(0),
+ /* 1171 S> */ B(LdaConstant), U8(113),
+ /* 1173 E> */ B(Star), R(0),
+ /* 1181 S> */ B(LdaConstant), U8(114),
+ /* 1183 E> */ B(Star), R(0),
+ /* 1191 S> */ B(LdaConstant), U8(115),
+ /* 1193 E> */ B(Star), R(0),
+ /* 1201 S> */ B(LdaConstant), U8(116),
+ /* 1203 E> */ B(Star), R(0),
+ /* 1211 S> */ B(LdaConstant), U8(117),
+ /* 1213 E> */ B(Star), R(0),
+ /* 1221 S> */ B(LdaConstant), U8(118),
+ /* 1223 E> */ B(Star), R(0),
+ /* 1231 S> */ B(LdaConstant), U8(119),
+ /* 1233 E> */ B(Star), R(0),
+ /* 1241 S> */ B(LdaConstant), U8(120),
+ /* 1243 E> */ B(Star), R(0),
+ /* 1251 S> */ B(LdaConstant), U8(121),
+ /* 1253 E> */ B(Star), R(0),
+ /* 1261 S> */ B(LdaConstant), U8(122),
+ /* 1263 E> */ B(Star), R(0),
+ /* 1271 S> */ B(LdaConstant), U8(123),
+ /* 1273 E> */ B(Star), R(0),
+ /* 1281 S> */ B(LdaConstant), U8(124),
+ /* 1283 E> */ B(Star), R(0),
+ /* 1291 S> */ B(LdaConstant), U8(125),
+ /* 1293 E> */ B(Star), R(0),
+ /* 1301 S> */ B(LdaConstant), U8(126),
+ /* 1303 E> */ B(Star), R(0),
+ /* 1311 S> */ B(LdaConstant), U8(127),
+ /* 1313 E> */ B(Star), R(0),
+ /* 1321 S> */ B(LdaConstant), U8(128),
+ /* 1323 E> */ B(Star), R(0),
+ /* 1331 S> */ B(LdaConstant), U8(129),
+ /* 1333 E> */ B(Star), R(0),
+ /* 1341 S> */ B(LdaConstant), U8(130),
+ /* 1343 E> */ B(Star), R(0),
+ /* 1351 S> */ B(LdaConstant), U8(131),
+ /* 1353 E> */ B(Star), R(0),
+ /* 1361 S> */ B(LdaConstant), U8(132),
+ /* 1363 E> */ B(Star), R(0),
+ /* 1371 S> */ B(LdaConstant), U8(133),
+ /* 1373 E> */ B(Star), R(0),
+ /* 1381 S> */ B(LdaConstant), U8(134),
+ /* 1383 E> */ B(Star), R(0),
+ /* 1391 S> */ B(LdaConstant), U8(135),
+ /* 1393 E> */ B(Star), R(0),
+ /* 1401 S> */ B(LdaConstant), U8(136),
+ /* 1403 E> */ B(Star), R(0),
+ /* 1411 S> */ B(LdaConstant), U8(137),
+ /* 1413 E> */ B(Star), R(0),
+ /* 1421 S> */ B(LdaConstant), U8(138),
+ /* 1423 E> */ B(Star), R(0),
+ /* 1431 S> */ B(LdaConstant), U8(139),
+ /* 1433 E> */ B(Star), R(0),
+ /* 1441 S> */ B(LdaConstant), U8(140),
+ /* 1443 E> */ B(Star), R(0),
+ /* 1451 S> */ B(LdaConstant), U8(141),
+ /* 1453 E> */ B(Star), R(0),
+ /* 1461 S> */ B(LdaConstant), U8(142),
+ /* 1463 E> */ B(Star), R(0),
+ /* 1471 S> */ B(LdaConstant), U8(143),
+ /* 1473 E> */ B(Star), R(0),
+ /* 1481 S> */ B(LdaConstant), U8(144),
+ /* 1483 E> */ B(Star), R(0),
+ /* 1491 S> */ B(LdaConstant), U8(145),
+ /* 1493 E> */ B(Star), R(0),
+ /* 1501 S> */ B(LdaConstant), U8(146),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1511 S> */ B(LdaConstant), U8(147),
+ /* 1513 E> */ B(Star), R(0),
+ /* 1521 S> */ B(LdaConstant), U8(148),
+ /* 1523 E> */ B(Star), R(0),
+ /* 1531 S> */ B(LdaConstant), U8(149),
+ /* 1533 E> */ B(Star), R(0),
+ /* 1541 S> */ B(LdaConstant), U8(150),
+ /* 1543 E> */ B(Star), R(0),
+ /* 1551 S> */ B(LdaConstant), U8(151),
+ /* 1553 E> */ B(Star), R(0),
+ /* 1561 S> */ B(LdaConstant), U8(152),
+ /* 1563 E> */ B(Star), R(0),
+ /* 1571 S> */ B(LdaConstant), U8(153),
+ /* 1573 E> */ B(Star), R(0),
+ /* 1581 S> */ B(LdaConstant), U8(154),
+ /* 1583 E> */ B(Star), R(0),
+ /* 1591 S> */ B(LdaConstant), U8(155),
+ /* 1593 E> */ B(Star), R(0),
+ /* 1601 S> */ B(LdaConstant), U8(156),
+ /* 1603 E> */ B(Star), R(0),
+ /* 1611 S> */ B(LdaConstant), U8(157),
+ /* 1613 E> */ B(Star), R(0),
+ /* 1621 S> */ B(LdaConstant), U8(158),
+ /* 1623 E> */ B(Star), R(0),
+ /* 1631 S> */ B(LdaConstant), U8(159),
+ /* 1633 E> */ B(Star), R(0),
+ /* 1641 S> */ B(LdaConstant), U8(160),
+ /* 1643 E> */ B(Star), R(0),
+ /* 1651 S> */ B(LdaConstant), U8(161),
+ /* 1653 E> */ B(Star), R(0),
+ /* 1661 S> */ B(LdaConstant), U8(162),
+ /* 1663 E> */ B(Star), R(0),
+ /* 1671 S> */ B(LdaConstant), U8(163),
+ /* 1673 E> */ B(Star), R(0),
+ /* 1681 S> */ B(LdaConstant), U8(164),
+ /* 1683 E> */ B(Star), R(0),
+ /* 1691 S> */ B(LdaConstant), U8(165),
+ /* 1693 E> */ B(Star), R(0),
+ /* 1701 S> */ B(LdaConstant), U8(166),
+ /* 1703 E> */ B(Star), R(0),
+ /* 1711 S> */ B(LdaConstant), U8(167),
+ /* 1713 E> */ B(Star), R(0),
+ /* 1721 S> */ B(LdaConstant), U8(168),
+ /* 1723 E> */ B(Star), R(0),
+ /* 1731 S> */ B(LdaConstant), U8(169),
+ /* 1733 E> */ B(Star), R(0),
+ /* 1741 S> */ B(LdaConstant), U8(170),
+ /* 1743 E> */ B(Star), R(0),
+ /* 1751 S> */ B(LdaConstant), U8(171),
+ /* 1753 E> */ B(Star), R(0),
+ /* 1761 S> */ B(LdaConstant), U8(172),
+ /* 1763 E> */ B(Star), R(0),
+ /* 1771 S> */ B(LdaConstant), U8(173),
+ /* 1773 E> */ B(Star), R(0),
+ /* 1781 S> */ B(LdaConstant), U8(174),
+ /* 1783 E> */ B(Star), R(0),
+ /* 1791 S> */ B(LdaConstant), U8(175),
+ /* 1793 E> */ B(Star), R(0),
+ /* 1801 S> */ B(LdaConstant), U8(176),
+ /* 1803 E> */ B(Star), R(0),
+ /* 1811 S> */ B(LdaConstant), U8(177),
+ /* 1813 E> */ B(Star), R(0),
+ /* 1821 S> */ B(LdaConstant), U8(178),
+ /* 1823 E> */ B(Star), R(0),
+ /* 1831 S> */ B(LdaConstant), U8(179),
+ /* 1833 E> */ B(Star), R(0),
+ /* 1841 S> */ B(LdaConstant), U8(180),
+ /* 1843 E> */ B(Star), R(0),
+ /* 1851 S> */ B(LdaConstant), U8(181),
+ /* 1853 E> */ B(Star), R(0),
+ /* 1861 S> */ B(LdaConstant), U8(182),
+ /* 1863 E> */ B(Star), R(0),
+ /* 1871 S> */ B(LdaConstant), U8(183),
+ /* 1873 E> */ B(Star), R(0),
+ /* 1881 S> */ B(LdaConstant), U8(184),
+ /* 1883 E> */ B(Star), R(0),
+ /* 1891 S> */ B(LdaConstant), U8(185),
+ /* 1893 E> */ B(Star), R(0),
+ /* 1901 S> */ B(LdaConstant), U8(186),
+ /* 1903 E> */ B(Star), R(0),
+ /* 1911 S> */ B(LdaConstant), U8(187),
+ /* 1913 E> */ B(Star), R(0),
+ /* 1921 S> */ B(LdaConstant), U8(188),
+ /* 1923 E> */ B(Star), R(0),
+ /* 1931 S> */ B(LdaConstant), U8(189),
+ /* 1933 E> */ B(Star), R(0),
+ /* 1941 S> */ B(LdaConstant), U8(190),
+ /* 1943 E> */ B(Star), R(0),
+ /* 1951 S> */ B(LdaConstant), U8(191),
+ /* 1953 E> */ B(Star), R(0),
+ /* 1961 S> */ B(LdaConstant), U8(192),
+ /* 1963 E> */ B(Star), R(0),
+ /* 1971 S> */ B(LdaConstant), U8(193),
+ /* 1973 E> */ B(Star), R(0),
+ /* 1981 S> */ B(LdaConstant), U8(194),
+ /* 1983 E> */ B(Star), R(0),
+ /* 1991 S> */ B(LdaConstant), U8(195),
+ /* 1993 E> */ B(Star), R(0),
+ /* 2001 S> */ B(LdaConstant), U8(196),
+ /* 2003 E> */ B(Star), R(0),
+ /* 2011 S> */ B(LdaConstant), U8(197),
+ /* 2013 E> */ B(Star), R(0),
+ /* 2021 S> */ B(LdaConstant), U8(198),
+ /* 2023 E> */ B(Star), R(0),
+ /* 2031 S> */ B(LdaConstant), U8(199),
+ /* 2033 E> */ B(Star), R(0),
+ /* 2041 S> */ B(LdaConstant), U8(200),
+ /* 2043 E> */ B(Star), R(0),
+ /* 2051 S> */ B(LdaConstant), U8(201),
+ /* 2053 E> */ B(Star), R(0),
+ /* 2061 S> */ B(LdaConstant), U8(202),
+ /* 2063 E> */ B(Star), R(0),
+ /* 2071 S> */ B(LdaConstant), U8(203),
+ /* 2073 E> */ B(Star), R(0),
+ /* 2081 S> */ B(LdaConstant), U8(204),
+ /* 2083 E> */ B(Star), R(0),
+ /* 2091 S> */ B(LdaConstant), U8(205),
+ /* 2093 E> */ B(Star), R(0),
+ /* 2101 S> */ B(LdaConstant), U8(206),
+ /* 2103 E> */ B(Star), R(0),
+ /* 2111 S> */ B(LdaConstant), U8(207),
+ /* 2113 E> */ B(Star), R(0),
+ /* 2121 S> */ B(LdaConstant), U8(208),
+ /* 2123 E> */ B(Star), R(0),
+ /* 2131 S> */ B(LdaConstant), U8(209),
+ /* 2133 E> */ B(Star), R(0),
+ /* 2141 S> */ B(LdaConstant), U8(210),
+ /* 2143 E> */ B(Star), R(0),
+ /* 2151 S> */ B(LdaConstant), U8(211),
+ /* 2153 E> */ B(Star), R(0),
+ /* 2161 S> */ B(LdaConstant), U8(212),
+ /* 2163 E> */ B(Star), R(0),
+ /* 2171 S> */ B(LdaConstant), U8(213),
+ /* 2173 E> */ B(Star), R(0),
+ /* 2181 S> */ B(LdaConstant), U8(214),
+ /* 2183 E> */ B(Star), R(0),
+ /* 2191 S> */ B(LdaConstant), U8(215),
+ /* 2193 E> */ B(Star), R(0),
+ /* 2201 S> */ B(LdaConstant), U8(216),
+ /* 2203 E> */ B(Star), R(0),
+ /* 2211 S> */ B(LdaConstant), U8(217),
+ /* 2213 E> */ B(Star), R(0),
+ /* 2221 S> */ B(LdaConstant), U8(218),
+ /* 2223 E> */ B(Star), R(0),
+ /* 2231 S> */ B(LdaConstant), U8(219),
+ /* 2233 E> */ B(Star), R(0),
+ /* 2241 S> */ B(LdaConstant), U8(220),
+ /* 2243 E> */ B(Star), R(0),
+ /* 2251 S> */ B(LdaConstant), U8(221),
+ /* 2253 E> */ B(Star), R(0),
+ /* 2261 S> */ B(LdaConstant), U8(222),
+ /* 2263 E> */ B(Star), R(0),
+ /* 2271 S> */ B(LdaConstant), U8(223),
+ /* 2273 E> */ B(Star), R(0),
+ /* 2281 S> */ B(LdaConstant), U8(224),
+ /* 2283 E> */ B(Star), R(0),
+ /* 2291 S> */ B(LdaConstant), U8(225),
+ /* 2293 E> */ B(Star), R(0),
+ /* 2301 S> */ B(LdaConstant), U8(226),
+ /* 2303 E> */ B(Star), R(0),
+ /* 2311 S> */ B(LdaConstant), U8(227),
+ /* 2313 E> */ B(Star), R(0),
+ /* 2321 S> */ B(LdaConstant), U8(228),
+ /* 2323 E> */ B(Star), R(0),
+ /* 2331 S> */ B(LdaConstant), U8(229),
+ /* 2333 E> */ B(Star), R(0),
+ /* 2341 S> */ B(LdaConstant), U8(230),
+ /* 2343 E> */ B(Star), R(0),
+ /* 2351 S> */ B(LdaConstant), U8(231),
+ /* 2353 E> */ B(Star), R(0),
+ /* 2361 S> */ B(LdaConstant), U8(232),
+ /* 2363 E> */ B(Star), R(0),
+ /* 2371 S> */ B(LdaConstant), U8(233),
+ /* 2373 E> */ B(Star), R(0),
+ /* 2381 S> */ B(LdaConstant), U8(234),
+ /* 2383 E> */ B(Star), R(0),
+ /* 2391 S> */ B(LdaConstant), U8(235),
+ /* 2393 E> */ B(Star), R(0),
+ /* 2401 S> */ B(LdaConstant), U8(236),
+ /* 2403 E> */ B(Star), R(0),
+ /* 2411 S> */ B(LdaConstant), U8(237),
+ /* 2413 E> */ B(Star), R(0),
+ /* 2421 S> */ B(LdaConstant), U8(238),
+ /* 2423 E> */ B(Star), R(0),
+ /* 2431 S> */ B(LdaConstant), U8(239),
+ /* 2433 E> */ B(Star), R(0),
+ /* 2441 S> */ B(LdaConstant), U8(240),
+ /* 2443 E> */ B(Star), R(0),
+ /* 2451 S> */ B(LdaConstant), U8(241),
+ /* 2453 E> */ B(Star), R(0),
+ /* 2461 S> */ B(LdaConstant), U8(242),
+ /* 2463 E> */ B(Star), R(0),
+ /* 2471 S> */ B(LdaConstant), U8(243),
+ /* 2473 E> */ B(Star), R(0),
+ /* 2481 S> */ B(LdaConstant), U8(244),
+ /* 2483 E> */ B(Star), R(0),
+ /* 2491 S> */ B(LdaConstant), U8(245),
+ /* 2493 E> */ B(Star), R(0),
+ /* 2501 S> */ B(LdaConstant), U8(246),
+ /* 2503 E> */ B(Star), R(0),
+ /* 2511 S> */ B(LdaConstant), U8(247),
+ /* 2513 E> */ B(Star), R(0),
+ /* 2521 S> */ B(LdaConstant), U8(248),
+ /* 2523 E> */ B(Star), R(0),
+ /* 2531 S> */ B(LdaConstant), U8(249),
+ /* 2533 E> */ B(Star), R(0),
+ /* 2541 S> */ B(LdaConstant), U8(250),
+ /* 2543 E> */ B(Star), R(0),
+ /* 2551 S> */ B(LdaConstant), U8(251),
+ /* 2553 E> */ B(Star), R(0),
+ /* 2561 S> */ B(LdaConstant), U8(252),
+ /* 2563 E> */ B(Star), R(0),
+ /* 2571 S> */ B(LdaConstant), U8(253),
+ /* 2573 E> */ B(Star), R(0),
+ /* 2581 S> */ B(LdaConstant), U8(254),
+ /* 2583 E> */ B(Star), R(0),
+ /* 2591 S> */ B(LdaConstant), U8(255),
+ /* 2593 E> */ B(Star), R(0),
+ /* 2601 S> */ B(Wide), B(CreateRegExpLiteral), U16(256), U16(0), U8(0),
+ /* 2616 S> */ B(Return),
]
constant pool: [
InstanceType::HEAP_NUMBER_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden b/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
index e9283cd..b5ebec1 100644
--- a/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
+++ b/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
@@ -20,23 +20,23 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Add), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(10),
- B(TestGreaterThan), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(4),
- B(Jump), U8(-21),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaSmi), U8(1),
+ /* 45 E> */ B(Star), R(0),
+ /* 48 E> */ B(StackCheck),
+ /* 64 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ /* 78 E> */ B(Ldar), R(0),
+ B(Add), R(1),
+ /* 69 E> */ B(Star), R(0),
+ /* 86 S> */ B(Star), R(1),
+ B(LdaSmi), U8(10),
+ /* 95 E> */ B(TestGreaterThan), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 101 S> */ B(Jump), U8(4),
+ B(Jump), U8(-21),
+ /* 110 S> */ B(Ldar), R(0),
+ /* 123 S> */ B(Return),
]
constant pool: [
]
@@ -56,22 +56,22 @@
parameter count: 1
bytecode array length: 29
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Add), R(1),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(10),
- B(TestGreaterThan), R(1),
- B(JumpIfFalse), U8(4),
- B(Jump), U8(2),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaSmi), U8(1),
+ /* 45 E> */ B(Star), R(0),
+ /* 48 E> */ B(StackCheck),
+ /* 55 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ /* 69 E> */ B(Ldar), R(0),
+ B(Add), R(1),
+ /* 60 E> */ B(Star), R(0),
+ /* 77 S> */ B(Star), R(1),
+ B(LdaSmi), U8(10),
+ /* 86 E> */ B(TestGreaterThan), R(1),
+ B(JumpIfFalse), U8(4),
+ /* 92 S> */ B(Jump), U8(2),
+ /* 118 S> */ B(Ldar), R(0),
+ /* 131 S> */ B(Return),
]
constant pool: [
]
@@ -88,14 +88,14 @@
parameter count: 1
bytecode array length: 14
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Star), R(1),
- B(Ldar), R(0),
- B(Add), R(1),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 45 S> */ B(LdaSmi), U8(1),
+ /* 45 E> */ B(Star), R(0),
+ /* 50 S> */ B(Star), R(1),
+ /* 64 E> */ B(Ldar), R(0),
+ B(Add), R(1),
+ /* 55 E> */ B(Star), R(0),
+ /* 85 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden b/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
index 151c334..bddfe77 100644
--- a/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
+++ b/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
@@ -18,11 +18,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(2),
- B(StaGlobalSloppy), U8(0), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 21 E> */ B(StackCheck),
+ /* 26 S> */ B(LdaSmi), U8(2),
+ /* 28 E> */ B(StaGlobalSloppy), U8(0), U8(1),
+ B(LdaUndefined),
+ /* 33 S> */ B(Return),
]
constant pool: [
"a",
@@ -39,11 +39,11 @@
parameter count: 2
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(StaGlobalSloppy), U8(0), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 26 E> */ B(StackCheck),
+ /* 32 S> */ B(Ldar), R(arg0),
+ /* 34 E> */ B(StaGlobalSloppy), U8(0), U8(1),
+ B(LdaUndefined),
+ /* 39 S> */ B(Return),
]
constant pool: [
"a",
@@ -61,11 +61,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(2),
- B(StaGlobalStrict), U8(0), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 35 E> */ B(StackCheck),
+ /* 40 S> */ B(LdaSmi), U8(2),
+ /* 42 E> */ B(StaGlobalStrict), U8(0), U8(1),
+ B(LdaUndefined),
+ /* 47 S> */ B(Return),
]
constant pool: [
"a",
@@ -83,11 +83,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(2),
- B(StaGlobalSloppy), U8(0), U8(1),
- B(LdaUndefined),
- B(Return),
+ /* 17 E> */ B(StackCheck),
+ /* 22 S> */ B(LdaSmi), U8(2),
+ /* 24 E> */ B(StaGlobalSloppy), U8(0), U8(1),
+ B(LdaUndefined),
+ /* 29 S> */ B(Return),
]
constant pool: [
"a",
@@ -235,395 +235,395 @@
parameter count: 2
bytecode array length: 1035
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(255),
- B(LdaSmi), U8(2),
- B(Wide), B(StaGlobalSloppy), U16(1), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 17 E> */ B(StackCheck),
+ /* 25 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 26 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 35 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 36 E> */ B(LoadIC), R(0), U8(0), U8(3),
+ /* 45 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 46 E> */ B(LoadIC), R(0), U8(0), U8(5),
+ /* 55 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 56 E> */ B(LoadIC), R(0), U8(0), U8(7),
+ /* 65 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 66 E> */ B(LoadIC), R(0), U8(0), U8(9),
+ /* 75 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 76 E> */ B(LoadIC), R(0), U8(0), U8(11),
+ /* 85 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 86 E> */ B(LoadIC), R(0), U8(0), U8(13),
+ /* 95 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 96 E> */ B(LoadIC), R(0), U8(0), U8(15),
+ /* 105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 106 E> */ B(LoadIC), R(0), U8(0), U8(17),
+ /* 115 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 116 E> */ B(LoadIC), R(0), U8(0), U8(19),
+ /* 125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 126 E> */ B(LoadIC), R(0), U8(0), U8(21),
+ /* 135 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 136 E> */ B(LoadIC), R(0), U8(0), U8(23),
+ /* 145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 146 E> */ B(LoadIC), R(0), U8(0), U8(25),
+ /* 155 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 156 E> */ B(LoadIC), R(0), U8(0), U8(27),
+ /* 165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 166 E> */ B(LoadIC), R(0), U8(0), U8(29),
+ /* 175 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 176 E> */ B(LoadIC), R(0), U8(0), U8(31),
+ /* 185 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 186 E> */ B(LoadIC), R(0), U8(0), U8(33),
+ /* 195 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 196 E> */ B(LoadIC), R(0), U8(0), U8(35),
+ /* 205 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 206 E> */ B(LoadIC), R(0), U8(0), U8(37),
+ /* 215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 216 E> */ B(LoadIC), R(0), U8(0), U8(39),
+ /* 225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 226 E> */ B(LoadIC), R(0), U8(0), U8(41),
+ /* 235 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 236 E> */ B(LoadIC), R(0), U8(0), U8(43),
+ /* 245 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 246 E> */ B(LoadIC), R(0), U8(0), U8(45),
+ /* 255 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 256 E> */ B(LoadIC), R(0), U8(0), U8(47),
+ /* 265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 266 E> */ B(LoadIC), R(0), U8(0), U8(49),
+ /* 275 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 276 E> */ B(LoadIC), R(0), U8(0), U8(51),
+ /* 285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 286 E> */ B(LoadIC), R(0), U8(0), U8(53),
+ /* 295 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 296 E> */ B(LoadIC), R(0), U8(0), U8(55),
+ /* 305 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 306 E> */ B(LoadIC), R(0), U8(0), U8(57),
+ /* 315 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 316 E> */ B(LoadIC), R(0), U8(0), U8(59),
+ /* 325 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 326 E> */ B(LoadIC), R(0), U8(0), U8(61),
+ /* 335 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 336 E> */ B(LoadIC), R(0), U8(0), U8(63),
+ /* 345 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 346 E> */ B(LoadIC), R(0), U8(0), U8(65),
+ /* 355 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 356 E> */ B(LoadIC), R(0), U8(0), U8(67),
+ /* 365 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 366 E> */ B(LoadIC), R(0), U8(0), U8(69),
+ /* 375 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 376 E> */ B(LoadIC), R(0), U8(0), U8(71),
+ /* 385 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 386 E> */ B(LoadIC), R(0), U8(0), U8(73),
+ /* 395 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 396 E> */ B(LoadIC), R(0), U8(0), U8(75),
+ /* 405 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 406 E> */ B(LoadIC), R(0), U8(0), U8(77),
+ /* 415 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 416 E> */ B(LoadIC), R(0), U8(0), U8(79),
+ /* 425 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 426 E> */ B(LoadIC), R(0), U8(0), U8(81),
+ /* 435 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 436 E> */ B(LoadIC), R(0), U8(0), U8(83),
+ /* 445 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 446 E> */ B(LoadIC), R(0), U8(0), U8(85),
+ /* 455 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 456 E> */ B(LoadIC), R(0), U8(0), U8(87),
+ /* 465 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 466 E> */ B(LoadIC), R(0), U8(0), U8(89),
+ /* 475 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 476 E> */ B(LoadIC), R(0), U8(0), U8(91),
+ /* 485 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 486 E> */ B(LoadIC), R(0), U8(0), U8(93),
+ /* 495 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 496 E> */ B(LoadIC), R(0), U8(0), U8(95),
+ /* 505 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 506 E> */ B(LoadIC), R(0), U8(0), U8(97),
+ /* 515 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 516 E> */ B(LoadIC), R(0), U8(0), U8(99),
+ /* 525 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 526 E> */ B(LoadIC), R(0), U8(0), U8(101),
+ /* 535 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 536 E> */ B(LoadIC), R(0), U8(0), U8(103),
+ /* 545 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 546 E> */ B(LoadIC), R(0), U8(0), U8(105),
+ /* 555 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 556 E> */ B(LoadIC), R(0), U8(0), U8(107),
+ /* 565 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 566 E> */ B(LoadIC), R(0), U8(0), U8(109),
+ /* 575 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 576 E> */ B(LoadIC), R(0), U8(0), U8(111),
+ /* 585 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 586 E> */ B(LoadIC), R(0), U8(0), U8(113),
+ /* 595 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 596 E> */ B(LoadIC), R(0), U8(0), U8(115),
+ /* 605 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 606 E> */ B(LoadIC), R(0), U8(0), U8(117),
+ /* 615 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 616 E> */ B(LoadIC), R(0), U8(0), U8(119),
+ /* 625 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 626 E> */ B(LoadIC), R(0), U8(0), U8(121),
+ /* 635 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 636 E> */ B(LoadIC), R(0), U8(0), U8(123),
+ /* 645 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 646 E> */ B(LoadIC), R(0), U8(0), U8(125),
+ /* 655 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 656 E> */ B(LoadIC), R(0), U8(0), U8(127),
+ /* 665 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 666 E> */ B(LoadIC), R(0), U8(0), U8(129),
+ /* 675 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 676 E> */ B(LoadIC), R(0), U8(0), U8(131),
+ /* 685 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 686 E> */ B(LoadIC), R(0), U8(0), U8(133),
+ /* 695 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 696 E> */ B(LoadIC), R(0), U8(0), U8(135),
+ /* 705 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 706 E> */ B(LoadIC), R(0), U8(0), U8(137),
+ /* 715 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 716 E> */ B(LoadIC), R(0), U8(0), U8(139),
+ /* 725 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 726 E> */ B(LoadIC), R(0), U8(0), U8(141),
+ /* 735 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 736 E> */ B(LoadIC), R(0), U8(0), U8(143),
+ /* 745 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 746 E> */ B(LoadIC), R(0), U8(0), U8(145),
+ /* 755 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 756 E> */ B(LoadIC), R(0), U8(0), U8(147),
+ /* 765 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 766 E> */ B(LoadIC), R(0), U8(0), U8(149),
+ /* 775 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 776 E> */ B(LoadIC), R(0), U8(0), U8(151),
+ /* 785 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 786 E> */ B(LoadIC), R(0), U8(0), U8(153),
+ /* 795 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 796 E> */ B(LoadIC), R(0), U8(0), U8(155),
+ /* 805 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 806 E> */ B(LoadIC), R(0), U8(0), U8(157),
+ /* 815 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 816 E> */ B(LoadIC), R(0), U8(0), U8(159),
+ /* 825 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 826 E> */ B(LoadIC), R(0), U8(0), U8(161),
+ /* 835 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 836 E> */ B(LoadIC), R(0), U8(0), U8(163),
+ /* 845 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 846 E> */ B(LoadIC), R(0), U8(0), U8(165),
+ /* 855 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 856 E> */ B(LoadIC), R(0), U8(0), U8(167),
+ /* 865 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 866 E> */ B(LoadIC), R(0), U8(0), U8(169),
+ /* 875 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 876 E> */ B(LoadIC), R(0), U8(0), U8(171),
+ /* 885 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 886 E> */ B(LoadIC), R(0), U8(0), U8(173),
+ /* 895 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 896 E> */ B(LoadIC), R(0), U8(0), U8(175),
+ /* 905 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 906 E> */ B(LoadIC), R(0), U8(0), U8(177),
+ /* 915 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 916 E> */ B(LoadIC), R(0), U8(0), U8(179),
+ /* 925 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 926 E> */ B(LoadIC), R(0), U8(0), U8(181),
+ /* 935 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 936 E> */ B(LoadIC), R(0), U8(0), U8(183),
+ /* 945 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 946 E> */ B(LoadIC), R(0), U8(0), U8(185),
+ /* 955 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 956 E> */ B(LoadIC), R(0), U8(0), U8(187),
+ /* 965 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 966 E> */ B(LoadIC), R(0), U8(0), U8(189),
+ /* 975 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 976 E> */ B(LoadIC), R(0), U8(0), U8(191),
+ /* 985 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 986 E> */ B(LoadIC), R(0), U8(0), U8(193),
+ /* 995 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 996 E> */ B(LoadIC), R(0), U8(0), U8(195),
+ /* 1005 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1006 E> */ B(LoadIC), R(0), U8(0), U8(197),
+ /* 1015 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1016 E> */ B(LoadIC), R(0), U8(0), U8(199),
+ /* 1025 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1026 E> */ B(LoadIC), R(0), U8(0), U8(201),
+ /* 1035 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1036 E> */ B(LoadIC), R(0), U8(0), U8(203),
+ /* 1045 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1046 E> */ B(LoadIC), R(0), U8(0), U8(205),
+ /* 1055 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1056 E> */ B(LoadIC), R(0), U8(0), U8(207),
+ /* 1065 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1066 E> */ B(LoadIC), R(0), U8(0), U8(209),
+ /* 1075 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1076 E> */ B(LoadIC), R(0), U8(0), U8(211),
+ /* 1085 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1086 E> */ B(LoadIC), R(0), U8(0), U8(213),
+ /* 1095 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1096 E> */ B(LoadIC), R(0), U8(0), U8(215),
+ /* 1105 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1106 E> */ B(LoadIC), R(0), U8(0), U8(217),
+ /* 1115 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1116 E> */ B(LoadIC), R(0), U8(0), U8(219),
+ /* 1125 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1126 E> */ B(LoadIC), R(0), U8(0), U8(221),
+ /* 1135 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1136 E> */ B(LoadIC), R(0), U8(0), U8(223),
+ /* 1145 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1146 E> */ B(LoadIC), R(0), U8(0), U8(225),
+ /* 1155 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1156 E> */ B(LoadIC), R(0), U8(0), U8(227),
+ /* 1165 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1166 E> */ B(LoadIC), R(0), U8(0), U8(229),
+ /* 1175 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1176 E> */ B(LoadIC), R(0), U8(0), U8(231),
+ /* 1185 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1186 E> */ B(LoadIC), R(0), U8(0), U8(233),
+ /* 1195 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1196 E> */ B(LoadIC), R(0), U8(0), U8(235),
+ /* 1205 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1206 E> */ B(LoadIC), R(0), U8(0), U8(237),
+ /* 1215 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1216 E> */ B(LoadIC), R(0), U8(0), U8(239),
+ /* 1225 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1226 E> */ B(LoadIC), R(0), U8(0), U8(241),
+ /* 1235 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1236 E> */ B(LoadIC), R(0), U8(0), U8(243),
+ /* 1245 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1246 E> */ B(LoadIC), R(0), U8(0), U8(245),
+ /* 1255 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1256 E> */ B(LoadIC), R(0), U8(0), U8(247),
+ /* 1265 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1266 E> */ B(LoadIC), R(0), U8(0), U8(249),
+ /* 1275 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1276 E> */ B(LoadIC), R(0), U8(0), U8(251),
+ /* 1285 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1286 E> */ B(LoadIC), R(0), U8(0), U8(253),
+ /* 1295 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1296 E> */ B(LoadIC), R(0), U8(0), U8(255),
+ /* 1305 S> */ B(LdaSmi), U8(2),
+ /* 1307 E> */ B(Wide), B(StaGlobalSloppy), U16(1), U16(257),
+ B(LdaUndefined),
+ /* 1312 S> */ B(Return),
]
constant pool: [
"name",
@@ -773,395 +773,395 @@
parameter count: 2
bytecode array length: 1035
bytecodes: [
- B(StackCheck),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(1),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(3),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(5),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(7),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(9),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(11),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(13),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(15),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(17),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(19),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(21),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(23),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(25),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(27),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(29),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(31),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(33),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(35),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(37),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(39),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(41),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(43),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(45),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(47),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(49),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(51),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(53),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(55),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(57),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(59),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(61),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(63),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(65),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(67),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(69),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(71),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(73),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(75),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(77),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(79),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(81),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(83),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(85),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(87),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(89),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(91),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(93),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(95),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(97),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(99),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(101),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(103),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(105),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(107),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(109),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(111),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(113),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(115),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(117),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(119),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(121),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(123),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(125),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(127),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(129),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(131),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(133),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(135),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(137),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(139),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(141),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(143),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(145),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(147),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(149),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(151),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(153),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(155),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(157),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(159),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(161),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(163),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(165),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(167),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(169),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(171),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(173),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(175),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(177),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(179),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(181),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(183),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(185),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(187),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(189),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(191),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(193),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(195),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(197),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(199),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(201),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(203),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(205),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(207),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(209),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(211),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(213),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(215),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(217),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(219),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(221),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(223),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(225),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(227),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(229),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(231),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(233),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(235),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(237),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(239),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(241),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(243),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(245),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(247),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(249),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(251),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(253),
- B(Ldar), R(arg0),
- B(Star), R(0),
- B(LoadIC), R(0), U8(0), U8(255),
- B(LdaSmi), U8(2),
- B(Wide), B(StaGlobalStrict), U16(1), U16(257),
- B(LdaUndefined),
- B(Return),
+ /* 17 E> */ B(StackCheck),
+ /* 41 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 42 E> */ B(LoadIC), R(0), U8(0), U8(1),
+ /* 51 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 52 E> */ B(LoadIC), R(0), U8(0), U8(3),
+ /* 61 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 62 E> */ B(LoadIC), R(0), U8(0), U8(5),
+ /* 71 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 72 E> */ B(LoadIC), R(0), U8(0), U8(7),
+ /* 81 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 82 E> */ B(LoadIC), R(0), U8(0), U8(9),
+ /* 91 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 92 E> */ B(LoadIC), R(0), U8(0), U8(11),
+ /* 101 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 102 E> */ B(LoadIC), R(0), U8(0), U8(13),
+ /* 111 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 112 E> */ B(LoadIC), R(0), U8(0), U8(15),
+ /* 121 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 122 E> */ B(LoadIC), R(0), U8(0), U8(17),
+ /* 131 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 132 E> */ B(LoadIC), R(0), U8(0), U8(19),
+ /* 141 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 142 E> */ B(LoadIC), R(0), U8(0), U8(21),
+ /* 151 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 152 E> */ B(LoadIC), R(0), U8(0), U8(23),
+ /* 161 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 162 E> */ B(LoadIC), R(0), U8(0), U8(25),
+ /* 171 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 172 E> */ B(LoadIC), R(0), U8(0), U8(27),
+ /* 181 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 182 E> */ B(LoadIC), R(0), U8(0), U8(29),
+ /* 191 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 192 E> */ B(LoadIC), R(0), U8(0), U8(31),
+ /* 201 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 202 E> */ B(LoadIC), R(0), U8(0), U8(33),
+ /* 211 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 212 E> */ B(LoadIC), R(0), U8(0), U8(35),
+ /* 221 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 222 E> */ B(LoadIC), R(0), U8(0), U8(37),
+ /* 231 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 232 E> */ B(LoadIC), R(0), U8(0), U8(39),
+ /* 241 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 242 E> */ B(LoadIC), R(0), U8(0), U8(41),
+ /* 251 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 252 E> */ B(LoadIC), R(0), U8(0), U8(43),
+ /* 261 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 262 E> */ B(LoadIC), R(0), U8(0), U8(45),
+ /* 271 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 272 E> */ B(LoadIC), R(0), U8(0), U8(47),
+ /* 281 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 282 E> */ B(LoadIC), R(0), U8(0), U8(49),
+ /* 291 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 292 E> */ B(LoadIC), R(0), U8(0), U8(51),
+ /* 301 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 302 E> */ B(LoadIC), R(0), U8(0), U8(53),
+ /* 311 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 312 E> */ B(LoadIC), R(0), U8(0), U8(55),
+ /* 321 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 322 E> */ B(LoadIC), R(0), U8(0), U8(57),
+ /* 331 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 332 E> */ B(LoadIC), R(0), U8(0), U8(59),
+ /* 341 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 342 E> */ B(LoadIC), R(0), U8(0), U8(61),
+ /* 351 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 352 E> */ B(LoadIC), R(0), U8(0), U8(63),
+ /* 361 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 362 E> */ B(LoadIC), R(0), U8(0), U8(65),
+ /* 371 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 372 E> */ B(LoadIC), R(0), U8(0), U8(67),
+ /* 381 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 382 E> */ B(LoadIC), R(0), U8(0), U8(69),
+ /* 391 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 392 E> */ B(LoadIC), R(0), U8(0), U8(71),
+ /* 401 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 402 E> */ B(LoadIC), R(0), U8(0), U8(73),
+ /* 411 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 412 E> */ B(LoadIC), R(0), U8(0), U8(75),
+ /* 421 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 422 E> */ B(LoadIC), R(0), U8(0), U8(77),
+ /* 431 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 432 E> */ B(LoadIC), R(0), U8(0), U8(79),
+ /* 441 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 442 E> */ B(LoadIC), R(0), U8(0), U8(81),
+ /* 451 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 452 E> */ B(LoadIC), R(0), U8(0), U8(83),
+ /* 461 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 462 E> */ B(LoadIC), R(0), U8(0), U8(85),
+ /* 471 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 472 E> */ B(LoadIC), R(0), U8(0), U8(87),
+ /* 481 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 482 E> */ B(LoadIC), R(0), U8(0), U8(89),
+ /* 491 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 492 E> */ B(LoadIC), R(0), U8(0), U8(91),
+ /* 501 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 502 E> */ B(LoadIC), R(0), U8(0), U8(93),
+ /* 511 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 512 E> */ B(LoadIC), R(0), U8(0), U8(95),
+ /* 521 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 522 E> */ B(LoadIC), R(0), U8(0), U8(97),
+ /* 531 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 532 E> */ B(LoadIC), R(0), U8(0), U8(99),
+ /* 541 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 542 E> */ B(LoadIC), R(0), U8(0), U8(101),
+ /* 551 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 552 E> */ B(LoadIC), R(0), U8(0), U8(103),
+ /* 561 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 562 E> */ B(LoadIC), R(0), U8(0), U8(105),
+ /* 571 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 572 E> */ B(LoadIC), R(0), U8(0), U8(107),
+ /* 581 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 582 E> */ B(LoadIC), R(0), U8(0), U8(109),
+ /* 591 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 592 E> */ B(LoadIC), R(0), U8(0), U8(111),
+ /* 601 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 602 E> */ B(LoadIC), R(0), U8(0), U8(113),
+ /* 611 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 612 E> */ B(LoadIC), R(0), U8(0), U8(115),
+ /* 621 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 622 E> */ B(LoadIC), R(0), U8(0), U8(117),
+ /* 631 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 632 E> */ B(LoadIC), R(0), U8(0), U8(119),
+ /* 641 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 642 E> */ B(LoadIC), R(0), U8(0), U8(121),
+ /* 651 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 652 E> */ B(LoadIC), R(0), U8(0), U8(123),
+ /* 661 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 662 E> */ B(LoadIC), R(0), U8(0), U8(125),
+ /* 671 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 672 E> */ B(LoadIC), R(0), U8(0), U8(127),
+ /* 681 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 682 E> */ B(LoadIC), R(0), U8(0), U8(129),
+ /* 691 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 692 E> */ B(LoadIC), R(0), U8(0), U8(131),
+ /* 701 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 702 E> */ B(LoadIC), R(0), U8(0), U8(133),
+ /* 711 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 712 E> */ B(LoadIC), R(0), U8(0), U8(135),
+ /* 721 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 722 E> */ B(LoadIC), R(0), U8(0), U8(137),
+ /* 731 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 732 E> */ B(LoadIC), R(0), U8(0), U8(139),
+ /* 741 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 742 E> */ B(LoadIC), R(0), U8(0), U8(141),
+ /* 751 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 752 E> */ B(LoadIC), R(0), U8(0), U8(143),
+ /* 761 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 762 E> */ B(LoadIC), R(0), U8(0), U8(145),
+ /* 771 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 772 E> */ B(LoadIC), R(0), U8(0), U8(147),
+ /* 781 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 782 E> */ B(LoadIC), R(0), U8(0), U8(149),
+ /* 791 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 792 E> */ B(LoadIC), R(0), U8(0), U8(151),
+ /* 801 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 802 E> */ B(LoadIC), R(0), U8(0), U8(153),
+ /* 811 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 812 E> */ B(LoadIC), R(0), U8(0), U8(155),
+ /* 821 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 822 E> */ B(LoadIC), R(0), U8(0), U8(157),
+ /* 831 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 832 E> */ B(LoadIC), R(0), U8(0), U8(159),
+ /* 841 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 842 E> */ B(LoadIC), R(0), U8(0), U8(161),
+ /* 851 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 852 E> */ B(LoadIC), R(0), U8(0), U8(163),
+ /* 861 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 862 E> */ B(LoadIC), R(0), U8(0), U8(165),
+ /* 871 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 872 E> */ B(LoadIC), R(0), U8(0), U8(167),
+ /* 881 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 882 E> */ B(LoadIC), R(0), U8(0), U8(169),
+ /* 891 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 892 E> */ B(LoadIC), R(0), U8(0), U8(171),
+ /* 901 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 902 E> */ B(LoadIC), R(0), U8(0), U8(173),
+ /* 911 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 912 E> */ B(LoadIC), R(0), U8(0), U8(175),
+ /* 921 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 922 E> */ B(LoadIC), R(0), U8(0), U8(177),
+ /* 931 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 932 E> */ B(LoadIC), R(0), U8(0), U8(179),
+ /* 941 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 942 E> */ B(LoadIC), R(0), U8(0), U8(181),
+ /* 951 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 952 E> */ B(LoadIC), R(0), U8(0), U8(183),
+ /* 961 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 962 E> */ B(LoadIC), R(0), U8(0), U8(185),
+ /* 971 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 972 E> */ B(LoadIC), R(0), U8(0), U8(187),
+ /* 981 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 982 E> */ B(LoadIC), R(0), U8(0), U8(189),
+ /* 991 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 992 E> */ B(LoadIC), R(0), U8(0), U8(191),
+ /* 1001 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1002 E> */ B(LoadIC), R(0), U8(0), U8(193),
+ /* 1011 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1012 E> */ B(LoadIC), R(0), U8(0), U8(195),
+ /* 1021 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1022 E> */ B(LoadIC), R(0), U8(0), U8(197),
+ /* 1031 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1032 E> */ B(LoadIC), R(0), U8(0), U8(199),
+ /* 1041 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1042 E> */ B(LoadIC), R(0), U8(0), U8(201),
+ /* 1051 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1052 E> */ B(LoadIC), R(0), U8(0), U8(203),
+ /* 1061 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1062 E> */ B(LoadIC), R(0), U8(0), U8(205),
+ /* 1071 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1072 E> */ B(LoadIC), R(0), U8(0), U8(207),
+ /* 1081 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1082 E> */ B(LoadIC), R(0), U8(0), U8(209),
+ /* 1091 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1092 E> */ B(LoadIC), R(0), U8(0), U8(211),
+ /* 1101 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1102 E> */ B(LoadIC), R(0), U8(0), U8(213),
+ /* 1111 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1112 E> */ B(LoadIC), R(0), U8(0), U8(215),
+ /* 1121 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1122 E> */ B(LoadIC), R(0), U8(0), U8(217),
+ /* 1131 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1132 E> */ B(LoadIC), R(0), U8(0), U8(219),
+ /* 1141 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1142 E> */ B(LoadIC), R(0), U8(0), U8(221),
+ /* 1151 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1152 E> */ B(LoadIC), R(0), U8(0), U8(223),
+ /* 1161 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1162 E> */ B(LoadIC), R(0), U8(0), U8(225),
+ /* 1171 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1172 E> */ B(LoadIC), R(0), U8(0), U8(227),
+ /* 1181 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1182 E> */ B(LoadIC), R(0), U8(0), U8(229),
+ /* 1191 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1192 E> */ B(LoadIC), R(0), U8(0), U8(231),
+ /* 1201 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1202 E> */ B(LoadIC), R(0), U8(0), U8(233),
+ /* 1211 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1212 E> */ B(LoadIC), R(0), U8(0), U8(235),
+ /* 1221 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1222 E> */ B(LoadIC), R(0), U8(0), U8(237),
+ /* 1231 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1232 E> */ B(LoadIC), R(0), U8(0), U8(239),
+ /* 1241 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1242 E> */ B(LoadIC), R(0), U8(0), U8(241),
+ /* 1251 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1252 E> */ B(LoadIC), R(0), U8(0), U8(243),
+ /* 1261 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1262 E> */ B(LoadIC), R(0), U8(0), U8(245),
+ /* 1271 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1272 E> */ B(LoadIC), R(0), U8(0), U8(247),
+ /* 1281 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1282 E> */ B(LoadIC), R(0), U8(0), U8(249),
+ /* 1291 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1292 E> */ B(LoadIC), R(0), U8(0), U8(251),
+ /* 1301 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1302 E> */ B(LoadIC), R(0), U8(0), U8(253),
+ /* 1311 S> */ B(Ldar), R(arg0),
+ B(Star), R(0),
+ /* 1312 E> */ B(LoadIC), R(0), U8(0), U8(255),
+ /* 1321 S> */ B(LdaSmi), U8(2),
+ /* 1323 E> */ B(Wide), B(StaGlobalStrict), U16(1), U16(257),
+ B(LdaUndefined),
+ /* 1328 S> */ B(Return),
]
constant pool: [
"name",
diff --git a/test/cctest/interpreter/bytecode_expectations/StringConstants.golden b/test/cctest/interpreter/bytecode_expectations/StringConstants.golden
index 9cf212c..a35df08 100644
--- a/test/cctest/interpreter/bytecode_expectations/StringConstants.golden
+++ b/test/cctest/interpreter/bytecode_expectations/StringConstants.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ /* 61 S> */ B(Return),
]
constant pool: [
"This is a string",
@@ -33,11 +33,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 58 S> */ B(LdaConstant), U8(1),
+ /* 82 S> */ B(Return),
]
constant pool: [
"First string",
@@ -54,11 +54,11 @@
parameter count: 1
bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Star), R(0),
- B(LdaConstant), U8(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaConstant), U8(0),
+ /* 42 E> */ B(Star), R(0),
+ /* 57 S> */ B(LdaConstant), U8(0),
+ /* 79 S> */ B(Return),
]
constant pool: [
"Same string",
diff --git a/test/cctest/interpreter/bytecode_expectations/Switch.golden b/test/cctest/interpreter/bytecode_expectations/Switch.golden
index c908959..c252140 100644
--- a/test/cctest/interpreter/bytecode_expectations/Switch.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Switch.golden
@@ -19,24 +19,24 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(7),
- B(Jump), U8(8),
- B(LdaSmi), U8(2),
- B(Return),
- B(LdaSmi), U8(3),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(7),
+ B(Jump), U8(8),
+ /* 66 S> */ B(LdaSmi), U8(2),
+ /* 97 S> */ B(Return),
+ /* 85 S> */ B(LdaSmi), U8(3),
+ /* 97 S> */ B(Return),
+ B(LdaUndefined),
+ /* 97 S> */ B(Return),
]
constant pool: [
]
@@ -55,26 +55,26 @@
parameter count: 1
bytecode array length: 37
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(Jump), U8(14),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(Jump), U8(8),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(Jump), U8(14),
+ /* 66 S> */ B(LdaSmi), U8(2),
+ /* 68 E> */ B(Star), R(1),
+ /* 73 S> */ B(Jump), U8(8),
+ /* 89 S> */ B(LdaSmi), U8(3),
+ /* 91 E> */ B(Star), R(1),
+ /* 96 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 105 S> */ B(Return),
]
constant pool: [
]
@@ -93,25 +93,25 @@
parameter count: 1
bytecode array length: 35
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(8),
- B(Jump), U8(12),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(8),
+ B(Jump), U8(12),
+ /* 66 S> */ B(LdaSmi), U8(2),
+ /* 68 E> */ B(Star), R(1),
+ /* 98 S> */ B(LdaSmi), U8(3),
+ /* 100 E> */ B(Star), R(1),
+ /* 105 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 114 S> */ B(Return),
]
constant pool: [
]
@@ -131,25 +131,25 @@
parameter count: 1
bytecode array length: 35
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(3),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(6),
- B(Jump), U8(6),
- B(Jump), U8(10),
- B(Jump), U8(8),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(3),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(6),
+ B(Jump), U8(6),
+ /* 66 S> */ B(Jump), U8(10),
+ /* 82 S> */ B(Jump), U8(8),
+ /* 99 S> */ B(LdaSmi), U8(1),
+ /* 101 E> */ B(Star), R(1),
+ /* 106 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 115 S> */ B(Return),
]
constant pool: [
]
@@ -169,30 +169,30 @@
parameter count: 1
bytecode array length: 44
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(TypeOf),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(3),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(Jump), U8(14),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Jump), U8(14),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(Jump), U8(8),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ B(TypeOf),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(3),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(Jump), U8(14),
+ /* 74 S> */ B(LdaSmi), U8(1),
+ /* 76 E> */ B(Star), R(1),
+ /* 81 S> */ B(Jump), U8(14),
+ /* 97 S> */ B(LdaSmi), U8(2),
+ /* 99 E> */ B(Star), R(1),
+ /* 104 S> */ B(Jump), U8(8),
+ /* 121 S> */ B(LdaSmi), U8(3),
+ /* 123 E> */ B(Star), R(1),
+ /* 128 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 137 S> */ B(Return),
]
constant pool: [
]
@@ -211,24 +211,24 @@
parameter count: 1
bytecode array length: 32
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(Ldar), R(1),
- B(TypeOf),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(8),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Jump), U8(8),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(Ldar), R(1),
+ B(TypeOf),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(8),
+ /* 74 S> */ B(LdaSmi), U8(1),
+ /* 76 E> */ B(Star), R(1),
+ /* 81 S> */ B(Jump), U8(8),
+ /* 98 S> */ B(LdaSmi), U8(2),
+ /* 100 E> */ B(Star), R(1),
+ /* 105 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 114 S> */ B(Return),
]
constant pool: [
]
@@ -314,152 +314,152 @@
parameter count: 1
bytecode array length: 289
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(1),
- B(Star), R(0),
- B(Star), R(2),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(2),
- B(JumpIfTrueConstant), U8(0),
- B(JumpConstant), U8(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(1),
- B(Jump), U8(8),
- B(LdaSmi), U8(3),
- B(Star), R(1),
- B(Jump), U8(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(1),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(2),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrueConstant), U8(0),
+ B(JumpConstant), U8(1),
+ /* 68 S> */ B(LdaSmi), U8(2),
+ /* 70 E> */ B(Star), R(1),
+ /* 77 S> */ B(LdaSmi), U8(2),
+ /* 79 E> */ B(Star), R(1),
+ /* 86 S> */ B(LdaSmi), U8(2),
+ /* 88 E> */ B(Star), R(1),
+ /* 95 S> */ B(LdaSmi), U8(2),
+ /* 97 E> */ B(Star), R(1),
+ /* 104 S> */ B(LdaSmi), U8(2),
+ /* 106 E> */ B(Star), R(1),
+ /* 113 S> */ B(LdaSmi), U8(2),
+ /* 115 E> */ B(Star), R(1),
+ /* 122 S> */ B(LdaSmi), U8(2),
+ /* 124 E> */ B(Star), R(1),
+ /* 131 S> */ B(LdaSmi), U8(2),
+ /* 133 E> */ B(Star), R(1),
+ /* 140 S> */ B(LdaSmi), U8(2),
+ /* 142 E> */ B(Star), R(1),
+ /* 149 S> */ B(LdaSmi), U8(2),
+ /* 151 E> */ B(Star), R(1),
+ /* 158 S> */ B(LdaSmi), U8(2),
+ /* 160 E> */ B(Star), R(1),
+ /* 167 S> */ B(LdaSmi), U8(2),
+ /* 169 E> */ B(Star), R(1),
+ /* 176 S> */ B(LdaSmi), U8(2),
+ /* 178 E> */ B(Star), R(1),
+ /* 185 S> */ B(LdaSmi), U8(2),
+ /* 187 E> */ B(Star), R(1),
+ /* 194 S> */ B(LdaSmi), U8(2),
+ /* 196 E> */ B(Star), R(1),
+ /* 203 S> */ B(LdaSmi), U8(2),
+ /* 205 E> */ B(Star), R(1),
+ /* 212 S> */ B(LdaSmi), U8(2),
+ /* 214 E> */ B(Star), R(1),
+ /* 221 S> */ B(LdaSmi), U8(2),
+ /* 223 E> */ B(Star), R(1),
+ /* 230 S> */ B(LdaSmi), U8(2),
+ /* 232 E> */ B(Star), R(1),
+ /* 239 S> */ B(LdaSmi), U8(2),
+ /* 241 E> */ B(Star), R(1),
+ /* 248 S> */ B(LdaSmi), U8(2),
+ /* 250 E> */ B(Star), R(1),
+ /* 257 S> */ B(LdaSmi), U8(2),
+ /* 259 E> */ B(Star), R(1),
+ /* 266 S> */ B(LdaSmi), U8(2),
+ /* 268 E> */ B(Star), R(1),
+ /* 275 S> */ B(LdaSmi), U8(2),
+ /* 277 E> */ B(Star), R(1),
+ /* 284 S> */ B(LdaSmi), U8(2),
+ /* 286 E> */ B(Star), R(1),
+ /* 293 S> */ B(LdaSmi), U8(2),
+ /* 295 E> */ B(Star), R(1),
+ /* 302 S> */ B(LdaSmi), U8(2),
+ /* 304 E> */ B(Star), R(1),
+ /* 311 S> */ B(LdaSmi), U8(2),
+ /* 313 E> */ B(Star), R(1),
+ /* 320 S> */ B(LdaSmi), U8(2),
+ /* 322 E> */ B(Star), R(1),
+ /* 329 S> */ B(LdaSmi), U8(2),
+ /* 331 E> */ B(Star), R(1),
+ /* 338 S> */ B(LdaSmi), U8(2),
+ /* 340 E> */ B(Star), R(1),
+ /* 347 S> */ B(LdaSmi), U8(2),
+ /* 349 E> */ B(Star), R(1),
+ /* 356 S> */ B(LdaSmi), U8(2),
+ /* 358 E> */ B(Star), R(1),
+ /* 365 S> */ B(LdaSmi), U8(2),
+ /* 367 E> */ B(Star), R(1),
+ /* 374 S> */ B(LdaSmi), U8(2),
+ /* 376 E> */ B(Star), R(1),
+ /* 383 S> */ B(LdaSmi), U8(2),
+ /* 385 E> */ B(Star), R(1),
+ /* 392 S> */ B(LdaSmi), U8(2),
+ /* 394 E> */ B(Star), R(1),
+ /* 401 S> */ B(LdaSmi), U8(2),
+ /* 403 E> */ B(Star), R(1),
+ /* 410 S> */ B(LdaSmi), U8(2),
+ /* 412 E> */ B(Star), R(1),
+ /* 419 S> */ B(LdaSmi), U8(2),
+ /* 421 E> */ B(Star), R(1),
+ /* 428 S> */ B(LdaSmi), U8(2),
+ /* 430 E> */ B(Star), R(1),
+ /* 437 S> */ B(LdaSmi), U8(2),
+ /* 439 E> */ B(Star), R(1),
+ /* 446 S> */ B(LdaSmi), U8(2),
+ /* 448 E> */ B(Star), R(1),
+ /* 455 S> */ B(LdaSmi), U8(2),
+ /* 457 E> */ B(Star), R(1),
+ /* 464 S> */ B(LdaSmi), U8(2),
+ /* 466 E> */ B(Star), R(1),
+ /* 473 S> */ B(LdaSmi), U8(2),
+ /* 475 E> */ B(Star), R(1),
+ /* 482 S> */ B(LdaSmi), U8(2),
+ /* 484 E> */ B(Star), R(1),
+ /* 491 S> */ B(LdaSmi), U8(2),
+ /* 493 E> */ B(Star), R(1),
+ /* 500 S> */ B(LdaSmi), U8(2),
+ /* 502 E> */ B(Star), R(1),
+ /* 509 S> */ B(LdaSmi), U8(2),
+ /* 511 E> */ B(Star), R(1),
+ /* 518 S> */ B(LdaSmi), U8(2),
+ /* 520 E> */ B(Star), R(1),
+ /* 527 S> */ B(LdaSmi), U8(2),
+ /* 529 E> */ B(Star), R(1),
+ /* 536 S> */ B(LdaSmi), U8(2),
+ /* 538 E> */ B(Star), R(1),
+ /* 545 S> */ B(LdaSmi), U8(2),
+ /* 547 E> */ B(Star), R(1),
+ /* 554 S> */ B(LdaSmi), U8(2),
+ /* 556 E> */ B(Star), R(1),
+ /* 563 S> */ B(LdaSmi), U8(2),
+ /* 565 E> */ B(Star), R(1),
+ /* 572 S> */ B(LdaSmi), U8(2),
+ /* 574 E> */ B(Star), R(1),
+ /* 581 S> */ B(LdaSmi), U8(2),
+ /* 583 E> */ B(Star), R(1),
+ /* 590 S> */ B(LdaSmi), U8(2),
+ /* 592 E> */ B(Star), R(1),
+ /* 599 S> */ B(LdaSmi), U8(2),
+ /* 601 E> */ B(Star), R(1),
+ /* 608 S> */ B(LdaSmi), U8(2),
+ /* 610 E> */ B(Star), R(1),
+ /* 617 S> */ B(LdaSmi), U8(2),
+ /* 619 E> */ B(Star), R(1),
+ /* 626 S> */ B(LdaSmi), U8(2),
+ /* 628 E> */ B(Star), R(1),
+ /* 635 S> */ B(LdaSmi), U8(2),
+ /* 637 E> */ B(Star), R(1),
+ /* 644 S> */ B(Jump), U8(8),
+ /* 662 S> */ B(LdaSmi), U8(3),
+ /* 664 E> */ B(Star), R(1),
+ /* 671 S> */ B(Jump), U8(2),
+ B(LdaUndefined),
+ /* 680 S> */ B(Return),
]
constant pool: [
262,
@@ -484,38 +484,38 @@
parameter count: 1
bytecode array length: 61
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(Star), R(0),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(TestEqualStrict), R(3),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(3),
- B(JumpIfTrue), U8(36),
- B(Jump), U8(38),
- B(Ldar), R(2),
- B(Star), R(4),
- B(LdaSmi), U8(1),
- B(Add), R(4),
- B(Star), R(1),
- B(Star), R(4),
- B(LdaSmi), U8(2),
- B(TestEqualStrict), R(4),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(8),
- B(LdaSmi), U8(1),
- B(Star), R(2),
- B(Jump), U8(8),
- B(LdaSmi), U8(2),
- B(Star), R(2),
- B(Jump), U8(2),
- B(LdaSmi), U8(3),
- B(Star), R(2),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(2),
+ /* 52 E> */ B(Star), R(0),
+ /* 45 S> */ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(TestEqualStrict), R(3),
+ B(JumpIfTrue), U8(10),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(3),
+ B(JumpIfTrue), U8(36),
+ B(Jump), U8(38),
+ /* 77 E> */ B(Ldar), R(2),
+ B(Star), R(4),
+ B(LdaSmi), U8(1),
+ B(Add), R(4),
+ /* 79 E> */ B(Star), R(1),
+ /* 70 S> */ B(Star), R(4),
+ B(LdaSmi), U8(2),
+ B(TestEqualStrict), R(4),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(8),
+ /* 101 S> */ B(LdaSmi), U8(1),
+ /* 103 E> */ B(Star), R(2),
+ /* 108 S> */ B(Jump), U8(8),
+ /* 131 S> */ B(LdaSmi), U8(2),
+ /* 133 E> */ B(Star), R(2),
+ /* 138 S> */ B(Jump), U8(2),
+ /* 176 S> */ B(LdaSmi), U8(3),
+ /* 178 E> */ B(Star), R(2),
+ B(LdaUndefined),
+ /* 185 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden b/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
index da84a49..5d7328b 100644
--- a/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
+++ b/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
@@ -14,21 +14,15 @@
f = function f() {};
f();
"
-frame size: 2
+frame size: 1
parameter count: 1
-bytecode array length: 19
+bytecode array length: 7
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(closure),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(5),
- B(Mov), R(1), R(0),
- B(Ldar), R(1),
- B(LdaUndefined),
- B(Return),
+ /* 21 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ B(LdaUndefined),
+ /* 25 S> */ B(Return),
]
constant pool: [
]
@@ -41,23 +35,14 @@
f = function f() { return f; };
f();
"
-frame size: 2
+frame size: 1
parameter count: 1
-bytecode array length: 23
+bytecode array length: 6
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(closure),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(5),
- B(Mov), R(1), R(0),
- B(Ldar), R(1),
- B(Ldar), R(0),
- B(JumpIfNotHole), U8(3),
- B(LdaUndefined),
- B(Return),
+ /* 21 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ /* 36 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/Throw.golden b/test/cctest/interpreter/bytecode_expectations/Throw.golden
index 99e17fc..7c671ac 100644
--- a/test/cctest/interpreter/bytecode_expectations/Throw.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Throw.golden
@@ -15,9 +15,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Throw),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaSmi), U8(1),
+ /* 34 E> */ B(Throw),
]
constant pool: [
]
@@ -32,9 +32,9 @@
parameter count: 1
bytecode array length: 4
bytecodes: [
- B(StackCheck),
- B(LdaConstant), U8(0),
- B(Throw),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(LdaConstant), U8(0),
+ /* 34 E> */ B(Throw),
]
constant pool: [
"Error",
@@ -50,14 +50,14 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(JumpIfToBooleanFalse), U8(5),
- B(LdaConstant), U8(0),
- B(Throw),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ /* 45 S> */ B(JumpIfToBooleanFalse), U8(5),
+ /* 54 S> */ B(LdaConstant), U8(0),
+ /* 54 E> */ B(Throw),
+ B(LdaUndefined),
+ /* 72 S> */ B(Return),
]
constant pool: [
"Error",
diff --git a/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden b/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
index 23d3609..e1d0ec3 100644
--- a/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
+++ b/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
@@ -16,25 +16,25 @@
parameter count: 1
bytecode array length: 44
bytecodes: [
- B(LdaConstant), U8(0),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
- B(StackCheck),
- B(LdaConstant), U8(1),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(2),
- B(CreateObjectLiteral), U8(2), U8(0), U8(5),
- B(Star), R(4),
- B(CreateClosure), U8(3), U8(0),
- B(StoreICSloppy), R(4), U8(4), U8(3),
- B(Ldar), R(4),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
- B(LdaUndefined),
- B(Return),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2),
+ /* 0 E> */ B(StackCheck),
+ /* 8 S> */ B(LdaConstant), U8(1),
+ B(Star), R(1),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CreateObjectLiteral), U8(2), U8(0), U8(1),
+ B(Star), R(4),
+ B(CreateClosure), U8(3), U8(0),
+ B(StoreICSloppy), R(4), U8(4), U8(3),
+ B(Ldar), R(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
+ B(LdaUndefined),
+ /* 33 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/bytecode_expectations/TryCatch.golden b/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
index 20abd3e..b57baf8 100644
--- a/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
+++ b/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
@@ -15,25 +15,25 @@
parameter count: 1
bytecode array length: 40
bytecodes: [
- B(StackCheck),
- B(Mov), R(context), R(1),
- B(LdaSmi), U8(1),
- B(Return),
- B(Star), R(3),
- B(LdaConstant), U8(0),
- B(Star), R(2),
- B(Ldar), R(closure),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(2), U8(3),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(1),
- B(PushContext), R(0),
- B(LdaSmi), U8(2),
- B(PopContext), R(0),
- B(Return),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(Mov), R(context), R(1),
+ /* 40 S> */ B(LdaSmi), U8(1),
+ /* 75 S> */ B(Return),
+ B(Star), R(3),
+ B(LdaConstant), U8(0),
+ B(Star), R(2),
+ B(Ldar), R(closure),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(2), U8(3),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(1),
+ B(PushContext), R(0),
+ /* 63 S> */ B(LdaSmi), U8(2),
+ B(PopContext), R(0),
+ /* 75 S> */ B(Return),
+ B(LdaUndefined),
+ /* 75 S> */ B(Return),
]
constant pool: [
"e",
@@ -52,41 +52,41 @@
parameter count: 1
bytecode array length: 81
bytecodes: [
- B(StackCheck),
- B(Mov), R(context), R(2),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Jump), U8(30),
- B(Star), R(4),
- B(LdaConstant), U8(0),
- B(Star), R(3),
- B(Ldar), R(closure),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(2),
- B(PushContext), R(1),
- B(PopContext), R(1),
- B(Mov), R(context), R(2),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(Jump), U8(34),
- B(Star), R(4),
- B(LdaConstant), U8(1),
- B(Star), R(3),
- B(Ldar), R(closure),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(2),
- B(PushContext), R(1),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(PopContext), R(1),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(Mov), R(context), R(2),
+ /* 47 S> */ B(LdaSmi), U8(1),
+ /* 49 E> */ B(Star), R(0),
+ B(Jump), U8(30),
+ B(Star), R(4),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(2),
+ B(PushContext), R(1),
+ B(PopContext), R(1),
+ B(Mov), R(context), R(2),
+ /* 75 S> */ B(LdaSmi), U8(2),
+ /* 77 E> */ B(Star), R(0),
+ B(Jump), U8(34),
+ B(Star), R(4),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(2),
+ B(PushContext), R(1),
+ /* 95 S> */ B(LdaSmi), U8(3),
+ /* 97 E> */ B(Star), R(0),
+ B(PopContext), R(1),
+ B(LdaUndefined),
+ /* 103 S> */ B(Return),
]
constant pool: [
"e1",
diff --git a/test/cctest/interpreter/bytecode_expectations/TryFinally.golden b/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
index e14a709..bd29e1a 100644
--- a/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
+++ b/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
@@ -16,31 +16,31 @@
parameter count: 1
bytecode array length: 51
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Mov), R(context), R(3),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(LdaSmi), U8(-1),
- B(Star), R(1),
- B(Jump), U8(7),
- B(Star), R(2),
- B(LdaZero),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(3),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(3), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(1),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(2),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ B(Mov), R(context), R(3),
+ /* 51 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(0),
+ B(LdaSmi), U8(-1),
+ B(Star), R(1),
+ B(Jump), U8(7),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(3),
+ /* 70 S> */ B(LdaSmi), U8(3),
+ /* 72 E> */ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(3), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(1),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(5),
+ B(Ldar), R(2),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 79 S> */ B(Return),
]
constant pool: [
]
@@ -57,46 +57,46 @@
parameter count: 1
bytecode array length: 88
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Mov), R(context), R(4),
- B(Mov), R(context), R(5),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(Jump), U8(34),
- B(Star), R(7),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Ldar), R(closure),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(5),
- B(PushContext), R(1),
- B(LdaSmi), U8(20),
- B(Star), R(0),
- B(PopContext), R(1),
- B(LdaSmi), U8(-1),
- B(Star), R(2),
- B(Jump), U8(7),
- B(Star), R(3),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(4),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(3),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(1),
+ /* 42 E> */ B(Star), R(0),
+ B(Mov), R(context), R(4),
+ B(Mov), R(context), R(5),
+ /* 51 S> */ B(LdaSmi), U8(2),
+ /* 53 E> */ B(Star), R(0),
+ B(Jump), U8(34),
+ B(Star), R(7),
+ B(LdaConstant), U8(0),
+ B(Star), R(6),
+ B(Ldar), R(closure),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(5),
+ B(PushContext), R(1),
+ /* 71 S> */ B(LdaSmi), U8(20),
+ /* 73 E> */ B(Star), R(0),
+ B(PopContext), R(1),
+ B(LdaSmi), U8(-1),
+ B(Star), R(2),
+ B(Jump), U8(7),
+ B(Star), R(3),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(4),
+ /* 90 S> */ B(LdaSmi), U8(3),
+ /* 92 E> */ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(5),
+ B(Ldar), R(3),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 99 S> */ B(Return),
]
constant pool: [
"e",
@@ -116,59 +116,59 @@
parameter count: 1
bytecode array length: 121
bytecodes: [
- B(StackCheck),
- B(Mov), R(context), R(4),
- B(Mov), R(context), R(5),
- B(Mov), R(context), R(6),
- B(LdaSmi), U8(1),
- B(Star), R(0),
- B(Jump), U8(34),
- B(Star), R(8),
- B(LdaConstant), U8(0),
- B(Star), R(7),
- B(Ldar), R(closure),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(7), U8(3),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(6),
- B(PushContext), R(1),
- B(LdaSmi), U8(2),
- B(Star), R(0),
- B(PopContext), R(1),
- B(Jump), U8(34),
- B(Star), R(7),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Ldar), R(closure),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Ldar), R(5),
- B(PushContext), R(1),
- B(LdaSmi), U8(20),
- B(Star), R(0),
- B(PopContext), R(1),
- B(LdaSmi), U8(-1),
- B(Star), R(2),
- B(Jump), U8(7),
- B(Star), R(3),
- B(LdaZero),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
- B(Star), R(4),
- B(LdaSmi), U8(3),
- B(Star), R(0),
- B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
- B(LdaZero),
- B(TestEqualStrict), R(2),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(3),
- B(ReThrow),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ B(Mov), R(context), R(4),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
+ /* 55 S> */ B(LdaSmi), U8(1),
+ /* 57 E> */ B(Star), R(0),
+ B(Jump), U8(34),
+ B(Star), R(8),
+ B(LdaConstant), U8(0),
+ B(Star), R(7),
+ B(Ldar), R(closure),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(7), U8(3),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(6),
+ B(PushContext), R(1),
+ /* 74 S> */ B(LdaSmi), U8(2),
+ /* 76 E> */ B(Star), R(0),
+ B(PopContext), R(1),
+ B(Jump), U8(34),
+ B(Star), R(7),
+ B(LdaConstant), U8(0),
+ B(Star), R(6),
+ B(Ldar), R(closure),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Ldar), R(5),
+ B(PushContext), R(1),
+ /* 95 S> */ B(LdaSmi), U8(20),
+ /* 97 E> */ B(Star), R(0),
+ B(PopContext), R(1),
+ B(LdaSmi), U8(-1),
+ B(Star), R(2),
+ B(Jump), U8(7),
+ B(Star), R(3),
+ B(LdaZero),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
+ B(Star), R(4),
+ /* 114 S> */ B(LdaSmi), U8(3),
+ /* 116 E> */ B(Star), R(0),
+ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
+ B(LdaZero),
+ B(TestEqualStrict), R(2),
+ B(JumpIfTrue), U8(4),
+ B(Jump), U8(5),
+ B(Ldar), R(3),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 123 S> */ B(Return),
]
constant pool: [
"e",
diff --git a/test/cctest/interpreter/bytecode_expectations/Typeof.golden b/test/cctest/interpreter/bytecode_expectations/Typeof.golden
index e5db7a7..b0e80dd 100644
--- a/test/cctest/interpreter/bytecode_expectations/Typeof.golden
+++ b/test/cctest/interpreter/bytecode_expectations/Typeof.golden
@@ -20,11 +20,11 @@
parameter count: 1
bytecode array length: 7
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(13),
- B(Star), R(0),
- B(TypeOf),
- B(Return),
+ /* 10 E> */ B(StackCheck),
+ /* 24 S> */ B(LdaSmi), U8(13),
+ /* 24 E> */ B(Star), R(0),
+ /* 29 S> */ B(TypeOf),
+ /* 47 S> */ B(Return),
]
constant pool: [
]
@@ -43,10 +43,10 @@
parameter count: 1
bytecode array length: 6
bytecodes: [
- B(StackCheck),
- B(LdaGlobalInsideTypeof), U8(0), U8(1),
- B(TypeOf),
- B(Return),
+ /* 22 E> */ B(StackCheck),
+ /* 28 S> */ B(LdaGlobalInsideTypeof), U8(0), U8(1),
+ B(TypeOf),
+ /* 46 S> */ B(Return),
]
constant pool: [
"x",
diff --git a/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
index 0a3ca76..f253be9 100644
--- a/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
+++ b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
@@ -19,24 +19,24 @@
parameter count: 1
bytecode array length: 31
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(10),
- B(TestEqual), R(1),
- B(LogicalNot),
- B(JumpIfFalse), U8(15),
- B(StackCheck),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(10),
- B(Add), R(1),
- B(Star), R(0),
- B(Jump), U8(-22),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaZero),
+ /* 42 E> */ B(Star), R(0),
+ /* 54 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(10),
+ /* 54 E> */ B(TestEqual), R(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(15),
+ /* 45 E> */ B(StackCheck),
+ /* 65 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi), U8(10),
+ B(Add), R(1),
+ /* 67 E> */ B(Star), R(0),
+ B(Jump), U8(-22),
+ /* 79 S> */ B(Ldar), R(0),
+ /* 89 S> */ B(Return),
]
constant pool: [
]
@@ -55,20 +55,20 @@
parameter count: 1
bytecode array length: 22
bytecodes: [
- B(StackCheck),
- B(LdaFalse),
- B(Star), R(0),
- B(StackCheck),
- B(Ldar), R(0),
- B(LogicalNot),
- B(Star), R(0),
- B(Ldar), R(0),
- B(Star), R(1),
- B(LdaFalse),
- B(TestEqual), R(1),
- B(JumpIfTrue), U8(-13),
- B(Ldar), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaFalse),
+ /* 42 E> */ B(Star), R(0),
+ /* 49 E> */ B(StackCheck),
+ /* 56 S> */ B(Ldar), R(0),
+ B(ToBooleanLogicalNot),
+ /* 58 E> */ B(Star), R(0),
+ /* 74 S> */ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaFalse),
+ /* 74 E> */ B(TestEqual), R(1),
+ B(JumpIfTrue), U8(-13),
+ /* 85 S> */ B(Ldar), R(0),
+ /* 95 S> */ B(Return),
]
constant pool: [
]
@@ -84,14 +84,14 @@
parameter count: 1
bytecode array length: 13
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(101),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(3),
- B(Mul), R(1),
- B(LdaUndefined),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(101),
+ /* 42 E> */ B(Star), R(0),
+ /* 47 S> */ B(Star), R(1),
+ B(LdaSmi), U8(3),
+ B(Mul), R(1),
+ B(LdaUndefined),
+ /* 67 S> */ B(Return),
]
constant pool: [
]
@@ -108,18 +108,18 @@
parameter count: 1
bytecode array length: 23
bytecodes: [
- B(StackCheck),
- B(Wide), B(LdaSmi), U16(1234),
- B(Star), R(0),
- B(Star), R(2),
- B(Ldar), R(0),
- B(Mul), R(2),
- B(Star), R(3),
- B(LdaSmi), U8(1),
- B(Sub), R(3),
- B(LdaUndefined),
- B(Star), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(Wide), B(LdaSmi), U16(1234),
+ /* 42 E> */ B(Star), R(0),
+ /* 56 S> */ B(Star), R(2),
+ /* 66 E> */ B(Ldar), R(0),
+ B(Mul), R(2),
+ B(Star), R(3),
+ B(LdaSmi), U8(1),
+ B(Sub), R(3),
+ B(LdaUndefined),
+ /* 56 E> */ B(Star), R(1),
+ /* 84 S> */ B(Return),
]
constant pool: [
]
@@ -135,13 +135,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(13),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(-1),
- B(BitwiseXor), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(13),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(-1),
+ B(BitwiseXor), R(1),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -157,13 +157,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(13),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(1),
- B(Mul), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(13),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(1),
+ B(Mul), R(1),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
@@ -179,13 +179,13 @@
parameter count: 1
bytecode array length: 12
bytecodes: [
- B(StackCheck),
- B(LdaSmi), U8(13),
- B(Star), R(0),
- B(Star), R(1),
- B(LdaSmi), U8(-1),
- B(Mul), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 42 S> */ B(LdaSmi), U8(13),
+ /* 42 E> */ B(Star), R(0),
+ /* 46 S> */ B(Star), R(1),
+ B(LdaSmi), U8(-1),
+ B(Mul), R(1),
+ /* 57 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden b/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
index 9300775..2c23cce 100644
--- a/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
+++ b/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
@@ -171,12 +171,12 @@
"
frame size: 157
parameter count: 1
-bytecode array length: 6
+bytecode array length: 8
bytecodes: [
- B(StackCheck),
- B(Ldar), R(127),
- B(Star), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1494 S> */ B(Wide), B(Ldar), R16(127),
+ /* 1497 E> */ B(Star), R(0),
+ /* 1516 S> */ B(Return),
]
constant pool: [
]
@@ -347,12 +347,12 @@
"
frame size: 157
parameter count: 1
-bytecode array length: 6
+bytecode array length: 10
bytecodes: [
- B(StackCheck),
- B(Ldar), R(126),
- B(Star), R(127),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1494 S> */ B(Wide), B(Ldar), R16(126),
+ /* 1499 E> */ B(Wide), B(Star), R16(127),
+ /* 1520 S> */ B(Return),
]
constant pool: [
]
@@ -523,18 +523,18 @@
"
frame size: 158
parameter count: 1
-bytecode array length: 23
+bytecode array length: 25
bytecodes: [
- B(StackCheck),
- B(Ldar), R(2),
- B(Wide), B(Star), R16(157),
- B(LdaSmi), U8(3),
- B(Wide), B(TestGreaterThan), R16(157),
- B(JumpIfFalse), U8(7),
- B(Wide), B(Ldar), R16(129),
- B(Return),
- B(Ldar), R(128),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1494 S> */ B(Ldar), R(2),
+ B(Wide), B(Star), R16(157),
+ B(LdaSmi), U8(3),
+ /* 1501 E> */ B(Wide), B(TestGreaterThan), R16(157),
+ B(JumpIfFalse), U8(7),
+ /* 1508 S> */ B(Wide), B(Ldar), R16(129),
+ /* 1536 S> */ B(Return),
+ /* 1523 S> */ B(Wide), B(Ldar), R16(128),
+ /* 1536 S> */ B(Return),
]
constant pool: [
]
@@ -709,25 +709,25 @@
parameter count: 1
bytecode array length: 48
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(Wide), B(Ldar), R16(129),
- B(Wide), B(Star), R16(157),
- B(LdaSmi), U8(3),
- B(Wide), B(TestEqual), R16(157),
- B(JumpIfFalse), U8(8),
- B(Ldar), R(0),
- B(Wide), B(Star), R16(129),
- B(Ldar), R(2),
- B(Wide), B(Star), R16(157),
- B(LdaSmi), U8(3),
- B(Wide), B(TestGreaterThan), R16(157),
- B(JumpIfFalse), U8(5),
- B(Ldar), R(0),
- B(Return),
- B(Wide), B(Ldar), R16(129),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1503 S> */ B(LdaZero),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1506 S> */ B(Wide), B(Ldar), R16(129),
+ B(Wide), B(Star), R16(157),
+ B(LdaSmi), U8(3),
+ /* 1515 E> */ B(Wide), B(TestEqual), R16(157),
+ B(JumpIfFalse), U8(8),
+ /* 1534 S> */ B(Ldar), R(0),
+ /* 1534 E> */ B(Wide), B(Star), R16(129),
+ /* 1540 S> */ B(Ldar), R(2),
+ B(Wide), B(Star), R16(157),
+ B(LdaSmi), U8(3),
+ /* 1547 E> */ B(Wide), B(TestGreaterThan), R16(157),
+ B(JumpIfFalse), U8(5),
+ /* 1554 S> */ B(Ldar), R(0),
+ /* 1580 S> */ B(Return),
+ /* 1567 S> */ B(Wide), B(Ldar), R16(129),
+ /* 1580 S> */ B(Return),
]
constant pool: [
]
@@ -899,34 +899,34 @@
"
frame size: 158
parameter count: 1
-bytecode array length: 54
+bytecode array length: 66
bytecodes: [
- B(StackCheck),
- B(LdaZero),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(LdaZero),
- B(Star), R(128),
- B(Ldar), R(128),
- B(Wide), B(Star), R16(157),
- B(LdaSmi), U8(64),
- B(Wide), B(TestLessThan), R16(157),
- B(JumpIfFalse), U8(29),
- B(StackCheck),
- B(Ldar), R(1),
- B(Wide), B(Star), R16(157),
- B(Ldar), R(128),
- B(Wide), B(Add), R16(157),
- B(Star), R(1),
- B(Ldar), R(128),
- B(ToNumber),
- B(Wide), B(Star), R16(157),
- B(Inc),
- B(Star), R(128),
- B(Jump), U8(-39),
- B(Ldar), R(128),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1503 S> */ B(LdaZero),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1515 S> */ B(LdaZero),
+ /* 1515 E> */ B(Star), R(1),
+ /* 1523 S> */ B(LdaZero),
+ /* 1528 E> */ B(Wide), B(Star), R16(128),
+ /* 1538 S> */ B(Wide), B(Ldar), R16(128),
+ B(Wide), B(Star), R16(157),
+ B(LdaSmi), U8(64),
+ /* 1538 E> */ B(Wide), B(TestLessThan), R16(157),
+ B(JumpIfFalse), U8(35),
+ /* 1518 E> */ B(StackCheck),
+ /* 1555 S> */ B(Ldar), R(1),
+ B(Wide), B(Star), R16(157),
+ /* 1561 E> */ B(Wide), B(Ldar), R16(128),
+ B(Wide), B(Add), R16(157),
+ /* 1558 E> */ B(Star), R(1),
+ /* 1548 S> */ B(Wide), B(Ldar), R16(128),
+ B(ToNumber),
+ B(Wide), B(Star), R16(157),
+ B(Inc),
+ /* 1548 E> */ B(Wide), B(Star), R16(128),
+ B(Jump), U8(-47),
+ /* 1567 S> */ B(Wide), B(Ldar), R16(128),
+ /* 1580 S> */ B(Return),
]
constant pool: [
]
@@ -1098,37 +1098,37 @@
"
frame size: 163
parameter count: 1
-bytecode array length: 80
+bytecode array length: 84
bytecodes: [
- B(StackCheck),
- B(Wide), B(LdaSmi), U16(1234),
- B(Star), R(0),
- B(LdaZero),
- B(Star), R(1),
- B(Ldar), R(0),
- B(JumpIfUndefined), U8(65),
- B(JumpIfNull), U8(63),
- B(ToObject),
- B(Wide), B(Star), R16(157),
- B(Wide), B(ForInPrepare), R16(158),
- B(LdaZero),
- B(Wide), B(Star), R16(161),
- B(Wide), B(ForInDone), R16(161), R16(160),
- B(JumpIfTrue), U8(41),
- B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(1),
- B(JumpIfUndefined), U8(19),
- B(Star), R(128),
- B(StackCheck),
- B(Ldar), R(1),
- B(Wide), B(Star), R16(162),
- B(Ldar), R(128),
- B(Wide), B(Add), R16(162),
- B(Star), R(1),
- B(Wide), B(ForInStep), R16(161),
- B(Wide), B(Star), R16(161),
- B(Jump), U8(-45),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1503 S> */ B(Wide), B(LdaSmi), U16(1234),
+ /* 1503 E> */ B(Star), R(0),
+ /* 1518 S> */ B(LdaZero),
+ /* 1518 E> */ B(Star), R(1),
+ /* 1534 S> */ B(Ldar), R(0),
+ B(JumpIfUndefined), U8(69),
+ B(JumpIfNull), U8(67),
+ B(ToObject),
+ B(Wide), B(Star), R16(157),
+ B(Wide), B(ForInPrepare), R16(158),
+ B(LdaZero),
+ B(Wide), B(Star), R16(161),
+ /* 1526 S> */ B(Wide), B(ForInDone), R16(161), R16(160),
+ B(JumpIfTrue), U8(45),
+ B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(1),
+ B(JumpIfUndefined), U8(23),
+ B(Wide), B(Star), R16(128),
+ /* 1521 E> */ B(StackCheck),
+ /* 1541 S> */ B(Ldar), R(1),
+ B(Wide), B(Star), R16(162),
+ /* 1547 E> */ B(Wide), B(Ldar), R16(128),
+ B(Wide), B(Add), R16(162),
+ /* 1544 E> */ B(Star), R(1),
+ B(Wide), B(ForInStep), R16(161),
+ B(Wide), B(Star), R16(161),
+ B(Jump), U8(-49),
+ /* 1553 S> */ B(Ldar), R(1),
+ /* 1564 S> */ B(Return),
]
constant pool: [
]
@@ -1303,22 +1303,22 @@
parameter count: 1
bytecode array length: 55
bytecodes: [
- B(StackCheck),
- B(Ldar), R(64),
- B(Wide), B(Star), R16(157),
- B(Ldar), R(63),
- B(Wide), B(Star), R16(158),
- B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
- B(Star), R(0),
- B(Ldar), R(27),
- B(Wide), B(Star), R16(157),
- B(Wide), B(Ldar), R16(143),
- B(Wide), B(Star), R16(158),
- B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0),
- B(Ldar), R(1),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 1494 S> */ B(Ldar), R(64),
+ B(Wide), B(Star), R16(157),
+ /* 1509 E> */ B(Ldar), R(63),
+ B(Wide), B(Star), R16(158),
+ B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
+ /* 1497 E> */ B(Star), R(0),
+ /* 1515 S> */ B(Ldar), R(27),
+ B(Wide), B(Star), R16(157),
+ /* 1530 E> */ B(Wide), B(Ldar), R16(143),
+ B(Wide), B(Star), R16(158),
+ B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
+ /* 1518 E> */ B(Star), R(1),
+ /* 1537 S> */ B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0),
+ /* 1549 S> */ B(Ldar), R(1),
+ /* 1560 S> */ B(Return),
]
constant pool: [
]
diff --git a/test/cctest/interpreter/bytecode_expectations/WithStatement.golden b/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
index 350a0a5..e1b7eda 100644
--- a/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
+++ b/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
@@ -15,18 +15,18 @@
parameter count: 1
bytecode array length: 26
bytecodes: [
- B(StackCheck),
- B(CreateObjectLiteral), U8(0), U8(0), U8(5),
- B(Star), R(1),
- B(ToObject),
- B(Star), R(2),
- B(Ldar), R(closure),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kPushWithContext), R(2), U8(2),
- B(PushContext), R(0),
- B(LdaLookupSlot), U8(1),
- B(PopContext), R(0),
- B(Return),
+ /* 30 E> */ B(StackCheck),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
+ B(Star), R(1),
+ B(ToObject),
+ B(Star), R(2),
+ B(Ldar), R(closure),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kPushWithContext), R(2), U8(2),
+ B(PushContext), R(0),
+ /* 50 S> */ B(LdaLookupSlot), U8(1),
+ B(PopContext), R(0),
+ /* 62 S> */ B(Return),
]
constant pool: [
InstanceType::FIXED_ARRAY_TYPE,
diff --git a/test/cctest/interpreter/generate-bytecode-expectations.cc b/test/cctest/interpreter/generate-bytecode-expectations.cc
index 92ba9ba..f3dfd06 100644
--- a/test/cctest/interpreter/generate-bytecode-expectations.cc
+++ b/test/cctest/interpreter/generate-bytecode-expectations.cc
@@ -44,6 +44,7 @@
execute_(true),
top_level_(false),
do_expressions_(false),
+ ignition_generators_(false),
verbose_(false),
const_pool_type_(
BytecodeExpectationsPrinter::ConstantPoolType::kMixed) {}
@@ -64,6 +65,7 @@
bool execute() const { return execute_; }
bool top_level() const { return top_level_; }
bool do_expressions() const { return do_expressions_; }
+ bool ignition_generators() const { return ignition_generators_; }
bool verbose() const { return verbose_; }
bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; }
BytecodeExpectationsPrinter::ConstantPoolType const_pool_type() const {
@@ -83,6 +85,7 @@
bool execute_;
bool top_level_;
bool do_expressions_;
+ bool ignition_generators_;
bool verbose_;
BytecodeExpectationsPrinter::ConstantPoolType const_pool_type_;
std::vector<std::string> input_filenames_;
@@ -212,6 +215,8 @@
options.top_level_ = true;
} else if (strcmp(argv[i], "--do-expressions") == 0) {
options.do_expressions_ = true;
+ } else if (strcmp(argv[i], "--ignition-generators") == 0) {
+ options.ignition_generators_ = true;
} else if (strcmp(argv[i], "--verbose") == 0) {
options.verbose_ = true;
} else if (strncmp(argv[i], "--output=", 9) == 0) {
@@ -316,6 +321,8 @@
top_level_ = ParseBoolean(line.c_str() + 11);
} else if (line.compare(0, 16, "do expressions: ") == 0) {
do_expressions_ = ParseBoolean(line.c_str() + 16);
+ } else if (line.compare(0, 21, "ignition generators: ") == 0) {
+ ignition_generators_ = ParseBoolean(line.c_str() + 21);
} else if (line == "---") {
break;
} else if (line.empty()) {
@@ -340,6 +347,7 @@
if (top_level_) stream << "\ntop level: yes";
if (do_expressions_) stream << "\ndo expressions: yes";
+ if (ignition_generators_) stream << "\nignition generators: yes";
stream << "\n\n";
}
@@ -445,6 +453,7 @@
}
if (options.do_expressions()) i::FLAG_harmony_do_expressions = true;
+ if (options.ignition_generators()) i::FLAG_ignition_generators = true;
stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
options.PrintHeader(stream);
@@ -497,6 +506,7 @@
"Specify the name of the test function.\n"
" --top-level Process top level code, not the top-level function.\n"
" --do-expressions Enable harmony_do_expressions flag.\n"
+ " --ignition-generators Enable ignition_generators flag.\n"
" --output=file.name\n"
" Specify the output file. If not specified, output goes to "
"stdout.\n"
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index 2519f25..3d0fe6f 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -113,6 +113,44 @@
return actual_stream.str();
}
+bool CompareTexts(const std::string& generated, const std::string& expected) {
+ std::istringstream generated_stream(generated);
+ std::istringstream expected_stream(expected);
+ std::string generated_line;
+ std::string expected_line;
+ // Line number does not include golden file header.
+ int line_number = 0;
+
+ do {
+ std::getline(generated_stream, generated_line);
+ std::getline(expected_stream, expected_line);
+
+ if (!generated_stream.good() && !expected_stream.good()) {
+ return true;
+ }
+
+ if (!generated_stream.good()) {
+ std::cerr << "Expected has extra lines after line " << line_number
+ << "\n";
+ std::cerr << " Expected: '" << expected_line << "'\n";
+ return false;
+ } else if (!expected_stream.good()) {
+ std::cerr << "Generated has extra lines after line " << line_number
+ << "\n";
+ std::cerr << " Generated: '" << generated_line << "'\n";
+ return false;
+ }
+
+ if (generated_line != expected_line) {
+ std::cerr << "Inputs differ at line " << line_number << "\n";
+ std::cerr << " Generated: '" << generated_line << "'\n";
+ std::cerr << " Expected: '" << expected_line << "'\n";
+ return false;
+ }
+ line_number++;
+ } while (true);
+}
+
using ConstantPoolType = BytecodeExpectationsPrinter::ConstantPoolType;
TEST(PrimitiveReturnStatements) {
@@ -122,27 +160,27 @@
const char* snippets[] = {
"",
- "return;",
+ "return;\n",
- "return null;",
+ "return null;\n",
- "return true;",
+ "return true;\n",
- "return false;",
+ "return false;\n",
- "return 0;",
+ "return 0;\n",
- "return +1;",
+ "return +1;\n",
- "return -1;",
+ "return -1;\n",
- "return +127;",
+ "return +127;\n",
- "return -128;",
+ "return -128;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("PrimitiveReturnStatements.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PrimitiveReturnStatements.golden")));
}
TEST(PrimitiveExpressions) {
@@ -150,35 +188,35 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "var x = 0; return x;",
+ "var x = 0; return x;\n",
- "var x = 0; return x + 3;",
+ "var x = 0; return x + 3;\n",
- "var x = 0; return x - 3;",
+ "var x = 0; return x - 3;\n",
- "var x = 4; return x * 3;",
+ "var x = 4; return x * 3;\n",
- "var x = 4; return x / 3;",
+ "var x = 4; return x / 3;\n",
- "var x = 4; return x % 3;",
+ "var x = 4; return x % 3;\n",
- "var x = 1; return x | 2;",
+ "var x = 1; return x | 2;\n",
- "var x = 1; return x ^ 2;",
+ "var x = 1; return x ^ 2;\n",
- "var x = 1; return x & 2;",
+ "var x = 1; return x & 2;\n",
- "var x = 10; return x << 3;",
+ "var x = 10; return x << 3;\n",
- "var x = 10; return x >> 3;",
+ "var x = 10; return x >> 3;\n",
- "var x = 10; return x >>> 3;",
+ "var x = 10; return x >>> 3;\n",
- "var x = 0; return (x, 3);",
+ "var x = 0; return (x, 3);\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("PrimitiveExpressions.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PrimitiveExpressions.golden")));
}
TEST(LogicalExpressions) {
@@ -186,43 +224,43 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "var x = 0; return x || 3;",
+ "var x = 0; return x || 3;\n",
- "var x = 0; return (x == 1) || 3;",
+ "var x = 0; return (x == 1) || 3;\n",
- "var x = 0; return x && 3;",
+ "var x = 0; return x && 3;\n",
- "var x = 0; return (x == 0) && 3;",
+ "var x = 0; return (x == 0) && 3;\n",
- "var x = 0; return x || (1, 2, 3);",
+ "var x = 0; return x || (1, 2, 3);\n",
- "var a = 2, b = 3, c = 4; return a || (a, b, a, b, c = 5, 3);",
+ "var a = 2, b = 3, c = 4; return a || (a, b, a, b, c = 5, 3);\n",
"var x = 1; var a = 2, b = 3; return x || (" //
REPEAT_32("\n a = 1, b = 2, ") //
- "3);",
+ "3);\n",
"var x = 0; var a = 2, b = 3; return x && (" //
REPEAT_32("\n a = 1, b = 2, ") //
- "3);",
+ "3);\n",
"var x = 1; var a = 2, b = 3; return (x > 3) || (" //
REPEAT_32("\n a = 1, b = 2, ") //
- "3);",
+ "3);\n",
"var x = 0; var a = 2, b = 3; return (x < 5) && (" //
REPEAT_32("\n a = 1, b = 2, ") //
- "3);",
+ "3);\n",
- "return 0 && 3;",
+ "return 0 && 3;\n",
- "return 1 || 3;",
+ "return 1 || 3;\n",
- "var x = 1; return x && 3 || 0, 1;",
+ "var x = 1; return x && 3 || 0, 1;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("LogicalExpressions.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("LogicalExpressions.golden")));
}
TEST(Parameters) {
@@ -248,8 +286,8 @@
"function f(arg1, arg2, arg3, arg4) { arg2 = 1; }",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("Parameters.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("Parameters.golden")));
}
TEST(IntegerConstants) {
@@ -257,15 +295,15 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "return 12345678;",
+ "return 12345678;\n",
- "var a = 1234; return 5678;",
+ "var a = 1234; return 5678;\n",
- "var a = 1234; return 1234;",
+ "var a = 1234; return 1234;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("IntegerConstants.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("IntegerConstants.golden")));
}
TEST(HeapNumberConstants) {
@@ -273,19 +311,19 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "return 1.2;",
+ "return 1.2;\n",
- "var a = 1.2; return 2.6;",
+ "var a = 1.2; return 2.6;\n",
- "var a = 3.14; return 3.14;",
+ "var a = 3.14; return 3.14;\n",
"var a;" //
REPEAT_256("\na = 1.414;") //
- " a = 3.14;",
+ " a = 3.14;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("HeapNumberConstants.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("HeapNumberConstants.golden")));
}
TEST(StringConstants) {
@@ -293,15 +331,15 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "return \"This is a string\";",
+ "return \"This is a string\";\n",
- "var a = \"First string\"; return \"Second string\";",
+ "var a = \"First string\"; return \"Second string\";\n",
- "var a = \"Same string\"; return \"Same string\";",
+ "var a = \"Same string\"; return \"Same string\";\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("StringConstants.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("StringConstants.golden")));
}
TEST(PropertyLoads) {
@@ -313,16 +351,16 @@
const char* snippets[] = {
"function f(a) { return a.name; }\n"
- "f({name : \"test\"});",
+ "f({name : \"test\"});\n",
"function f(a) { return a[\"key\"]; }\n"
- "f({key : \"test\"});",
+ "f({key : \"test\"});\n",
"function f(a) { return a[100]; }\n"
- "f({100 : \"test\"});",
+ "f({100 : \"test\"});\n",
"function f(a, b) { return a[b]; }\n"
- "f({arg : \"test\"}, \"arg\");",
+ "f({arg : \"test\"}, \"arg\");\n",
"function f(a) { var b = a.name; return a[-124]; }\n"
"f({\"-124\" : \"test\", name : 123 })",
@@ -344,7 +382,8 @@
"f({name : \"test\"}, \"name\")\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("PropertyLoads.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PropertyLoads.golden")));
}
TEST(PropertyStores) {
@@ -407,7 +446,8 @@
"f({name : \"test\"})\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("PropertyStores.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PropertyStores.golden")));
}
#define FUNC_ARG "new (function Obj() { this.func = function() { return; }})()"
@@ -436,7 +476,8 @@
"f(" FUNC_ARG ")",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("PropertyCall.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PropertyCall.golden")));
}
TEST(LoadGlobal) {
@@ -465,10 +506,11 @@
REPEAT_127(" b.name;\n")
" return a;\n"
"}\n"
- "f({name: 1});",
+ "f({name: 1});\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("LoadGlobal.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("LoadGlobal.golden")));
}
TEST(StoreGlobal) {
@@ -481,18 +523,18 @@
const char* snippets[] = {
"var a = 1;\n"
"function f() { a = 2; }\n"
- "f();",
+ "f();\n",
"var a = \"test\"; function f(b) { a = b; }\n"
- "f(\"global\");",
+ "f(\"global\");\n",
"'use strict'; var a = 1;\n"
"function f() { a = 2; }\n"
- "f();",
+ "f();\n",
"a = 1;\n"
"function f() { a = 2; }\n"
- "f();",
+ "f();\n",
"a = 1;\n"
"function f(b) {\n"
@@ -500,7 +542,7 @@
REPEAT_127(" b.name;\n")
" a = 2;\n"
"}\n"
- "f({name: 1});",
+ "f({name: 1});\n",
"a = 1;\n"
"function f(b) {\n"
@@ -509,10 +551,11 @@
REPEAT_127(" b.name;\n")
" a = 2;\n"
"}\n"
- "f({name: 1});",
+ "f({name: 1});\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("StoreGlobal.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("StoreGlobal.golden")));
}
TEST(CallGlobal) {
@@ -525,14 +568,15 @@
const char* snippets[] = {
"function t() { }\n"
"function f() { return t(); }\n"
- "f();",
+ "f();\n",
"function t(a, b, c) { }\n"
"function f() { return t(1, 2, 3); }\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallGlobal.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CallGlobal.golden")));
}
TEST(CallRuntime) {
@@ -544,30 +588,26 @@
const char* snippets[] = {
"function f() { %TheHole() }\n"
- "f();",
+ "f();\n",
"function f(a) { return %IsArray(a) }\n"
- "f(undefined);",
+ "f(undefined);\n",
"function f() { return %Add(1, 2) }\n"
- "f();",
+ "f();\n",
"function f() { return %spread_iterable([1]) }\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallRuntime.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CallRuntime.golden")));
}
TEST(IfConditions) {
- if (FLAG_harmony_instanceof) {
- // TODO(mvstanton): when ES6 instanceof ships, regenerate the bytecode
- // expectations and remove this flag check.
- return;
- }
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate(),
- ConstantPoolType::kNumber);
+ ConstantPoolType::kMixed);
printer.set_wrap(false);
printer.set_test_function_name("f");
@@ -579,7 +619,7 @@
" return -1;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
"function f() {\n"
" if ('lucky') {\n"
@@ -588,7 +628,7 @@
" return -1;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
"function f() {\n"
" if (false) {\n"
@@ -597,14 +637,14 @@
" return -1;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
"function f() {\n"
" if (false) {\n"
" return 1;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
"function f() {\n"
" var a = 1;\n"
@@ -614,7 +654,7 @@
" return 2;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
"function f(a) {\n"
" if (a <= 0) {\n"
@@ -623,14 +663,14 @@
" return -200;\n"
" }\n"
"};\n"
- "f(99);",
+ "f(99);\n",
"function f(a, b) { if (a in b) { return 200; } }"
- "f('prop', { prop: 'yes'});",
+ "f('prop', { prop: 'yes'});\n",
"function f(z) { var a = 0; var b = 0; if (a === 0.01) {\n"
REPEAT_64(" b = a; a = b;\n")
- " return 200; } else { return -200; } } f(0.001);",
+ " return 200; } else { return -200; } } f(0.001);\n",
"function f() {\n"
" var a = 0; var b = 0;\n"
@@ -638,7 +678,7 @@
REPEAT_64(" b = a; a = b;\n")
" return 200; } else { return -200; }\n"
"};\n"
- "f();",
+ "f();\n",
"function f(a, b) {\n"
" if (a == b) { return 1; }\n"
@@ -651,7 +691,7 @@
" if (a instanceof b) { return 1; }\n"
" return 0;\n"
"}\n"
- "f(1, 1);",
+ "f(1, 1);\n",
"function f() {\n"
" var a = 0;\n"
@@ -661,10 +701,11 @@
" return -20;\n"
" }\n"
"};\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("IfConditions.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("IfConditions.golden")));
}
TEST(DeclareGlobals) {
@@ -677,18 +718,19 @@
printer.set_top_level(true);
const char* snippets[] = {
- "var a = 1;",
+ "var a = 1;\n",
- "function f() {}",
+ "function f() {}\n",
"var a = 1;\n"
- "a=2;",
+ "a=2;\n",
"function f() {}\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("DeclareGlobals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("DeclareGlobals.golden")));
}
TEST(BreakableBlocks) {
@@ -703,7 +745,7 @@
" break label;\n"
" x = x + 1;\n"
"}\n"
- "return x;",
+ "return x;\n",
"var sum = 0;\n"
"outer: {\n"
@@ -714,7 +756,7 @@
" }\n"
" }\n"
"}\n"
- "return sum;",
+ "return sum;\n",
"outer: {\n"
" let y = 10;\n"
@@ -731,11 +773,11 @@
" y = 3;\n"
" }\n"
"}\n"
- "x = 4;",
+ "x = 4;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("BreakableBlocks.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("BreakableBlocks.golden")));
}
TEST(BasicLoops) {
@@ -745,13 +787,13 @@
const char* snippets[] = {
"var x = 0;\n"
"while (false) { x = 99; break; continue; }\n"
- "return x;",
+ "return x;\n",
"var x = 0;\n"
"while (false) {\n"
" x = x + 1;\n"
"};\n"
- "return x;",
+ "return x;\n",
"var x = 0;\n"
"var y = 1;\n"
@@ -761,7 +803,7 @@
" if (x == 3) continue;\n"
" if (x == 4) break;\n"
"}\n"
- "return y;",
+ "return y;\n",
"var i = 0;\n"
"while (true) {\n"
@@ -772,7 +814,7 @@
" if (i == 5) break;\n"
" i = i + 1;\n"
"}\n"
- "return i;",
+ "return i;\n",
"var i = 0;\n"
"while (true) {\n"
@@ -783,7 +825,7 @@
" i = i + 1;\n"
" break;\n"
"}\n"
- "return i;",
+ "return i;\n",
"var x = 10;\n"
"var y = 1;\n"
@@ -791,7 +833,7 @@
" y = y * 12;\n"
" x = x - 1;\n"
"}\n"
- "return y;",
+ "return y;\n",
"var x = 0; var y = 1;\n"
"do {\n"
@@ -800,7 +842,7 @@
" if (x == 6) continue;\n"
" x = x + 1;\n"
"} while (x < 10);\n"
- "return y;",
+ "return y;\n",
"var x = 10;\n"
"var y = 1;\n"
@@ -808,7 +850,7 @@
" y = y * 12;\n"
" x = x - 1;\n"
"} while (x);\n"
- "return y;",
+ "return y;\n",
"var x = 0; var y = 1;\n"
"do {\n"
@@ -817,7 +859,7 @@
" x = x + 1;\n"
" if (x == 6) continue;\n"
"} while (false);\n"
- "return y;",
+ "return y;\n",
"var x = 0; var y = 1;\n"
"do {\n"
@@ -826,56 +868,56 @@
" x = x + 1;\n"
" if (x == 6) continue;\n"
"} while (true);\n"
- "return y;",
+ "return y;\n",
"var x = 0;\n"
"for (;;) {\n"
" if (x == 1) break;\n"
" if (x == 2) continue;\n"
" x = x + 1;\n"
- "}",
+ "}\n",
"for (var x = 0;;) {\n"
" if (x == 1) break;\n"
" if (x == 2) continue;\n"
" x = x + 1;\n"
- "}",
+ "}\n",
"var x = 0;\n"
"for (;; x = x + 1) {\n"
" if (x == 1) break;\n"
" if (x == 2) continue;\n"
- "}",
+ "}\n",
"for (var x = 0;; x = x + 1) {\n"
" if (x == 1) break;\n"
" if (x == 2) continue;\n"
- "}",
+ "}\n",
"var u = 0;\n"
"for (var i = 0; i < 100; i = i + 1) {\n"
" u = u + 1;\n"
" continue;\n"
- "}",
+ "}\n",
"var y = 1;\n"
"for (var x = 10; x; --x) {\n"
" y = y * 12;\n"
"}\n"
- "return y;",
+ "return y;\n",
"var x = 0;\n"
"for (var i = 0; false; i++) {\n"
" x = x + 1;\n"
"};\n"
- "return x;",
+ "return x;\n",
"var x = 0;\n"
"for (var i = 0; true; ++i) {\n"
" x = x + 1;\n"
" if (x == 20) break;\n"
"};\n"
- "return x;",
+ "return x;\n",
"var a = 0;\n"
"while (a) {\n"
@@ -885,10 +927,11 @@
" if (z) continue;\n"
" z++;\n"
" }\n"
- "}",
+ "}\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("BasicLoops.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("BasicLoops.golden")));
}
TEST(JumpsRequiringConstantWideOperands) {
@@ -904,11 +947,11 @@
" if (i == 1) continue;\n"
" if (i == 2) break;\n"
"}\n"
- "return 3;",
+ "return 3;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("JumpsRequiringConstantWideOperands.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("JumpsRequiringConstantWideOperands.golden")));
}
TEST(UnaryOperators) {
@@ -920,32 +963,33 @@
"while (x != 10) {\n"
" x = x + 10;\n"
"}\n"
- "return x;",
+ "return x;\n",
"var x = false;\n"
"do {\n"
" x = !x;\n"
"} while(x == false);\n"
- "return x;",
+ "return x;\n",
"var x = 101;\n"
- "return void(x * 3);",
+ "return void(x * 3);\n",
"var x = 1234;\n"
"var y = void (x * x - 1);\n"
- "return y;",
+ "return y;\n",
"var x = 13;\n"
- "return ~x;",
+ "return ~x;\n",
"var x = 13;\n"
- "return +x;",
+ "return +x;\n",
"var x = 13;\n"
- "return -x;",
+ "return -x;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("UnaryOperators.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("UnaryOperators.golden")));
}
TEST(Typeof) {
@@ -967,8 +1011,8 @@
"};",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("Typeof.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("Typeof.golden")));
}
TEST(Delete) {
@@ -977,23 +1021,24 @@
ConstantPoolType::kMixed);
const char* snippets[] = {
- "var a = {x:13, y:14}; return delete a.x;",
+ "var a = {x:13, y:14}; return delete a.x;\n",
- "'use strict'; var a = {x:13, y:14}; return delete a.x;",
+ "'use strict'; var a = {x:13, y:14}; return delete a.x;\n",
- "var a = {1:13, 2:14}; return delete a[2];",
+ "var a = {1:13, 2:14}; return delete a[2];\n",
- "var a = 10; return delete a;",
+ "var a = 10; return delete a;\n",
"'use strict';\n"
"var a = {1:10};\n"
"(function f1() {return a;});\n"
- "return delete a[1];",
+ "return delete a[1];\n",
- "return delete 'test';",
+ "return delete 'test';\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("Delete.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("Delete.golden")));
}
TEST(GlobalDelete) {
@@ -1008,29 +1053,30 @@
"function f() {\n"
" return delete a.x;\n"
"};\n"
- "f();",
+ "f();\n",
"a = {1:13, 2:14};\n"
"function f() {\n"
" 'use strict';\n"
" return delete a[1];\n"
"};\n"
- "f();",
+ "f();\n",
"var a = {x:13, y:14};\n"
"function f() {\n"
" return delete a;\n"
"};\n"
- "f();",
+ "f();\n",
"b = 30;\n"
"function f() {\n"
" return delete b;\n"
"};\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("GlobalDelete.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("GlobalDelete.golden")));
}
TEST(FunctionLiterals) {
@@ -1039,15 +1085,15 @@
ConstantPoolType::kMixed);
const char* snippets[] = {
- "return function(){ }",
+ "return function(){ }\n",
- "return (function(){ })()",
+ "return (function(){ })()\n",
- "return (function(x){ return x; })(1)",
+ "return (function(x){ return x; })(1)\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("FunctionLiterals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("FunctionLiterals.golden")));
}
TEST(RegExpLiterals) {
@@ -1056,14 +1102,15 @@
ConstantPoolType::kString);
const char* snippets[] = {
- "return /ab+d/;",
+ "return /ab+d/;\n",
- "return /(\\w+)\\s(\\w+)/i;",
+ "return /(\\w+)\\s(\\w+)/i;\n",
- "return /ab+d/.exec('abdd');",
+ "return /ab+d/.exec('abdd');\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("RegExpLiterals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("RegExpLiterals.golden")));
}
TEST(RegExpLiteralsWide) {
@@ -1074,11 +1121,11 @@
const char* snippets[] = {
"var a;" //
REPEAT_256("\na = 1.23;") //
- "\nreturn /ab+d/;",
+ "\nreturn /ab+d/;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("RegExpLiteralsWide.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("RegExpLiteralsWide.golden")));
}
TEST(ArrayLiterals) {
@@ -1087,16 +1134,17 @@
ConstantPoolType::kMixed);
const char* snippets[] = {
- "return [ 1, 2 ];",
+ "return [ 1, 2 ];\n",
- "var a = 1; return [ a, a + 1 ];",
+ "var a = 1; return [ a, a + 1 ];\n",
- "return [ [ 1, 2 ], [ 3 ] ];",
+ "return [ [ 1, 2 ], [ 3 ] ];\n",
- "var a = 1; return [ [ a, 2 ], [ a + 2 ] ];",
+ "var a = 1; return [ [ a, 2 ], [ a + 2 ] ];\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("ArrayLiterals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ArrayLiterals.golden")));
}
TEST(ArrayLiteralsWide) {
@@ -1107,11 +1155,11 @@
const char* snippets[] = {
"var a;" //
REPEAT_256("\na = 1.23;") //
- "\nreturn [ 1 , 2 ];",
+ "\nreturn [ 1 , 2 ];\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ArrayLiteralsWide.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ArrayLiteralsWide.golden")));
}
TEST(ObjectLiterals) {
@@ -1120,38 +1168,39 @@
ConstantPoolType::kMixed);
const char* snippets[] = {
- "return { };",
+ "return { };\n",
- "return { name: 'string', val: 9.2 };",
+ "return { name: 'string', val: 9.2 };\n",
- "var a = 1; return { name: 'string', val: a };",
+ "var a = 1; return { name: 'string', val: a };\n",
- "var a = 1; return { val: a, val: a + 1 };",
+ "var a = 1; return { val: a, val: a + 1 };\n",
- "return { func: function() { } };",
+ "return { func: function() { } };\n",
- "return { func(a) { return a; } };",
+ "return { func(a) { return a; } };\n",
- "return { get a() { return 2; } };",
+ "return { get a() { return 2; } };\n",
- "return { get a() { return this.x; }, set a(val) { this.x = val } };",
+ "return { get a() { return this.x; }, set a(val) { this.x = val } };\n",
- "return { set b(val) { this.y = val } };",
+ "return { set b(val) { this.y = val } };\n",
- "var a = 1; return { 1: a };",
+ "var a = 1; return { 1: a };\n",
- "return { __proto__: null };",
+ "return { __proto__: null };\n",
- "var a = 'test'; return { [a]: 1 };",
+ "var a = 'test'; return { [a]: 1 };\n",
- "var a = 'test'; return { val: a, [a]: 1 };",
+ "var a = 'test'; return { val: a, [a]: 1 };\n",
- "var a = 'test'; return { [a]: 1, __proto__: {} };",
+ "var a = 'test'; return { [a]: 1, __proto__: {} };\n",
- "var n = 'name'; return { [n]: 'val', get a() { }, set a(b) {} };",
+ "var n = 'name'; return { [n]: 'val', get a() { }, set a(b) {} };\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("ObjectLiterals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ObjectLiterals.golden")));
}
TEST(ObjectLiteralsWide) {
@@ -1161,11 +1210,11 @@
const char* snippets[] = {
"var a;" //
REPEAT_256("\na = 1.23;") //
- "\nreturn { name: 'string', val: 9.2 };",
+ "\nreturn { name: 'string', val: 9.2 };\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ObjectLiteralsWide.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ObjectLiteralsWide.golden")));
}
TEST(TopLevelObjectLiterals) {
@@ -1178,11 +1227,11 @@
printer.set_top_level(true);
const char* snippets[] = {
- "var a = { func: function() { } };",
+ "var a = { func: function() { } };\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("TopLevelObjectLiterals.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("TopLevelObjectLiterals.golden")));
}
TEST(TryCatch) {
@@ -1191,14 +1240,15 @@
ConstantPoolType::kString);
const char* snippets[] = {
- "try { return 1; } catch(e) { return 2; }",
+ "try { return 1; } catch(e) { return 2; }\n",
"var a;\n"
"try { a = 1 } catch(e1) {};\n"
- "try { a = 2 } catch(e2) { a = 3 }",
+ "try { a = 2 } catch(e2) { a = 3 }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("TryCatch.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("TryCatch.golden")));
}
TEST(TryFinally) {
@@ -1207,17 +1257,18 @@
ConstantPoolType::kString);
const char* snippets[] = {
"var a = 1;\n"
- "try { a = 2; } finally { a = 3; }",
+ "try { a = 2; } finally { a = 3; }\n",
"var a = 1;\n"
- "try { a = 2; } catch(e) { a = 20 } finally { a = 3; }",
+ "try { a = 2; } catch(e) { a = 20 } finally { a = 3; }\n",
"var a; try {\n"
" try { a = 1 } catch(e) { a = 2 }\n"
- "} catch(e) { a = 20 } finally { a = 3; }",
+ "} catch(e) { a = 20 } finally { a = 3; }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("TryFinally.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("TryFinally.golden")));
}
TEST(Throw) {
@@ -1225,14 +1276,15 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "throw 1;",
+ "throw 1;\n",
- "throw 'Error';",
+ "throw 'Error';\n",
- "var a = 1; if (a) { throw 'Error'; };",
+ "var a = 1; if (a) { throw 'Error'; };\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("Throw.golden"));
+ CHECK(
+ CompareTexts(BuildActual(printer, snippets), LoadGolden("Throw.golden")));
}
TEST(CallNew) {
@@ -1245,11 +1297,11 @@
const char* snippets[] = {
"function bar() { this.value = 0; }\n"
"function f() { return new bar(); }\n"
- "f();",
+ "f();\n",
"function bar(x) { this.value = 18; this.x = x;}\n"
"function f() { return new bar(3); }\n"
- "f();",
+ "f();\n",
"function bar(w, x, y, z) {\n"
" this.value = 18;\n"
@@ -1258,10 +1310,11 @@
" this.z = z;\n"
"}\n"
"function f() { return new bar(3, 4, 5); }\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallNew.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CallNew.golden")));
}
TEST(ContextVariables) {
@@ -1274,27 +1327,27 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "var a; return function() { a = 1; };",
+ "var a; return function() { a = 1; };\n",
- "var a = 1; return function() { a = 2; };",
+ "var a = 1; return function() { a = 2; };\n",
- "var a = 1; var b = 2; return function() { a = 2; b = 3 };",
+ "var a = 1; var b = 2; return function() { a = 2; b = 3 };\n",
- "var a; (function() { a = 2; })(); return a;",
+ "var a; (function() { a = 2; })(); return a;\n",
"'use strict';\n"
"let a = 1;\n"
- "{ let b = 2; return function() { a + b; }; }",
+ "{ let b = 2; return function() { a + b; }; }\n",
"'use strict';\n"
REPEAT_249_UNIQUE_VARS()
"eval();\n"
"var b = 100;\n"
- "return b",
+ "return b\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ContextVariables.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ContextVariables.golden")));
}
TEST(ContextParameters) {
@@ -1314,8 +1367,8 @@
"function f() { var self = this; return function() { self = 2; }; }",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("ContextParameters.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("ContextParameters.golden")));
}
TEST(OuterContextVariables) {
@@ -1345,8 +1398,8 @@
"var f = new Outer().getInnerFunc();",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("OuterContextVariables.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("OuterContextVariables.golden")));
}
TEST(CountOperators) {
@@ -1354,30 +1407,31 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "var a = 1; return ++a;",
+ "var a = 1; return ++a;\n",
- "var a = 1; return a++;",
+ "var a = 1; return a++;\n",
- "var a = 1; return --a;",
+ "var a = 1; return --a;\n",
- "var a = 1; return a--;",
+ "var a = 1; return a--;\n",
- "var a = { val: 1 }; return a.val++;",
+ "var a = { val: 1 }; return a.val++;\n",
- "var a = { val: 1 }; return --a.val;",
+ "var a = { val: 1 }; return --a.val;\n",
- "var name = 'var'; var a = { val: 1 }; return a[name]--;",
+ "var name = 'var'; var a = { val: 1 }; return a[name]--;\n",
- "var name = 'var'; var a = { val: 1 }; return ++a[name];",
+ "var name = 'var'; var a = { val: 1 }; return ++a[name];\n",
- "var a = 1; var b = function() { return a }; return ++a;",
+ "var a = 1; var b = function() { return a }; return ++a;\n",
- "var a = 1; var b = function() { return a }; return a--;",
+ "var a = 1; var b = function() { return a }; return a--;\n",
- "var idx = 1; var a = [1, 2]; return a[idx++] = 2;",
+ "var idx = 1; var a = [1, 2]; return a[idx++] = 2;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CountOperators.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CountOperators.golden")));
}
TEST(GlobalCountOperators) {
@@ -1390,23 +1444,23 @@
const char* snippets[] = {
"var global = 1;\n"
"function f() { return ++global; }\n"
- "f();",
+ "f();\n",
"var global = 1;\n"
"function f() { return global--; }\n"
- "f();",
+ "f();\n",
"unallocated = 1;\n"
"function f() { 'use strict'; return --unallocated; }\n"
- "f();",
+ "f();\n",
"unallocated = 1;\n"
"function f() { return unallocated++; }\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("GlobalCountOperators.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("GlobalCountOperators.golden")));
}
TEST(CompoundExpressions) {
@@ -1414,19 +1468,19 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "var a = 1; a += 2;",
+ "var a = 1; a += 2;\n",
- "var a = 1; a /= 2;",
+ "var a = 1; a /= 2;\n",
- "var a = { val: 2 }; a.name *= 2;",
+ "var a = { val: 2 }; a.name *= 2;\n",
- "var a = { 1: 2 }; a[1] ^= 2;",
+ "var a = { 1: 2 }; a[1] ^= 2;\n",
- "var a = 1; (function f() { return a; }); a |= 24;",
+ "var a = 1; (function f() { return a; }); a |= 24;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("CompoundExpressions.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CompoundExpressions.golden")));
}
TEST(GlobalCompoundExpressions) {
@@ -1439,15 +1493,15 @@
const char* snippets[] = {
"var global = 1;\n"
"function f() { return global &= 1; }\n"
- "f();",
+ "f();\n",
"unallocated = 1;\n"
"function f() { return unallocated += 1; }\n"
- "f();",
+ "f();\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("GlobalCompoundExpressions.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("GlobalCompoundExpressions.golden")));
}
TEST(CreateArguments) {
@@ -1471,8 +1525,8 @@
"function f(a, b, c) { 'use strict'; return arguments; }",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("CreateArguments.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("CreateArguments.golden")));
}
TEST(CreateRestParameter) {
@@ -1492,8 +1546,8 @@
"function f(a, ...restArgs) { return restArgs[0] + arguments[0]; }",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("CreateRestParameter.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("CreateRestParameter.golden")));
}
TEST(ForIn) {
@@ -1501,29 +1555,30 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "for (var p in null) {}",
+ "for (var p in null) {}\n",
- "for (var p in undefined) {}",
+ "for (var p in undefined) {}\n",
- "for (var p in undefined) {}",
+ "for (var p in undefined) {}\n",
"var x = 'potatoes';\n"
- "for (var p in x) { return p; }",
+ "for (var p in x) { return p; }\n",
"var x = 0;\n"
- "for (var p in [1,2,3]) { x += p; }",
+ "for (var p in [1,2,3]) { x += p; }\n",
"var x = { 'a': 1, 'b': 2 };\n"
"for (x['a'] in [10, 20, 30]) {\n"
" if (x['a'] == 10) continue;\n"
" if (x['a'] == 20) break;\n"
- "}",
+ "}\n",
"var x = [ 10, 11, 12 ] ;\n"
- "for (x[0] in [1,2,3]) { return x[3]; }",
+ "for (x[0] in [1,2,3]) { return x[3]; }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("ForIn.golden"));
+ CHECK(
+ CompareTexts(BuildActual(printer, snippets), LoadGolden("ForIn.golden")));
}
TEST(ForOf) {
@@ -1531,21 +1586,22 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "for (var p of [0, 1, 2]) {}",
+ "for (var p of [0, 1, 2]) {}\n",
"var x = 'potatoes';\n"
- "for (var p of x) { return p; }",
+ "for (var p of x) { return p; }\n",
"for (var x of [10, 20, 30]) {\n"
" if (x == 10) continue;\n"
" if (x == 20) break;\n"
- "}",
+ "}\n",
"var x = { 'a': 1, 'b': 2 };\n"
- "for (x['a'] of [1,2,3]) { return x['a']; }",
+ "for (x['a'] of [1,2,3]) { return x['a']; }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("ForOf.golden"));
+ CHECK(
+ CompareTexts(BuildActual(printer, snippets), LoadGolden("ForOf.golden")));
}
TEST(Conditional) {
@@ -1553,12 +1609,13 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "return 1 ? 2 : 3;",
+ "return 1 ? 2 : 3;\n",
- "return 1 ? 2 ? 3 : 4 : 5;",
+ "return 1 ? 2 ? 3 : 4 : 5;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("Conditional.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("Conditional.golden")));
}
TEST(Switch) {
@@ -1570,39 +1627,39 @@
"switch(a) {\n"
" case 1: return 2;\n"
" case 2: return 3;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
" case 1: a = 2; break;\n"
" case 2: a = 3; break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
" case 1: a = 2; // fall-through\n"
" case 2: a = 3; break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
" case 2: break;\n"
" case 3: break;\n"
" default: a = 1; break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(typeof(a)) {\n"
" case 2: a = 1; break;\n"
" case 3: a = 2; break;\n"
" default: a = 3; break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
" case typeof(a): a = 1; break;\n"
" default: a = 2; break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
@@ -1612,7 +1669,7 @@
" case 2:\n"
" a = 3;\n"
" break;\n"
- "}",
+ "}\n",
"var a = 1;\n"
"switch(a) {\n"
@@ -1622,10 +1679,11 @@
" default : a = 2; break;\n"
" } // fall-through\n"
" case 2: a = 3;\n"
- "}",
+ "}\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("Switch.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("Switch.golden")));
}
TEST(BasicBlockToBoolean) {
@@ -1633,15 +1691,15 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "var a = 1; if (a || a < 0) { return 1; }",
+ "var a = 1; if (a || a < 0) { return 1; }\n",
- "var a = 1; if (a && a < 0) { return 1; }",
+ "var a = 1; if (a && a < 0) { return 1; }\n",
- "var a = 1; a = (a || a < 0) ? 2 : 3;",
+ "var a = 1; a = (a || a < 0) ? 2 : 3;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("BasicBlockToBoolean.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("BasicBlockToBoolean.golden")));
}
TEST(DeadCodeRemoval) {
@@ -1649,17 +1707,17 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kNumber);
const char* snippets[] = {
- "return; var a = 1; a();",
+ "return; var a = 1; a();\n",
- "if (false) { return; }; var a = 1;",
+ "if (false) { return; }; var a = 1;\n",
- "if (true) { return 1; } else { return 2; };",
+ "if (true) { return 1; } else { return 2; };\n",
- "var a = 1; if (a) { return 1; }; return 2;",
+ "var a = 1; if (a) { return 1; }; return 2;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("DeadCodeRemoval.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("DeadCodeRemoval.golden")));
}
TEST(ThisFunction) {
@@ -1677,8 +1735,8 @@
"f = function f() { return f; };",
};
- CHECK_EQ(BuildActual(printer, snippets, "", "\nf();"),
- LoadGolden("ThisFunction.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, "", "\nf();"),
+ LoadGolden("ThisFunction.golden")));
}
TEST(NewTarget) {
@@ -1687,12 +1745,13 @@
ConstantPoolType::kMixed);
const char* snippets[] = {
- "return new.target;",
+ "return new.target;\n",
- "new.target;",
+ "new.target;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("NewTarget.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("NewTarget.golden")));
}
TEST(RemoveRedundantLdar) {
@@ -1705,22 +1764,22 @@
" ld_a = ld_a + ld_a;\n" // in a different basicblock.
" if (ld_a > 10) break;\n"
"}\n"
- "return ld_a;",
+ "return ld_a;\n",
"var ld_a = 1;\n"
"do {\n"
" ld_a = ld_a + ld_a;\n"
" if (ld_a > 10) continue;\n"
"} while(false);\n"
- "return ld_a;",
+ "return ld_a;\n",
"var ld_a = 1;\n"
" ld_a = ld_a + ld_a;\n"
- " return ld_a;",
+ " return ld_a;\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("RemoveRedundantLdar.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("RemoveRedundantLdar.golden")));
}
TEST(AssignmentsInBinaryExpression) {
@@ -1729,28 +1788,28 @@
ConstantPoolType::kString);
const char* snippets[] = {
"var x = 0, y = 1;\n"
- "return (x = 2, y = 3, x = 4, y = 5);",
+ "return (x = 2, y = 3, x = 4, y = 5);\n",
"var x = 55;\n"
"var y = (x = 100);\n"
- "return y;",
+ "return y;\n",
"var x = 55;\n"
"x = x + (x = 100) + (x = 101);\n"
- "return x;",
+ "return x;\n",
"var x = 55;\n"
"x = (x = 56) - x + (x = 57);\n"
"x++;\n"
- "return x;",
+ "return x;\n",
"var x = 55;\n"
"var y = x + (x = 1) + (x = 2) + (x = 3);\n"
- "return y;",
+ "return y;\n",
"var x = 55;\n"
"var x = x + (x = 1) + (x = 2) + (x = 3);\n"
- "return x;",
+ "return x;\n",
"var x = 10, y = 20;\n"
"return x + (x = 1) + (x + 1) * (y = 2) + (y = 3) + (x = 4) + (y = 5) + "
@@ -1760,8 +1819,8 @@
"return 1 + x + (x++) + (++x);\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("AssignmentsInBinaryExpression.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("AssignmentsInBinaryExpression.golden")));
}
TEST(Eval) {
@@ -1769,10 +1828,11 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "return eval('1;');",
+ "return eval('1;');\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("Eval.golden"));
+ CHECK(
+ CompareTexts(BuildActual(printer, snippets), LoadGolden("Eval.golden")));
}
TEST(LookupSlot) {
@@ -1781,14 +1841,15 @@
ConstantPoolType::kString);
const char* snippets[] = {
- "eval('var x = 10;'); return x;",
+ "eval('var x = 10;'); return x;\n",
- "eval('var x = 10;'); return typeof x;",
+ "eval('var x = 10;'); return typeof x;\n",
- "x = 20; return eval('');",
+ "x = 20; return eval('');\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("LookupSlot.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("LookupSlot.golden")));
}
TEST(CallLookupSlot) {
@@ -1796,10 +1857,11 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "g = function(){}; eval(''); return g();",
+ "g = function(){}; eval(''); return g();\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("CallLookupSlot.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("CallLookupSlot.golden")));
}
// TODO(mythria): tests for variable/function declaration in lookup slots.
@@ -1831,7 +1893,7 @@
"}\n"
"f1();");
- CHECK_EQ(actual, LoadGolden("LookupSlotInEval.golden"));
+ CHECK(CompareTexts(actual, LoadGolden("LookupSlotInEval.golden")));
}
TEST(LookupSlotWideInEval) {
@@ -1867,7 +1929,7 @@
"}\n"
"f1();");
- CHECK_EQ(actual, LoadGolden("LookupSlotWideInEval.golden"));
+ CHECK(CompareTexts(actual, LoadGolden("LookupSlotWideInEval.golden")));
}
TEST(DeleteLookupSlotInEval) {
@@ -1897,7 +1959,7 @@
"}\n"
"f1();");
- CHECK_EQ(actual, LoadGolden("DeleteLookupSlotInEval.golden"));
+ CHECK(CompareTexts(actual, LoadGolden("DeleteLookupSlotInEval.golden")));
}
TEST(WideRegisters) {
@@ -1913,41 +1975,41 @@
ConstantPoolType::kNumber);
const char* snippets[] = {
"x0 = x127;\n"
- "return x0;",
+ "return x0;\n",
"x127 = x126;\n"
- "return x127;",
+ "return x127;\n",
"if (x2 > 3) { return x129; }\n"
- "return x128;",
+ "return x128;\n",
"var x0 = 0;\n"
"if (x129 == 3) { var x129 = x0; }\n"
"if (x2 > 3) { return x0; }\n"
- "return x129;",
+ "return x129;\n",
"var x0 = 0;\n"
"var x1 = 0;\n"
"for (x128 = 0; x128 < 64; x128++) {"
" x1 += x128;"
"}"
- "return x128;",
+ "return x128;\n",
"var x0 = 1234;\n"
"var x1 = 0;\n"
"for (x128 in x0) {"
" x1 += x128;"
"}"
- "return x1;",
+ "return x1;\n",
"x0 = %Add(x64, x63);\n"
"x1 = %Add(x27, x143);\n"
"%TheHole();\n"
- "return x1;",
+ "return x1;\n",
};
- CHECK_EQ(BuildActual(printer, snippets, prologue.c_str()),
- LoadGolden("WideRegisters.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets, prologue.c_str()),
+ LoadGolden("WideRegisters.golden")));
}
TEST(ConstVariable) {
@@ -1955,16 +2017,17 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "const x = 10;",
+ "const x = 10;\n",
- "const x = 10; return x;",
+ "const x = 10; return x;\n",
- "const x = ( x = 20);",
+ "const x = ( x = 20);\n",
- "const x = 10; x = 20;",
+ "const x = 10; x = 20;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("ConstVariable.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ConstVariable.golden")));
}
TEST(LetVariable) {
@@ -1972,16 +2035,17 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "let x = 10;",
+ "let x = 10;\n",
- "let x = 10; return x;",
+ "let x = 10; return x;\n",
- "let x = (x = 20);",
+ "let x = (x = 20);\n",
- "let x = 10; x = 20;",
+ "let x = 10; x = 20;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("LetVariable.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("LetVariable.golden")));
}
TEST(ConstVariableContextSlot) {
@@ -1991,17 +2055,17 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "const x = 10; function f1() {return x;}",
+ "const x = 10; function f1() {return x;}\n",
- "const x = 10; function f1() {return x;} return x;",
+ "const x = 10; function f1() {return x;} return x;\n",
- "const x = (x = 20); function f1() {return x;}",
+ "const x = (x = 20); function f1() {return x;}\n",
- "const x = 10; x = 20; function f1() {return x;}",
+ "const x = 10; x = 20; function f1() {return x;}\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ConstVariableContextSlot.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ConstVariableContextSlot.golden")));
}
TEST(LetVariableContextSlot) {
@@ -2009,17 +2073,17 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "let x = 10; function f1() {return x;}",
+ "let x = 10; function f1() {return x;}\n",
- "let x = 10; function f1() {return x;} return x;",
+ "let x = 10; function f1() {return x;} return x;\n",
- "let x = (x = 20); function f1() {return x;}",
+ "let x = (x = 20); function f1() {return x;}\n",
- "let x = 10; x = 20; function f1() {return x;}",
+ "let x = 10; x = 20; function f1() {return x;}\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("LetVariableContextSlot.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("LetVariableContextSlot.golden")));
}
TEST(DoExpression) {
@@ -2030,14 +2094,15 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "var a = do { }; return a;",
+ "var a = do { }; return a;\n",
- "var a = do { var x = 100; }; return a;",
+ "var a = do { var x = 100; }; return a;\n",
- "while(true) { var a = 10; a = do { ++a; break; }; a = 20; }",
+ "while(true) { var a = 10; a = do { ++a; break; }; a = 20; }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("DoExpression.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("DoExpression.golden")));
FLAG_harmony_do_expressions = old_flag;
}
@@ -2047,10 +2112,11 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kMixed);
const char* snippets[] = {
- "with ({x:42}) { return x; }",
+ "with ({x:42}) { return x; }\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("WithStatement.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("WithStatement.golden")));
}
TEST(DoDebugger) {
@@ -2058,10 +2124,11 @@
BytecodeExpectationsPrinter printer(CcTest::isolate(),
ConstantPoolType::kString);
const char* snippets[] = {
- "debugger;",
+ "debugger;\n",
};
- CHECK_EQ(BuildActual(printer, snippets), LoadGolden("DoDebugger.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("DoDebugger.golden")));
}
TEST(ClassDeclarations) {
@@ -2072,27 +2139,27 @@
"class Person {\n"
" constructor(name) { this.name = name; }\n"
" speak() { console.log(this.name + ' is speaking.'); }\n"
- "}",
+ "}\n",
"class person {\n"
" constructor(name) { this.name = name; }\n"
" speak() { console.log(this.name + ' is speaking.'); }\n"
- "}",
+ "}\n",
"var n0 = 'a';\n"
"var n1 = 'b';\n"
"class N {\n"
" [n0]() { return n0; }\n"
" static [n1]() { return n1; }\n"
- "}",
+ "}\n",
"var count = 0;\n"
"class C { constructor() { count++; }}\n"
"return new C();\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ClassDeclarations.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ClassDeclarations.golden")));
}
TEST(ClassAndSuperClass) {
@@ -2150,8 +2217,32 @@
"})();\n",
};
- CHECK_EQ(BuildActual(printer, snippets),
- LoadGolden("ClassAndSuperClass.golden"));
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ClassAndSuperClass.golden")));
+}
+
+TEST(Generators) {
+ bool old_flag = FLAG_ignition_generators;
+ FLAG_ignition_generators = true;
+
+ InitializedIgnitionHandleScope scope;
+ BytecodeExpectationsPrinter printer(CcTest::isolate(),
+ ConstantPoolType::kMixed);
+ printer.set_wrap(false);
+ printer.set_test_function_name("f");
+
+ const char* snippets[] = {
+ "function* f() { }\n",
+
+ "function* f() { yield 42 }\n",
+
+ "function* f() { for (let x of [42]) yield x }\n",
+ };
+
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("Generators.golden")));
+
+ FLAG_ignition_generators = old_flag;
}
} // namespace interpreter
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index c8dc776..acc93c5 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -1383,11 +1383,6 @@
TEST(InterpreterInstanceOf) {
HandleAndZoneScope handles;
- // TODO(4447): The new ES6 'instanceof' operator is fully desugared in the
- // parser and the Token::INSTANCEOF is not needed anymore. This test only
- // makes sense with --no-harmony-instanceof and can be removed once we
- // deprecate the ability to switch to old skool ES5 'instanceof' for good.
- FLAG_harmony_instanceof = false;
i::Factory* factory = handles.main_isolate()->factory();
Handle<i::String> name = factory->NewStringFromAsciiChecked("cons");
Handle<i::JSFunction> func = factory->NewFunction(name);
@@ -2259,6 +2254,8 @@
std::make_pair("function f(a, b, c, d) {"
" 'use strict'; c = b; return arguments[2]; }",
2),
+ // Check arguments for duplicate parameters in sloppy mode.
+ std::make_pair("function f(a, a, b) { return arguments[1]; }", 1),
// check rest parameters
std::make_pair("function f(...restArray) { return restArray[0]; }", 0),
std::make_pair("function f(a, ...restArray) { return restArray[0]; }", 1),
@@ -4139,6 +4136,37 @@
}
}
+TEST(InterpreterGenerators) {
+ bool old_flag = FLAG_ignition_generators;
+ FLAG_ignition_generators = true;
+
+ HandleAndZoneScope handles;
+ i::Isolate* isolate = handles.main_isolate();
+ i::Factory* factory = isolate->factory();
+
+ std::pair<const char*, Handle<Object>> tests[] = {
+ {"function* f() { }; return f().next().value",
+ factory->undefined_value()},
+ {"function* f() { yield 42 }; return f().next().value",
+ factory->NewNumberFromInt(42)},
+ {"function* f() { for (let x of [42]) yield x}; return f().next().value",
+ factory->NewNumberFromInt(42)},
+ };
+
+ for (size_t i = 0; i < arraysize(tests); i++) {
+ std::string source(
+ InterpreterTester::SourceForBody(tests[i].first));
+ InterpreterTester tester(handles.main_isolate(), source.c_str());
+ auto callable = tester.GetCallable<>();
+
+ Handle<i::Object> return_value = callable().ToHandleChecked();
+ CHECK(return_value->SameValue(*tests[i].second));
+ }
+
+ FLAG_ignition_generators = old_flag;
+}
+
+
} // namespace interpreter
} // namespace internal
} // namespace v8
diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc
index 67803ee..9667afb 100644
--- a/test/cctest/test-accessors.cc
+++ b/test/cctest/test-accessors.cc
@@ -775,19 +775,18 @@
}
}
-static void check_receiver(Local<String> name,
- const v8::PropertyCallbackInfo<v8::Value>& info) {
+static void CheckReceiver(Local<String> name,
+ const v8::PropertyCallbackInfo<v8::Value>& info) {
CHECK(info.This()->IsObject());
}
TEST(Regress609134) {
- v8::internal::FLAG_allow_natives_syntax = true;
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
auto fun_templ = v8::FunctionTemplate::New(isolate);
fun_templ->InstanceTemplate()->SetNativeDataProperty(v8_str("foo"),
- check_receiver);
+ CheckReceiver);
CHECK(env->Global()
->Set(env.local(), v8_str("Fun"),
@@ -797,5 +796,6 @@
CompileRun(
"var f = new Fun();"
"Number.prototype.__proto__ = f;"
- "[42][0].foo");
+ "var a = 42;"
+ "for (var i = 0; i<3; i++) { a.foo; }");
}
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 220b0cd..da72ecd 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2142,6 +2142,95 @@
Constructor_GetFunction_New);
}
+THREADED_TEST(TestObjectTemplateClassInheritance) {
+ LocalContext env;
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
+
+ Local<v8::FunctionTemplate> fun_A = v8::FunctionTemplate::New(isolate);
+ fun_A->SetClassName(v8_str("A"));
+
+ Local<ObjectTemplate> templ_A = fun_A->InstanceTemplate();
+ templ_A->SetNativeDataProperty(v8_str("nirk"), GetNirk);
+ templ_A->SetNativeDataProperty(v8_str("rino"), GetRino);
+
+ Local<v8::FunctionTemplate> fun_B = v8::FunctionTemplate::New(isolate);
+ v8::Local<v8::String> class_name = v8_str("B");
+ fun_B->SetClassName(class_name);
+ fun_B->Inherit(fun_A);
+
+ v8::Local<v8::String> subclass_name = v8_str("C");
+ v8::Local<v8::Object> b_proto;
+ v8::Local<v8::Object> c_proto;
+ // Perform several iterations to make sure the cache doesn't break
+ // subclassing.
+ for (int i = 0; i < 3; i++) {
+ Local<v8::Function> function_B =
+ fun_B->GetFunction(env.local()).ToLocalChecked();
+ if (i == 0) {
+ CHECK(env->Global()->Set(env.local(), class_name, function_B).FromJust());
+ CompileRun("class C extends B {}");
+ b_proto =
+ CompileRun("B.prototype")->ToObject(env.local()).ToLocalChecked();
+ c_proto =
+ CompileRun("C.prototype")->ToObject(env.local()).ToLocalChecked();
+ CHECK(b_proto->Equals(env.local(), c_proto->GetPrototype()).FromJust());
+ }
+ Local<v8::Object> instance =
+ CompileRun("new C()")->ToObject(env.local()).ToLocalChecked();
+ CHECK(c_proto->Equals(env.local(), instance->GetPrototype()).FromJust());
+
+ CHECK(subclass_name->StrictEquals(instance->GetConstructorName()));
+ CHECK(env->Global()->Set(env.local(), v8_str("o"), instance).FromJust());
+
+ CHECK_EQ(900, CompileRun("o.nirk")->IntegerValue(env.local()).FromJust());
+ CHECK_EQ(560, CompileRun("o.rino")->IntegerValue(env.local()).FromJust());
+ }
+}
+
+static void NamedPropertyGetterWhichReturns42(
+ Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ info.GetReturnValue().Set(v8_num(42));
+}
+
+THREADED_TEST(TestObjectTemplateReflectConstruct) {
+ LocalContext env;
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
+
+ Local<v8::FunctionTemplate> fun_B = v8::FunctionTemplate::New(isolate);
+ fun_B->InstanceTemplate()->SetHandler(
+ v8::NamedPropertyHandlerConfiguration(NamedPropertyGetterWhichReturns42));
+ v8::Local<v8::String> class_name = v8_str("B");
+ fun_B->SetClassName(class_name);
+
+ v8::Local<v8::String> subclass_name = v8_str("C");
+ v8::Local<v8::Object> b_proto;
+ v8::Local<v8::Object> c_proto;
+ // Perform several iterations to make sure the cache doesn't break
+ // subclassing.
+ for (int i = 0; i < 3; i++) {
+ Local<v8::Function> function_B =
+ fun_B->GetFunction(env.local()).ToLocalChecked();
+ if (i == 0) {
+ CHECK(env->Global()->Set(env.local(), class_name, function_B).FromJust());
+ CompileRun("function C() {}");
+ c_proto =
+ CompileRun("C.prototype")->ToObject(env.local()).ToLocalChecked();
+ }
+ Local<v8::Object> instance = CompileRun("Reflect.construct(B, [], C)")
+ ->ToObject(env.local())
+ .ToLocalChecked();
+ CHECK(c_proto->Equals(env.local(), instance->GetPrototype()).FromJust());
+
+ CHECK(subclass_name->StrictEquals(instance->GetConstructorName()));
+ CHECK(env->Global()->Set(env.local(), v8_str("o"), instance).FromJust());
+
+ CHECK_EQ(42, CompileRun("o.nirk")->IntegerValue(env.local()).FromJust());
+ CHECK_EQ(42, CompileRun("o.rino")->IntegerValue(env.local()).FromJust());
+ }
+}
+
static void GetFlabby(const v8::FunctionCallbackInfo<v8::Value>& args) {
ApiTestFuzzer::Fuzz();
args.GetReturnValue().Set(v8_num(17.2));
@@ -4687,126 +4776,6 @@
}
-// TODO(mstarzinger): This should be a THREADED_TEST but causes failures
-// on the buildbots, so was made non-threaded for the time being.
-TEST(ApiObjectGroupsCycleForScavenger) {
- i::FLAG_stress_compaction = false;
- i::FLAG_gc_global = false;
- LocalContext env;
- v8::Isolate* iso = env->GetIsolate();
- HandleScope scope(iso);
-
- WeakCallCounter counter(1234);
-
- WeakCallCounterAndPersistent<Value> g1s1(&counter);
- WeakCallCounterAndPersistent<Value> g1s2(&counter);
- WeakCallCounterAndPersistent<Value> g2s1(&counter);
- WeakCallCounterAndPersistent<Value> g2s2(&counter);
- WeakCallCounterAndPersistent<Value> g3s1(&counter);
- WeakCallCounterAndPersistent<Value> g3s2(&counter);
-
- {
- HandleScope scope(iso);
- g1s1.handle.Reset(iso, Object::New(iso));
- g1s2.handle.Reset(iso, Object::New(iso));
- g1s1.handle.SetWeak(&g1s1, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
- g1s2.handle.SetWeak(&g1s2, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
-
- g2s1.handle.Reset(iso, Object::New(iso));
- g2s2.handle.Reset(iso, Object::New(iso));
- g2s1.handle.SetWeak(&g2s1, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
- g2s2.handle.SetWeak(&g2s2, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
-
- g3s1.handle.Reset(iso, Object::New(iso));
- g3s2.handle.Reset(iso, Object::New(iso));
- g3s1.handle.SetWeak(&g3s1, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
- g3s2.handle.SetWeak(&g3s2, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
- }
-
- // Make a root.
- WeakCallCounterAndPersistent<Value> root(&counter);
- root.handle.Reset(iso, g1s1.handle);
- root.handle.MarkPartiallyDependent();
-
- // Connect groups. We're building the following cycle:
- // G1: { g1s1, g2s1 }, g1s1 implicitly references g2s1, ditto for other
- // groups.
- {
- HandleScope handle_scope(iso);
- g1s1.handle.MarkPartiallyDependent();
- g1s2.handle.MarkPartiallyDependent();
- g2s1.handle.MarkPartiallyDependent();
- g2s2.handle.MarkPartiallyDependent();
- g3s1.handle.MarkPartiallyDependent();
- g3s2.handle.MarkPartiallyDependent();
- iso->SetObjectGroupId(g1s1.handle, UniqueId(1));
- iso->SetObjectGroupId(g1s2.handle, UniqueId(1));
- Local<Object>::New(iso, g1s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g2s1.handle))
- .FromJust();
- iso->SetObjectGroupId(g2s1.handle, UniqueId(2));
- iso->SetObjectGroupId(g2s2.handle, UniqueId(2));
- Local<Object>::New(iso, g2s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g3s1.handle))
- .FromJust();
- iso->SetObjectGroupId(g3s1.handle, UniqueId(3));
- iso->SetObjectGroupId(g3s2.handle, UniqueId(3));
- Local<Object>::New(iso, g3s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g1s1.handle))
- .FromJust();
- }
-
- v8::internal::Heap* heap =
- reinterpret_cast<v8::internal::Isolate*>(iso)->heap();
- heap->CollectAllGarbage();
-
- // All objects should be alive.
- CHECK_EQ(0, counter.NumberOfWeakCalls());
-
- // Weaken the root.
- root.handle.SetWeak(&root, &WeakPointerCallback,
- v8::WeakCallbackType::kParameter);
- root.handle.MarkPartiallyDependent();
-
- // Groups are deleted, rebuild groups.
- {
- HandleScope handle_scope(iso);
- g1s1.handle.MarkPartiallyDependent();
- g1s2.handle.MarkPartiallyDependent();
- g2s1.handle.MarkPartiallyDependent();
- g2s2.handle.MarkPartiallyDependent();
- g3s1.handle.MarkPartiallyDependent();
- g3s2.handle.MarkPartiallyDependent();
- iso->SetObjectGroupId(g1s1.handle, UniqueId(1));
- iso->SetObjectGroupId(g1s2.handle, UniqueId(1));
- Local<Object>::New(iso, g1s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g2s1.handle))
- .FromJust();
- iso->SetObjectGroupId(g2s1.handle, UniqueId(2));
- iso->SetObjectGroupId(g2s2.handle, UniqueId(2));
- Local<Object>::New(iso, g2s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g3s1.handle))
- .FromJust();
- iso->SetObjectGroupId(g3s1.handle, UniqueId(3));
- iso->SetObjectGroupId(g3s2.handle, UniqueId(3));
- Local<Object>::New(iso, g3s1.handle.As<Object>())
- ->Set(env.local(), v8_str("x"), Local<Value>::New(iso, g1s1.handle))
- .FromJust();
- }
-
- heap->CollectAllGarbage();
-
- // All objects should be gone. 7 global handles in total.
- CHECK_EQ(7, counter.NumberOfWeakCalls());
-}
-
-
THREADED_TEST(ScriptException) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
@@ -6511,6 +6480,46 @@
CHECK(!v8::False(isolate)->SameValue(v8::Undefined(isolate)));
}
+THREADED_TEST(TypeOf) {
+ LocalContext context;
+ v8::Isolate* isolate = context->GetIsolate();
+ v8::HandleScope scope(context->GetIsolate());
+
+ Local<v8::FunctionTemplate> t1 = v8::FunctionTemplate::New(isolate);
+ Local<v8::Function> fun = t1->GetFunction(context.local()).ToLocalChecked();
+
+ CHECK(v8::Undefined(isolate)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("undefined"))
+ .FromJust());
+ CHECK(v8::Null(isolate)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("object"))
+ .FromJust());
+ CHECK(v8_str("str")
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("string"))
+ .FromJust());
+ CHECK(v8_num(0.0)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("number"))
+ .FromJust());
+ CHECK(v8_num(1)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("number"))
+ .FromJust());
+ CHECK(v8::Object::New(isolate)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("object"))
+ .FromJust());
+ CHECK(v8::Boolean::New(isolate, true)
+ ->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("boolean"))
+ .FromJust());
+ CHECK(fun->TypeOf(isolate)
+ ->Equals(context.local(), v8_str("function"))
+ .FromJust());
+}
THREADED_TEST(MultiRun) {
LocalContext context;
@@ -9046,33 +9055,6 @@
}
-TEST(ApiUncaughtExceptionInObjectObserve) {
- v8::internal::FLAG_harmony_object_observe = true;
- v8::internal::FLAG_stack_size = 150;
- report_count = 0;
- LocalContext env;
- v8::Isolate* isolate = env->GetIsolate();
- v8::HandleScope scope(isolate);
- isolate->AddMessageListener(ApiUncaughtExceptionTestListener);
- CompileRun(
- "var obj = {};"
- "var observe_count = 0;"
- "function observer1() { ++observe_count; };"
- "function observer2() { ++observe_count; };"
- "function observer_throws() { throw new Error(); };"
- "function stack_overflow() { return (function f(x) { f(x+1); })(0); };"
- "Object.observe(obj, observer_throws.bind());"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, stack_overflow);"
- "Object.observe(obj, observer2);"
- "Object.observe(obj, observer_throws.bind());"
- "obj.foo = 'bar';");
- CHECK_EQ(3, report_count);
- ExpectInt32("observe_count", 2);
- isolate->RemoveMessageListeners(ApiUncaughtExceptionTestListener);
-}
-
-
static const char* script_resource_name = "ExceptionInNativeScript.js";
static void ExceptionInNativeScriptTestListener(v8::Local<v8::Message> message,
v8::Local<Value>) {
@@ -10541,6 +10523,69 @@
}
}
+THREADED_TEST(ObjectGetOwnPropertyNames) {
+ LocalContext context;
+ v8::Isolate* isolate = context->GetIsolate();
+ v8::HandleScope handle_scope(isolate);
+
+ v8::Local<v8::Object> value =
+ v8::Local<v8::Object>::Cast(v8::StringObject::New(v8_str("test")));
+ v8::Local<v8::Array> properties;
+
+ CHECK(value
+ ->GetOwnPropertyNames(context.local(),
+ static_cast<v8::PropertyFilter>(
+ v8::PropertyFilter::ALL_PROPERTIES |
+ v8::PropertyFilter::SKIP_SYMBOLS))
+ .ToLocal(&properties));
+ CHECK_EQ(5, properties->Length());
+ v8::Local<v8::Value> property;
+ CHECK(properties->Get(context.local(), 4).ToLocal(&property) &&
+ property->IsString());
+ CHECK(property.As<v8::String>()
+ ->Equals(context.local(), v8_str("length"))
+ .FromMaybe(false));
+ for (int i = 0; i < 4; ++i) {
+ v8::Local<v8::Value> property;
+ CHECK(properties->Get(context.local(), i).ToLocal(&property) &&
+ property->IsInt32());
+ CHECK_EQ(property.As<v8::Int32>()->Value(), i);
+ }
+
+ CHECK(value->GetOwnPropertyNames(context.local(), v8::ONLY_ENUMERABLE)
+ .ToLocal(&properties));
+ CHECK_EQ(4, properties->Length());
+ for (int i = 0; i < 4; ++i) {
+ v8::Local<v8::Value> property;
+ CHECK(properties->Get(context.local(), i).ToLocal(&property) &&
+ property->IsInt32());
+ CHECK_EQ(property.As<v8::Int32>()->Value(), i);
+ }
+
+ value = value->GetPrototype().As<v8::Object>();
+ CHECK(value
+ ->GetOwnPropertyNames(context.local(),
+ static_cast<v8::PropertyFilter>(
+ v8::PropertyFilter::ALL_PROPERTIES |
+ v8::PropertyFilter::SKIP_SYMBOLS))
+ .ToLocal(&properties));
+ bool concat_found = false;
+ bool starts_with_found = false;
+ for (uint32_t i = 0; i < properties->Length(); ++i) {
+ v8::Local<v8::Value> property;
+ CHECK(properties->Get(context.local(), i).ToLocal(&property));
+ if (!property->IsString()) continue;
+ if (!concat_found)
+ concat_found = property.As<v8::String>()
+ ->Equals(context.local(), v8_str("concat"))
+ .FromMaybe(false);
+ if (!starts_with_found)
+ starts_with_found = property.As<v8::String>()
+ ->Equals(context.local(), v8_str("startsWith"))
+ .FromMaybe(false);
+ }
+ CHECK(concat_found && starts_with_found);
+}
THREADED_TEST(CallKnownGlobalReceiver) {
v8::Isolate* isolate = CcTest::isolate();
@@ -11185,6 +11230,7 @@
Local<v8::FunctionTemplate> t1 = v8::FunctionTemplate::New(isolate);
t1->RemovePrototype();
Local<v8::Function> fun = t1->GetFunction(context.local()).ToLocalChecked();
+ CHECK(!fun->IsConstructor());
CHECK(context->Global()->Set(context.local(), v8_str("fun"), fun).FromJust());
CHECK(!CompileRun("'prototype' in fun")
->BooleanValue(context.local())
@@ -13261,6 +13307,43 @@
CHECK(value->BooleanValue(context.local()).FromJust());
}
+static void NewTargetHandler(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ ApiTestFuzzer::Fuzz();
+ args.GetReturnValue().Set(args.NewTarget());
+}
+
+THREADED_TEST(NewTargetHandler) {
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
+
+ // Function template with call handler.
+ Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate);
+ templ->SetCallHandler(NewTargetHandler);
+
+ LocalContext context;
+
+ Local<Function> function =
+ templ->GetFunction(context.local()).ToLocalChecked();
+ CHECK(context->Global()
+ ->Set(context.local(), v8_str("f"), function)
+ .FromJust());
+ Local<Value> value = CompileRun("f()");
+ CHECK(value->IsUndefined());
+ value = CompileRun("new f()");
+ CHECK(value->IsFunction());
+ CHECK(value == function);
+ Local<Value> subclass = CompileRun("var g = class extends f { }; g");
+ CHECK(subclass->IsFunction());
+ value = CompileRun("new g()");
+ CHECK(value->IsFunction());
+ CHECK(value == subclass);
+ value = CompileRun("Reflect.construct(f, [], Array)");
+ CHECK(value->IsFunction());
+ CHECK(value ==
+ context->Global()
+ ->Get(context.local(), v8_str("Array"))
+ .ToLocalChecked());
+}
THREADED_TEST(ObjectProtoToString) {
v8::Isolate* isolate = CcTest::isolate();
@@ -14416,7 +14499,6 @@
return invocations;
}
-
void SetFunctionEntryHookTest::RunLoopInNewEnv(v8::Isolate* isolate) {
v8::HandleScope outer(isolate);
v8::Local<Context> env = Context::New(isolate);
@@ -14474,10 +14556,19 @@
RunLoopInNewEnv(isolate);
- // Check the exepected invocation counts.
- CHECK_EQ(2, CountInvocations(NULL, "bar"));
- CHECK_EQ(200, CountInvocations("bar", "foo"));
- CHECK_EQ(200, CountInvocations(NULL, "foo"));
+ // Check the expected invocation counts.
+ if (!i::FLAG_ignition) {
+ CHECK_EQ(2, CountInvocations(NULL, "bar"));
+ CHECK_EQ(200, CountInvocations("bar", "foo"));
+ CHECK_EQ(200, CountInvocations(NULL, "foo"));
+ } else {
+ // For ignition we don't see the actual functions being called, instead
+ // we see the IterpreterEntryTrampoline at least 102 times
+ // (100 unoptimized calls to foo, and 2 calls to bar).
+ CHECK_LE(102, CountInvocations(NULL, "InterpreterEntryTrampoline"));
+ // We should also see the calls to the optimized function foo.
+ CHECK_EQ(100, CountInvocations(NULL, "foo"));
+ }
// Verify that we have an entry hook on some specific stubs.
CHECK_NE(0, CountInvocations(NULL, "CEntryStub"));
@@ -18728,12 +18819,6 @@
}
-static void NamedPropertyGetterWhichReturns42(
- Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
- info.GetReturnValue().Set(v8_num(42));
-}
-
-
static void NamedPropertySetterWhichSetsYOnThisTo23(
Local<Name> name, Local<Value> value,
const v8::PropertyCallbackInfo<v8::Value>& info) {
@@ -20313,6 +20398,7 @@
HasOwnPropertyNamedPropertyGetter));
Local<Object> instance = templ->NewInstance(env.local()).ToLocalChecked();
CHECK(!instance->HasOwnProperty(env.local(), v8_str("42")).FromJust());
+ CHECK(!instance->HasOwnProperty(env.local(), 42).FromJust());
CHECK(instance->HasOwnProperty(env.local(), v8_str("foo")).FromJust());
CHECK(!instance->HasOwnProperty(env.local(), v8_str("bar")).FromJust());
}
@@ -20322,7 +20408,9 @@
HasOwnPropertyIndexedPropertyGetter));
Local<Object> instance = templ->NewInstance(env.local()).ToLocalChecked();
CHECK(instance->HasOwnProperty(env.local(), v8_str("42")).FromJust());
+ CHECK(instance->HasOwnProperty(env.local(), 42).FromJust());
CHECK(!instance->HasOwnProperty(env.local(), v8_str("43")).FromJust());
+ CHECK(!instance->HasOwnProperty(env.local(), 43).FromJust());
CHECK(!instance->HasOwnProperty(env.local(), v8_str("foo")).FromJust());
}
{ // Check named query interceptors.
@@ -20339,7 +20427,9 @@
0, 0, HasOwnPropertyIndexedPropertyQuery));
Local<Object> instance = templ->NewInstance(env.local()).ToLocalChecked();
CHECK(instance->HasOwnProperty(env.local(), v8_str("42")).FromJust());
+ CHECK(instance->HasOwnProperty(env.local(), 42).FromJust());
CHECK(!instance->HasOwnProperty(env.local(), v8_str("41")).FromJust());
+ CHECK(!instance->HasOwnProperty(env.local(), 41).FromJust());
}
{ // Check callbacks.
Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
@@ -20917,6 +21007,7 @@
static void MicrotaskOne(const v8::FunctionCallbackInfo<Value>& info) {
+ CHECK(v8::MicrotasksScope::IsRunningMicrotasks(info.GetIsolate()));
v8::HandleScope scope(info.GetIsolate());
v8::MicrotasksScope microtasks(info.GetIsolate(),
v8::MicrotasksScope::kDoNotRunMicrotasks);
@@ -20925,6 +21016,7 @@
static void MicrotaskTwo(const v8::FunctionCallbackInfo<Value>& info) {
+ CHECK(v8::MicrotasksScope::IsRunningMicrotasks(info.GetIsolate()));
v8::HandleScope scope(info.GetIsolate());
v8::MicrotasksScope microtasks(info.GetIsolate(),
v8::MicrotasksScope::kDoNotRunMicrotasks);
@@ -20943,6 +21035,7 @@
TEST(EnqueueMicrotask) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
+ CHECK(!v8::MicrotasksScope::IsRunningMicrotasks(env->GetIsolate()));
CompileRun(
"var ext1Calls = 0;"
"var ext2Calls = 0;");
@@ -21283,40 +21376,6 @@
}
-static void DebugEventInObserver(const v8::Debug::EventDetails& event_details) {
- v8::DebugEvent event = event_details.GetEvent();
- if (event != v8::Break) return;
- Local<Object> exec_state = event_details.GetExecutionState();
- Local<Context> context = CcTest::isolate()->GetCurrentContext();
- Local<Value> break_id =
- exec_state->Get(context, v8_str("break_id")).ToLocalChecked();
- CompileRun("function f(id) { new FrameDetails(id, 0); }");
- Local<Function> fun = Local<Function>::Cast(
- CcTest::global()->Get(context, v8_str("f")).ToLocalChecked());
- fun->Call(context, CcTest::global(), 1, &break_id).ToLocalChecked();
-}
-
-
-TEST(Regress385349) {
- i::FLAG_harmony_object_observe = true;
- i::FLAG_allow_natives_syntax = true;
- v8::Isolate* isolate = CcTest::isolate();
- HandleScope handle_scope(isolate);
- isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit);
- Local<Context> context = Context::New(isolate);
- v8::Debug::SetDebugEventListener(isolate, DebugEventInObserver);
- {
- Context::Scope context_scope(context);
- CompileRun("var obj = {};"
- "Object.observe(obj, function(changes) { debugger; });"
- "obj.a = 0;");
- }
- isolate->RunMicrotasks();
- isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kAuto);
- v8::Debug::SetDebugEventListener(isolate, nullptr);
-}
-
-
#ifdef ENABLE_DISASSEMBLER
static int probes_counter = 0;
static int misses_counter = 0;
@@ -21960,29 +22019,39 @@
CHECK(function->IsFunction());
}
-
THREADED_TEST(JSONParseObject) {
LocalContext context;
HandleScope scope(context->GetIsolate());
Local<Value> obj =
- v8::JSON::Parse(context->GetIsolate(), v8_str("{\"x\":42}"))
- .ToLocalChecked();
+ v8::JSON::Parse(context.local(), v8_str("{\"x\":42}")).ToLocalChecked();
Local<Object> global = context->Global();
global->Set(context.local(), v8_str("obj"), obj).FromJust();
ExpectString("JSON.stringify(obj)", "{\"x\":42}");
}
-
THREADED_TEST(JSONParseNumber) {
LocalContext context;
HandleScope scope(context->GetIsolate());
Local<Value> obj =
- v8::JSON::Parse(context->GetIsolate(), v8_str("42")).ToLocalChecked();
+ v8::JSON::Parse(context.local(), v8_str("42")).ToLocalChecked();
Local<Object> global = context->Global();
global->Set(context.local(), v8_str("obj"), obj).FromJust();
ExpectString("JSON.stringify(obj)", "42");
}
+THREADED_TEST(JSONStringifyObject) {
+ LocalContext context;
+ HandleScope scope(context->GetIsolate());
+ Local<Value> value =
+ v8::JSON::Parse(context.local(), v8_str("{\"x\":42}")).ToLocalChecked();
+ Local<Object> obj = value->ToObject(context.local()).ToLocalChecked();
+ Local<Object> global = context->Global();
+ global->Set(context.local(), v8_str("obj"), obj).FromJust();
+ Local<String> json =
+ v8::JSON::Stringify(context.local(), obj).ToLocalChecked();
+ v8::String::Utf8Value utf8(json);
+ ExpectString("JSON.stringify(obj)", *utf8);
+}
#if V8_OS_POSIX && !V8_OS_NACL
class ThreadInterruptTest {
@@ -24077,8 +24146,7 @@
script->Run(context).ToLocalChecked()->Int32Value(context).FromJust());
}
-
-TEST(InvalidCacheData) {
+TEST(InvalidParserCacheData) {
v8::V8::Initialize();
v8::HandleScope scope(CcTest::isolate());
LocalContext context;
@@ -24086,6 +24154,12 @@
// Cached parser data is not consumed while parsing eagerly.
TestInvalidCacheData(v8::ScriptCompiler::kConsumeParserCache);
}
+}
+
+TEST(InvalidCodeCacheData) {
+ v8::V8::Initialize();
+ v8::HandleScope scope(CcTest::isolate());
+ LocalContext context;
TestInvalidCacheData(v8::ScriptCompiler::kConsumeCodeCache);
}
@@ -24168,6 +24242,7 @@
TEST(TurboAsmDisablesNeuter) {
+ i::FLAG_allow_natives_syntax = true;
v8::V8::Initialize();
v8::HandleScope scope(CcTest::isolate());
LocalContext context;
@@ -24180,10 +24255,11 @@
" return { load: load };"
"}"
"var buffer = new ArrayBuffer(4);"
- "Module(this, {}, buffer).load();"
+ "var module = Module(this, {}, buffer);"
+ "%OptimizeFunctionOnNextCall(module.load);"
+ "module.load();"
"buffer";
- i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF.
v8::Local<v8::ArrayBuffer> result = CompileRun(load).As<v8::ArrayBuffer>();
CHECK_EQ(should_be_neuterable, result->IsNeuterable());
@@ -24195,10 +24271,11 @@
" return { store: store };"
"}"
"var buffer = new ArrayBuffer(4);"
- "Module(this, {}, buffer).store();"
+ "var module = Module(this, {}, buffer);"
+ "%OptimizeFunctionOnNextCall(module.store);"
+ "module.store();"
"buffer";
- i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF.
result = CompileRun(store).As<v8::ArrayBuffer>();
CHECK_EQ(should_be_neuterable, result->IsNeuterable());
}
@@ -24629,6 +24706,60 @@
CHECK_EQ(0U, set->Size());
}
+TEST(SetDeleteThenAsArray) {
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4946
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope handle_scope(isolate);
+ LocalContext env;
+
+ // make a Set
+ v8::Local<v8::Value> val = CompileRun("new Set([1, 2, 3])");
+ v8::Local<v8::Set> set = v8::Local<v8::Set>::Cast(val);
+ CHECK_EQ(3U, set->Size());
+
+ // delete the "middle" element (using AsArray to
+ // determine which element is the "middle" element)
+ v8::Local<v8::Array> array1 = set->AsArray();
+ CHECK_EQ(3U, array1->Length());
+ CHECK(set->Delete(env.local(), array1->Get(env.local(), 1).ToLocalChecked())
+ .FromJust());
+
+ // make sure there are no undefined values when we convert to an array again.
+ v8::Local<v8::Array> array2 = set->AsArray();
+ uint32_t length = array2->Length();
+ CHECK_EQ(2U, length);
+ for (uint32_t i = 0; i < length; i++) {
+ CHECK(!array2->Get(env.local(), i).ToLocalChecked()->IsUndefined());
+ }
+}
+
+TEST(MapDeleteThenAsArray) {
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4946
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope handle_scope(isolate);
+ LocalContext env;
+
+ // make a Map
+ v8::Local<v8::Value> val = CompileRun("new Map([[1, 2], [3, 4], [5, 6]])");
+ v8::Local<v8::Map> map = v8::Local<v8::Map>::Cast(val);
+ CHECK_EQ(3U, map->Size());
+
+ // delete the "middle" element (using AsArray to
+ // determine which element is the "middle" element)
+ v8::Local<v8::Array> array1 = map->AsArray();
+ CHECK_EQ(6U, array1->Length());
+ // Map::AsArray returns a flat array, so the second key is at index 2.
+ v8::Local<v8::Value> key = array1->Get(env.local(), 2).ToLocalChecked();
+ CHECK(map->Delete(env.local(), key).FromJust());
+
+ // make sure there are no undefined values when we convert to an array again.
+ v8::Local<v8::Array> array2 = map->AsArray();
+ uint32_t length = array2->Length();
+ CHECK_EQ(4U, length);
+ for (uint32_t i = 0; i < length; i++) {
+ CHECK(!array2->Get(env.local(), i).ToLocalChecked()->IsUndefined());
+ }
+}
TEST(CompatibleReceiverCheckOnCachedICHandler) {
v8::Isolate* isolate = CcTest::isolate();
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/test-asm-validator.cc
index d5b5179..a07eecf 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -61,7 +61,6 @@
i::ParseInfo info(zone, script);
i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
info.set_global();
info.set_lazy(false);
info.set_allow_lazy_parsing(false);
@@ -73,7 +72,7 @@
info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
AsmTyper typer(isolate, zone, *script, root);
if (typer.Validate()) {
- ExpressionTypeCollector(isolate, root, types).Run();
+ ExpressionTypeCollector(isolate, root, typer.bounds(), types).Run();
return "";
} else {
return typer.error_message();
@@ -1801,14 +1800,10 @@
TEST(InstanceOf) {
- const char* errorMsg = FLAG_harmony_instanceof
- ? "asm: line 0: do-expression encountered\n"
- : "asm: line 1: illegal comparison operator\n";
-
CHECK_FUNC_ERROR(
"function bar() { return (0 instanceof 0)|0; }\n"
"function foo() { bar(); }",
- errorMsg);
+ "asm: line 1: illegal comparison operator\n");
}
diff --git a/test/cctest/test-assembler-arm.cc b/test/cctest/test-assembler-arm.cc
index 3763f06..cf404b0 100644
--- a/test/cctest/test-assembler-arm.cc
+++ b/test/cctest/test-assembler-arm.cc
@@ -412,29 +412,26 @@
Assembler assm(isolate, NULL, 0);
- if (CpuFeatures::IsSupported(ARMv7)) {
- CpuFeatureScope scope(&assm, ARMv7);
- __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF.
- __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
- __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0.
- __ add(r0, r1, Operand(r2));
- __ add(r0, r0, Operand(r3));
- __ mov(pc, Operand(lr));
+ __ usat(r1, 8, Operand(r0)); // Sat 0xFFFF to 0-255 = 0xFF.
+ __ usat(r2, 12, Operand(r0, ASR, 9)); // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
+ __ usat(r3, 1, Operand(r0, LSL, 16)); // Sat (0xFFFF<<16) to 0-1 = 0x0.
+ __ add(r0, r1, Operand(r2));
+ __ add(r0, r0, Operand(r3));
+ __ mov(pc, Operand(lr));
- CodeDesc desc;
- assm.GetCode(&desc);
- Handle<Code> code = isolate->factory()->NewCode(
- desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
#ifdef DEBUG
- OFStream os(stdout);
- code->Print(os);
+ OFStream os(stdout);
+ code->Print(os);
#endif
- F1 f = FUNCTION_CAST<F1>(code->entry());
- int res = reinterpret_cast<int>(
- CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
- ::printf("f() = %d\n", res);
- CHECK_EQ(382, res);
- }
+ F1 f = FUNCTION_CAST<F1>(code->entry());
+ int res = reinterpret_cast<int>(
+ CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
+ ::printf("f() = %d\n", res);
+ CHECK_EQ(382, res);
}
@@ -2231,6 +2228,158 @@
}
}
+TEST(ARMv8_vsel) {
+ // Test the vsel floating point instructions.
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+
+ Assembler assm(isolate, NULL, 0);
+
+ // Used to indicate whether a condition passed or failed.
+ static constexpr float kResultPass = 1.0f;
+ static constexpr float kResultFail = -kResultPass;
+
+ struct ResultsF32 {
+ float vseleq_;
+ float vselge_;
+ float vselgt_;
+ float vselvs_;
+
+ // The following conditions aren't architecturally supported, but the
+ // assembler implements them by swapping the inputs.
+ float vselne_;
+ float vsellt_;
+ float vselle_;
+ float vselvc_;
+ };
+
+ struct ResultsF64 {
+ double vseleq_;
+ double vselge_;
+ double vselgt_;
+ double vselvs_;
+
+ // The following conditions aren't architecturally supported, but the
+ // assembler implements them by swapping the inputs.
+ double vselne_;
+ double vsellt_;
+ double vselle_;
+ double vselvc_;
+ };
+
+ if (CpuFeatures::IsSupported(ARMv8)) {
+ CpuFeatureScope scope(&assm, ARMv8);
+
+ // Create a helper function:
+ // void TestVsel(uint32_t nzcv,
+ // ResultsF32* results_f32,
+ // ResultsF64* results_f64);
+ __ msr(CPSR_f, Operand(r0));
+
+ __ vmov(s1, kResultPass);
+ __ vmov(s2, kResultFail);
+
+ __ vsel(eq, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vseleq_));
+ __ vsel(ge, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselge_));
+ __ vsel(gt, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselgt_));
+ __ vsel(vs, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselvs_));
+
+ __ vsel(ne, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselne_));
+ __ vsel(lt, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vsellt_));
+ __ vsel(le, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselle_));
+ __ vsel(vc, s0, s1, s2);
+ __ vstr(s0, r1, offsetof(ResultsF32, vselvc_));
+
+ __ vmov(d1, kResultPass);
+ __ vmov(d2, kResultFail);
+
+ __ vsel(eq, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vseleq_));
+ __ vsel(ge, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselge_));
+ __ vsel(gt, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselgt_));
+ __ vsel(vs, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselvs_));
+
+ __ vsel(ne, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselne_));
+ __ vsel(lt, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vsellt_));
+ __ vsel(le, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselle_));
+ __ vsel(vc, d0, d1, d2);
+ __ vstr(d0, r2, offsetof(ResultsF64, vselvc_));
+
+ __ bx(lr);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+#ifdef DEBUG
+ OFStream os(stdout);
+ code->Print(os);
+#endif
+ F5 f = FUNCTION_CAST<F5>(code->entry());
+ Object* dummy = nullptr;
+ USE(dummy);
+
+ STATIC_ASSERT(kResultPass == -kResultFail);
+#define CHECK_VSEL(n, z, c, v, vseleq, vselge, vselgt, vselvs) \
+ do { \
+ ResultsF32 results_f32; \
+ ResultsF64 results_f64; \
+ uint32_t nzcv = (n << 31) | (z << 30) | (c << 29) | (v << 28); \
+ dummy = CALL_GENERATED_CODE(isolate, f, nzcv, &results_f32, &results_f64, \
+ 0, 0); \
+ CHECK_EQ(vseleq, results_f32.vseleq_); \
+ CHECK_EQ(vselge, results_f32.vselge_); \
+ CHECK_EQ(vselgt, results_f32.vselgt_); \
+ CHECK_EQ(vselvs, results_f32.vselvs_); \
+ CHECK_EQ(-vseleq, results_f32.vselne_); \
+ CHECK_EQ(-vselge, results_f32.vsellt_); \
+ CHECK_EQ(-vselgt, results_f32.vselle_); \
+ CHECK_EQ(-vselvs, results_f32.vselvc_); \
+ CHECK_EQ(vseleq, results_f64.vseleq_); \
+ CHECK_EQ(vselge, results_f64.vselge_); \
+ CHECK_EQ(vselgt, results_f64.vselgt_); \
+ CHECK_EQ(vselvs, results_f64.vselvs_); \
+ CHECK_EQ(-vseleq, results_f64.vselne_); \
+ CHECK_EQ(-vselge, results_f64.vsellt_); \
+ CHECK_EQ(-vselgt, results_f64.vselle_); \
+ CHECK_EQ(-vselvs, results_f64.vselvc_); \
+ } while (0);
+
+ // N Z C V vseleq vselge vselgt vselvs
+ CHECK_VSEL(0, 0, 0, 0, kResultFail, kResultPass, kResultPass, kResultFail);
+ CHECK_VSEL(0, 0, 0, 1, kResultFail, kResultFail, kResultFail, kResultPass);
+ CHECK_VSEL(0, 0, 1, 0, kResultFail, kResultPass, kResultPass, kResultFail);
+ CHECK_VSEL(0, 0, 1, 1, kResultFail, kResultFail, kResultFail, kResultPass);
+ CHECK_VSEL(0, 1, 0, 0, kResultPass, kResultPass, kResultFail, kResultFail);
+ CHECK_VSEL(0, 1, 0, 1, kResultPass, kResultFail, kResultFail, kResultPass);
+ CHECK_VSEL(0, 1, 1, 0, kResultPass, kResultPass, kResultFail, kResultFail);
+ CHECK_VSEL(0, 1, 1, 1, kResultPass, kResultFail, kResultFail, kResultPass);
+ CHECK_VSEL(1, 0, 0, 0, kResultFail, kResultFail, kResultFail, kResultFail);
+ CHECK_VSEL(1, 0, 0, 1, kResultFail, kResultPass, kResultPass, kResultPass);
+ CHECK_VSEL(1, 0, 1, 0, kResultFail, kResultFail, kResultFail, kResultFail);
+ CHECK_VSEL(1, 0, 1, 1, kResultFail, kResultPass, kResultPass, kResultPass);
+ CHECK_VSEL(1, 1, 0, 0, kResultPass, kResultFail, kResultFail, kResultFail);
+ CHECK_VSEL(1, 1, 0, 1, kResultPass, kResultPass, kResultFail, kResultPass);
+ CHECK_VSEL(1, 1, 1, 0, kResultPass, kResultFail, kResultFail, kResultFail);
+ CHECK_VSEL(1, 1, 1, 1, kResultPass, kResultPass, kResultFail, kResultPass);
+
+#undef CHECK_VSEL
+ }
+}
TEST(regress4292_b) {
CcTest::InitializeVM();
diff --git a/test/cctest/test-assembler-ia32.cc b/test/cctest/test-assembler-ia32.cc
index 12733c2..e4cac56 100644
--- a/test/cctest/test-assembler-ia32.cc
+++ b/test/cctest/test-assembler-ia32.cc
@@ -1497,4 +1497,45 @@
}
}
+TEST(Regress621926) {
+ // Bug description:
+ // The opcodes for cmpw r/m16, r16 and cmpw r16, r/m16 were swapped.
+ // This was causing non-commutative comparisons to produce the wrong result.
+ CcTest::InitializeVM();
+ Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
+ HandleScope scope(isolate);
+ Assembler assm(isolate, nullptr, 0);
+
+ uint16_t a = 42;
+
+ Label fail;
+ __ push(ebx);
+ __ mov(ebx, Immediate(reinterpret_cast<intptr_t>(&a)));
+ __ mov(eax, Immediate(41));
+ __ cmpw(eax, Operand(ebx, 0));
+ __ j(above_equal, &fail);
+ __ cmpw(Operand(ebx, 0), eax);
+ __ j(below_equal, &fail);
+ __ mov(eax, 1);
+ __ pop(ebx);
+ __ ret(0);
+ __ bind(&fail);
+ __ mov(eax, 0);
+ __ pop(ebx);
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+#ifdef OBJECT_PRINT
+ OFStream os(stdout);
+ code->Print(os);
+#endif
+
+ F0 f = FUNCTION_CAST<F0>(code->entry());
+ CHECK_EQ(f(), 1);
+}
+
#undef __
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc
index b8a0426..e73b40e 100644
--- a/test/cctest/test-assembler-mips.cc
+++ b/test/cctest/test-assembler-mips.cc
@@ -2048,7 +2048,7 @@
v8::internal::CodeObjectRequired::kYes);
typedef struct test_float {
- int64_t rt;
+ int32_t rt;
double a;
double b;
double bold;
@@ -3191,6 +3191,8 @@
__ jr(ra);
__ nop();
+ CHECK_EQ(assm.UnboundLabelsCount(), 0);
+
CodeDesc desc;
assm.GetCode(&desc);
Handle<Code> code = isolate->factory()->NewCode(
diff --git a/test/cctest/test-assembler-mips64.cc b/test/cctest/test-assembler-mips64.cc
index dd6ed6b..9529dab 100644
--- a/test/cctest/test-assembler-mips64.cc
+++ b/test/cctest/test-assembler-mips64.cc
@@ -1385,16 +1385,22 @@
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
- typedef struct {
+ struct T {
int64_t r1;
int64_t r2;
int64_t r3;
int64_t r4;
int64_t r5;
int64_t r6;
+ int64_t r7;
+ int64_t r8;
+ int64_t r9;
+ int64_t r10;
+ int64_t r11;
+ int64_t r12;
uint32_t ui;
int32_t si;
- } T;
+ };
T t;
Assembler assm(isolate, NULL, 0);
@@ -1423,26 +1429,25 @@
// lh with positive data.
__ lh(a5, MemOperand(a0, offsetof(T, ui)));
- __ sw(a5, MemOperand(a0, offsetof(T, r2)));
+ __ sw(a5, MemOperand(a0, offsetof(T, r7)));
// lh with negative data.
__ lh(a6, MemOperand(a0, offsetof(T, si)));
- __ sw(a6, MemOperand(a0, offsetof(T, r3)));
+ __ sw(a6, MemOperand(a0, offsetof(T, r8)));
// lhu with negative data.
__ lhu(a7, MemOperand(a0, offsetof(T, si)));
- __ sw(a7, MemOperand(a0, offsetof(T, r4)));
+ __ sw(a7, MemOperand(a0, offsetof(T, r9)));
// lb with negative data.
__ lb(t0, MemOperand(a0, offsetof(T, si)));
- __ sw(t0, MemOperand(a0, offsetof(T, r5)));
+ __ sw(t0, MemOperand(a0, offsetof(T, r10)));
- // // sh writes only 1/2 of word.
- __ lui(t1, 0x3333);
- __ ori(t1, t1, 0x3333);
- __ sw(t1, MemOperand(a0, offsetof(T, r6)));
- __ lhu(t1, MemOperand(a0, offsetof(T, si)));
- __ sh(t1, MemOperand(a0, offsetof(T, r6)));
+ // sh writes only 1/2 of word.
+ __ lw(a4, MemOperand(a0, offsetof(T, ui)));
+ __ sh(a4, MemOperand(a0, offsetof(T, r11)));
+ __ lw(a4, MemOperand(a0, offsetof(T, si)));
+ __ sh(a4, MemOperand(a0, offsetof(T, r12)));
__ jr(ra);
__ nop();
@@ -1454,26 +1459,75 @@
F3 f = FUNCTION_CAST<F3>(code->entry());
t.ui = 0x44332211;
t.si = 0x99aabbcc;
- t.r1 = 0x1111111111111111;
- t.r2 = 0x2222222222222222;
- t.r3 = 0x3333333333333333;
- t.r4 = 0x4444444444444444;
+ t.r1 = 0x5555555555555555;
+ t.r2 = 0x5555555555555555;
+ t.r3 = 0x5555555555555555;
+ t.r4 = 0x5555555555555555;
t.r5 = 0x5555555555555555;
- t.r6 = 0x6666666666666666;
+ t.r6 = 0x5555555555555555;
+ t.r7 = 0x5555555555555555;
+ t.r8 = 0x5555555555555555;
+ t.r9 = 0x5555555555555555;
+ t.r10 = 0x5555555555555555;
+ t.r11 = 0x5555555555555555;
+ t.r12 = 0x5555555555555555;
+
Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
USE(dummy);
- // Unsigned data, 32 & 64.
- CHECK_EQ(static_cast<int64_t>(0x1111111144332211L), t.r1);
- CHECK_EQ(static_cast<int64_t>(0x0000000000002211L), t.r2);
+ if (kArchEndian == kLittle) {
+ // Unsigned data, 32 & 64
+ CHECK_EQ(static_cast<int64_t>(0x5555555544332211L), t.r1); // lw, sw.
+ CHECK_EQ(static_cast<int64_t>(0x0000000044332211L), t.r2); // sd.
- // Signed data, 32 & 64.
- CHECK_EQ(static_cast<int64_t>(0x33333333ffffbbccL), t.r3);
- CHECK_EQ(static_cast<int64_t>(0xffffffff0000bbccL), t.r4);
+ // Signed data, 32 & 64.
+ CHECK_EQ(static_cast<int64_t>(0x5555555599aabbccL), t.r3); // lw, sw.
+ CHECK_EQ(static_cast<int64_t>(0xffffffff99aabbccL), t.r4); // sd.
- // Signed data, 32 & 64.
- CHECK_EQ(static_cast<int64_t>(0x55555555ffffffccL), t.r5);
- CHECK_EQ(static_cast<int64_t>(0x000000003333bbccL), t.r6);
+ // Signed data, 32 & 64.
+ CHECK_EQ(static_cast<int64_t>(0x5555555599aabbccL), t.r5); // lwu, sw.
+ CHECK_EQ(static_cast<int64_t>(0x0000000099aabbccL), t.r6); // sd.
+
+ // lh with unsigned and signed data.
+ CHECK_EQ(static_cast<int64_t>(0x5555555500002211L), t.r7); // lh, sw.
+ CHECK_EQ(static_cast<int64_t>(0x55555555ffffbbccL), t.r8); // lh, sw.
+
+ // lhu with signed data.
+ CHECK_EQ(static_cast<int64_t>(0x555555550000bbccL), t.r9); // lhu, sw.
+
+ // lb with signed data.
+ CHECK_EQ(static_cast<int64_t>(0x55555555ffffffccL), t.r10); // lb, sw.
+
+ // sh with unsigned and signed data.
+ CHECK_EQ(static_cast<int64_t>(0x5555555555552211L), t.r11); // lw, sh.
+ CHECK_EQ(static_cast<int64_t>(0x555555555555bbccL), t.r12); // lw, sh.
+ } else {
+ // Unsigned data, 32 & 64
+ CHECK_EQ(static_cast<int64_t>(0x4433221155555555L), t.r1); // lw, sw.
+ CHECK_EQ(static_cast<int64_t>(0x0000000044332211L), t.r2); // sd.
+
+ // Signed data, 32 & 64.
+ CHECK_EQ(static_cast<int64_t>(0x99aabbcc55555555L), t.r3); // lw, sw.
+ CHECK_EQ(static_cast<int64_t>(0xffffffff99aabbccL), t.r4); // sd.
+
+ // Signed data, 32 & 64.
+ CHECK_EQ(static_cast<int64_t>(0x99aabbcc55555555L), t.r5); // lwu, sw.
+ CHECK_EQ(static_cast<int64_t>(0x0000000099aabbccL), t.r6); // sd.
+
+ // lh with unsigned and signed data.
+ CHECK_EQ(static_cast<int64_t>(0x0000443355555555L), t.r7); // lh, sw.
+ CHECK_EQ(static_cast<int64_t>(0xffff99aa55555555L), t.r8); // lh, sw.
+
+ // lhu with signed data.
+ CHECK_EQ(static_cast<int64_t>(0x000099aa55555555L), t.r9); // lhu, sw.
+
+ // lb with signed data.
+ CHECK_EQ(static_cast<int64_t>(0xffffff9955555555L), t.r10); // lb, sw.
+
+ // sh with unsigned and signed data.
+ CHECK_EQ(static_cast<int64_t>(0x2211555555555555L), t.r11); // lw, sh.
+ CHECK_EQ(static_cast<int64_t>(0xbbcc555555555555L), t.r12); // lw, sh.
+ }
}
@@ -2162,7 +2216,7 @@
__ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
__ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) );
- __ lw(t0, MemOperand(a0, offsetof(TestFloat, rt)) );
+ __ ld(t0, MemOperand(a0, offsetof(TestFloat, rt)));
__ Move(f12, 0.0);
__ Move(f10, 0.0);
__ Move(f16, 0.0);
@@ -3261,6 +3315,8 @@
__ jr(ra);
__ nop();
+ CHECK_EQ(assm.UnboundLabelsCount(), 0);
+
CodeDesc desc;
assm.GetCode(&desc);
Handle<Code> code = isolate->factory()->NewCode(
@@ -5559,15 +5615,22 @@
uint64_t expected_res;
};
- struct TestCaseLdpc tc[] = {
- // offset, expected_res
- { -131072, 0x250ffffe250fffff },
- { -4, 0x250c0006250c0007 },
- { -1, 0x250c0000250c0001 },
- { 0, 0x03001025ef180000 },
- { 1, 0x2508000125080000 },
- { 4, 0x2508000725080006 },
- { 131071, 0x250bfffd250bfffc },
+ auto doubleword = [](uint32_t word2, uint32_t word1) {
+ if (kArchEndian == kLittle)
+ return (static_cast<uint64_t>(word2) << 32) + word1;
+ else
+ return (static_cast<uint64_t>(word1) << 32) + word2;
+ };
+
+ TestCaseLdpc tc[] = {
+ // offset, expected_res
+ {-131072, doubleword(0x250ffffe, 0x250fffff)},
+ {-4, doubleword(0x250c0006, 0x250c0007)},
+ {-1, doubleword(0x250c0000, 0x250c0001)},
+ {0, doubleword(0x03001025, 0xef180000)},
+ {1, doubleword(0x25080001, 0x25080000)},
+ {4, doubleword(0x25080007, 0x25080006)},
+ {131071, doubleword(0x250bfffd, 0x250bfffc)},
};
size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseLdpc);
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
index 66199fb..e18ae71 100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -328,6 +328,32 @@
CHECK_EQ(1u, result);
}
+TEST(AssemblerX64TestwOperations) {
+ typedef uint16_t (*F)(uint16_t * x);
+ CcTest::InitializeVM();
+ // Allocate an executable page of memory.
+ size_t actual_size;
+ byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
+ Assembler::kMinimalBufferSize, &actual_size, true));
+ CHECK(buffer);
+ Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+
+ // Set rax with the ZF flag of the testl instruction.
+ Label done;
+ __ movq(rax, Immediate(1));
+ __ testw(Operand(arg1, 0), Immediate(0xf0f0));
+ __ j(not_zero, &done, Label::kNear);
+ __ movq(rax, Immediate(0));
+ __ bind(&done);
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ // Call the function from C++.
+ uint16_t operand = 0x8000;
+ uint16_t result = FUNCTION_CAST<F>(buffer)(&operand);
+ CHECK_EQ(1u, result);
+}
TEST(AssemblerX64XorlOperations) {
CcTest::InitializeVM();
diff --git a/test/cctest/test-ast-expression-visitor.cc b/test/cctest/test-ast-expression-visitor.cc
index bda1fba..5df8253 100644
--- a/test/cctest/test-ast-expression-visitor.cc
+++ b/test/cctest/test-ast-expression-visitor.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <stdlib.h>
+#include <map>
#include "src/v8.h"
@@ -19,39 +20,25 @@
namespace {
-static void CollectTypes(HandleAndZoneScope* handles, const char* source,
- ZoneVector<ExpressionTypeEntry>* dst) {
- i::Isolate* isolate = CcTest::i_isolate();
- i::Factory* factory = isolate->factory();
+class NodeTypeCounter : public AstExpressionVisitor {
+ public:
+ typedef std::map<AstNode::NodeType, int> Counters;
- i::Handle<i::String> source_code =
- factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked();
+ NodeTypeCounter(Isolate* isolate, Expression* expr, Counters* counts)
+ : AstExpressionVisitor(isolate, expr), counts_(counts) {}
- i::Handle<i::Script> script = factory->NewScript(source_code);
+ protected:
+ void VisitExpression(Expression* expr) override {
+ (*counts_)[expr->node_type()]++;
+ }
- i::ParseInfo info(handles->main_zone(), script);
- i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
- info.set_global();
- info.set_lazy(false);
- info.set_allow_lazy_parsing(false);
- info.set_toplevel(true);
-
- CHECK(i::Compiler::ParseAndAnalyze(&info));
-
- ExpressionTypeCollector(
- isolate,
- info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(), dst)
- .Run();
-}
+ private:
+ Counters* counts_;
+};
} // namespace
-
-TEST(VisitExpressions) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
+TEST(VisitExpression) {
const char test_function[] =
"function GeometricMean(stdlib, foreign, buffer) {\n"
" \"use asm\";\n"
@@ -85,339 +72,31 @@
" return { geometricMean: geometricMean };\n"
"}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- // function logSum
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(sum, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(q, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- // for (p = start << 3, q = end << 3;
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(q, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- // (p|0) < (q|0);
- CHECK_EXPR(CompareOperation, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(q, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // p = (p + 8)|0) {\n"
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // sum = sum + +log(values[p>>3]);
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(sum, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(sum, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(Call, Bounds::Unbounded()) {
- CHECK_VAR(log, Bounds::Unbounded());
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_VAR(values, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(p, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- // return +sum;
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(sum, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // function geometricMean
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // return +exp(+logSum(start, end) / +((end - start)|0));
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(Call, Bounds::Unbounded()) {
- CHECK_VAR(exp, Bounds::Unbounded());
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(Call, Bounds::Unbounded()) {
- CHECK_VAR(logSum, Bounds::Unbounded());
- CHECK_VAR(start, Bounds::Unbounded());
- CHECK_VAR(end, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- CHECK_VAR(end, Bounds::Unbounded());
- CHECK_VAR(start, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // "use asm";
- CHECK_EXPR(Literal, Bounds::Unbounded());
- // var exp = stdlib.Math.exp;
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(exp, Bounds::Unbounded());
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_VAR(stdlib, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // var log = stdlib.Math.log;
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(log, Bounds::Unbounded());
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_VAR(stdlib, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // var values = new stdlib.Float64Array(buffer);
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(values, Bounds::Unbounded());
- CHECK_EXPR(CallNew, Bounds::Unbounded()) {
- CHECK_EXPR(Property, Bounds::Unbounded()) {
- CHECK_VAR(stdlib, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_VAR(buffer, Bounds::Unbounded());
- }
- }
- // return { geometricMean: geometricMean };
- CHECK_EXPR(ObjectLiteral, Bounds::Unbounded()) {
- CHECK_VAR(geometricMean, Bounds::Unbounded());
- }
- }
- }
- CHECK_TYPES_END
-}
-
-
-TEST(VisitConditional) {
+ // Parse + compile test_function, and extract the AST node for it.
v8::V8::Initialize();
HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- // Check that traversing the ternary operator works.
- const char test_function[] =
- "function foo() {\n"
- " var a, b, c;\n"
- " var x = a ? b : c;\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(x, Bounds::Unbounded());
- CHECK_EXPR(Conditional, Bounds::Unbounded()) {
- CHECK_VAR(a, Bounds::Unbounded());
- CHECK_VAR(b, Bounds::Unbounded());
- CHECK_VAR(c, Bounds::Unbounded());
- }
- }
- }
- }
- CHECK_TYPES_END
-}
+ i::Isolate* isolate = CcTest::i_isolate();
+ i::Handle<i::String> source_code =
+ isolate->factory()
+ ->NewStringFromUtf8(i::CStrVector(test_function))
+ .ToHandleChecked();
+ i::Handle<i::Script> script = isolate->factory()->NewScript(source_code);
+ i::ParseInfo info(handles.main_zone(), script);
+ i::Parser parser(&info);
+ info.set_global();
+ info.set_lazy(false);
+ info.set_allow_lazy_parsing(false);
+ info.set_toplevel(true);
+ CHECK(i::Compiler::ParseAndAnalyze(&info));
+ Expression* test_function_expr =
+ info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
-
-TEST(VisitEmptyForStatment) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- // Check that traversing an empty for statement works.
- const char test_function[] =
- "function foo() {\n"
- " for (;;) {}\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {}
- }
- CHECK_TYPES_END
-}
-
-
-TEST(VisitSwitchStatment) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- // Check that traversing a switch with a default works.
- const char test_function[] =
- "function foo() {\n"
- " switch (0) { case 1: break; default: break; }\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(.switch_tag, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- CHECK_EXPR(Literal, Bounds::Unbounded());
- CHECK_VAR(.switch_tag, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- CHECK_TYPES_END
-}
-
-
-TEST(VisitThrow) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- const char test_function[] =
- "function foo() {\n"
- " throw 123;\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(Throw, Bounds::Unbounded()) {
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- CHECK_TYPES_END
-}
-
-
-TEST(VisitYield) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- const char test_function[] =
- "function* foo() {\n"
- " yield 123;\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- // Implicit initial yield
- CHECK_EXPR(Yield, Bounds::Unbounded()) {
- CHECK_VAR(.generator_object, Bounds::Unbounded());
- CHECK_EXPR(Assignment, Bounds::Unbounded()) {
- CHECK_VAR(.generator_object, Bounds::Unbounded());
- CHECK_EXPR(CallRuntime, Bounds::Unbounded());
- }
- }
- // Explicit yield (argument wrapped with CreateIterResultObject)
- CHECK_EXPR(Yield, Bounds::Unbounded()) {
- CHECK_VAR(.generator_object, Bounds::Unbounded());
- CHECK_EXPR(CallRuntime, Bounds::Unbounded()) {
- CHECK_EXPR(Literal, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- // Argument to implicit final return
- CHECK_EXPR(CallRuntime, Bounds::Unbounded()) { // CreateIterResultObject
- CHECK_EXPR(Literal, Bounds::Unbounded());
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- // Implicit finally clause
- CHECK_EXPR(CallRuntime, Bounds::Unbounded()) {
- CHECK_VAR(.generator_object, Bounds::Unbounded());
- }
- }
- }
- CHECK_TYPES_END
-}
-
-
-TEST(VisitSkipping) {
- v8::V8::Initialize();
- HandleAndZoneScope handles;
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- const char test_function[] =
- "function foo(x) {\n"
- " return (x + x) + 1;\n"
- "}\n";
- CollectTypes(&handles, test_function, &types);
- CHECK_TYPES_BEGIN {
- CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
- CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
- // Skip x + x
- CHECK_SKIP();
- CHECK_EXPR(Literal, Bounds::Unbounded());
- }
- }
- }
- CHECK_TYPES_END
+ // Run NodeTypeCounter and sanity check counts for 3 expression types,
+ // and for overall # of types found.
+ NodeTypeCounter::Counters counts;
+ NodeTypeCounter(isolate, test_function_expr, &counts).Run();
+ CHECK_EQ(21, counts[AstNode::kBinaryOperation]);
+ CHECK_EQ(26, counts[AstNode::kLiteral]);
+ CHECK_EQ(3, counts[AstNode::kFunctionLiteral]);
+ CHECK_EQ(10, counts.size());
}
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 32d720e..18f0009 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -364,9 +364,7 @@
CHECK(!f->shared()->feedback_vector()->is_empty());
}
-
-// Test that optimized code for different closures is actually shared
-// immediately by the FastNewClosureStub when run in the same context.
+// Test that optimized code for different closures is actually shared.
TEST(OptimizedCodeSharing1) {
FLAG_stress_compaction = false;
FLAG_allow_natives_syntax = true;
@@ -385,8 +383,8 @@
"%DebugPrint(closure0());"
"%OptimizeFunctionOnNextCall(closure0);"
"%DebugPrint(closure0());"
- "var closure1 = MakeClosure();"
- "var closure2 = MakeClosure();");
+ "var closure1 = MakeClosure(); closure1();"
+ "var closure2 = MakeClosure(); closure2();");
Handle<JSFunction> fun1 = Handle<JSFunction>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
env->Global()
@@ -403,9 +401,7 @@
}
}
-
-// Test that optimized code for different closures is actually shared
-// immediately by the FastNewClosureStub when run different contexts.
+// Test that optimized code for different closures is actually shared.
TEST(OptimizedCodeSharing2) {
if (FLAG_stress_compaction) return;
FLAG_allow_natives_syntax = true;
@@ -456,8 +452,8 @@
"%DebugPrint(closure0());"
"%OptimizeFunctionOnNextCall(closure0);"
"%DebugPrint(closure0());"
- "var closure1 = MakeClosure();"
- "var closure2 = MakeClosure();");
+ "var closure1 = MakeClosure(); closure1();"
+ "var closure2 = MakeClosure(); closure2();");
Handle<JSFunction> fun1 = Handle<JSFunction>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
env->Global()
@@ -475,9 +471,7 @@
}
}
-
-// Test that optimized code for different closures is actually shared
-// immediately by the FastNewClosureStub without context-dependent entries.
+// Test that optimized code for different closures is actually shared.
TEST(OptimizedCodeSharing3) {
if (FLAG_stress_compaction) return;
FLAG_allow_natives_syntax = true;
@@ -531,8 +525,8 @@
"%DebugPrint(closure0());"
"%OptimizeFunctionOnNextCall(closure0);"
"%DebugPrint(closure0());"
- "var closure1 = MakeClosure();"
- "var closure2 = MakeClosure();");
+ "var closure1 = MakeClosure(); closure1();"
+ "var closure2 = MakeClosure(); closure2();");
Handle<JSFunction> fun1 = Handle<JSFunction>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
env->Global()
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 24c84c3..e4eceec 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -461,8 +461,7 @@
const v8::CpuProfileNode* result = FindChild(context, node, name);
if (!result) {
char buffer[100];
- i::SNPrintF(Vector<char>(buffer, arraysize(buffer)),
- "Failed to GetChild: %s", name);
+ i::SNPrintF(i::ArrayVector(buffer), "Failed to GetChild: %s", name);
FATAL(buffer);
}
return result;
@@ -1034,8 +1033,8 @@
i::Handle<i::String> str = factory->NewStringFromAsciiChecked(func_name);
int line = 1;
int column = 1;
- profiler.CodeCreateEvent(i::Logger::FUNCTION_TAG, code, func->shared(), NULL,
- *str, line, column);
+ profiler.CodeCreateEvent(i::Logger::FUNCTION_TAG, code, func->shared(), *str,
+ line, column);
// Enqueue a tick event to enable code events processing.
EnqueueTickSampleEvent(processor.get(), code_address);
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index ab27f39..440c6f1 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -7834,8 +7834,8 @@
CompileRun("var p = new Promise(function(res, rej) { fun(); res(); });");
CompileRun(
"var r;"
- "p.chain(function() { r = 'resolved'; },"
- " function() { r = 'rejected'; });");
+ "p.then(function() { r = 'resolved'; },"
+ " function() { r = 'rejected'; });");
CHECK(CompileRun("r")->Equals(context, v8_str("resolved")).FromJust());
}
@@ -7874,45 +7874,14 @@
CompileRun("var p = new Promise(function(res, rej) { fun(); res(); });");
CompileRun(
"var r;"
- "p.chain(function() { r = 'resolved'; },"
- " function(e) { r = 'rejected' + e; });");
+ "p.then(function() { r = 'resolved'; },"
+ " function(e) { r = 'rejected' + e; });");
CHECK(
CompileRun("r")->Equals(context, v8_str("rejectedrejection")).FromJust());
CHECK_EQ(1, exception_event_counter);
}
-TEST(DebugBreakOnExceptionInObserveCallback) {
- i::FLAG_harmony_object_observe = true;
- DebugLocalContext env;
- v8::Isolate* isolate = env->GetIsolate();
- v8::HandleScope scope(isolate);
- v8::Debug::SetDebugEventListener(isolate, &DebugEventCountException);
- v8::Local<v8::Context> context = env.context();
- // Break on uncaught exception
- ChangeBreakOnException(false, true);
- exception_event_counter = 0;
-
- v8::Local<v8::FunctionTemplate> fun =
- v8::FunctionTemplate::New(isolate, ThrowCallback);
- CHECK(env->Global()
- ->Set(context, v8_str("fun"),
- fun->GetFunction(context).ToLocalChecked())
- .FromJust());
-
- CompileRun(
- "var obj = {};"
- "var callbackRan = false;"
- "Object.observe(obj, function() {"
- " callbackRan = true;"
- " throw Error('foo');"
- "});"
- "obj.prop = 1");
- CHECK(CompileRun("callbackRan")->BooleanValue(context).FromJust());
- CHECK_EQ(1, exception_event_counter);
-}
-
-
static void DebugHarmonyScopingListener(
const v8::Debug::EventDetails& event_details) {
v8::DebugEvent event = event_details.GetEvent();
@@ -8185,3 +8154,36 @@
ExpectString("JSON.stringify(log)",
"[\"a4\",\"b2\",\"c4\",\"e0\",\"e0\",\"e0\",\"e0\",\"f0\"]");
}
+
+size_t current_action = 0;
+StepAction actions[] = {StepNext, StepNext};
+static void DebugStepOverFunctionWithCaughtExceptionListener(
+ const v8::Debug::EventDetails& event_details) {
+ v8::DebugEvent event = event_details.GetEvent();
+ if (event != v8::Break) return;
+ ++break_point_hit_count;
+ if (current_action >= 2) return;
+ PrepareStep(actions[current_action]);
+}
+
+TEST(DebugStepOverFunctionWithCaughtException) {
+ i::FLAG_allow_natives_syntax = true;
+
+ DebugLocalContext env;
+ v8::Isolate* isolate = env->GetIsolate();
+ v8::HandleScope scope(isolate);
+ v8::Debug::SetDebugEventListener(
+ isolate, DebugStepOverFunctionWithCaughtExceptionListener);
+
+ break_point_hit_count = 0;
+ CompileRun(
+ "function foo() {\n"
+ " try { throw new Error(); } catch (e) {}\n"
+ "}\n"
+ "debugger;\n"
+ "foo();\n"
+ "foo();\n");
+
+ v8::Debug::SetDebugEventListener(env->GetIsolate(), nullptr);
+ CHECK_EQ(break_point_hit_count, 4);
+}
diff --git a/test/cctest/test-disasm-arm.cc b/test/cctest/test-disasm-arm.cc
index 7eea8a1..40745f9 100644
--- a/test/cctest/test-disasm-arm.cc
+++ b/test/cctest/test-disasm-arm.cc
@@ -399,15 +399,6 @@
COMPARE(bfi(r1, r0, 31, 1),
"e7df1f90 bfi r1, r0, #31, #1");
- COMPARE(usat(r0, 1, Operand(r1)),
- "e6e10011 usat r0, #1, r1");
- COMPARE(usat(r2, 7, Operand(lr)),
- "e6e7201e usat r2, #7, lr");
- COMPARE(usat(r3, 31, Operand(r4, LSL, 31)),
- "e6ff3f94 usat r3, #31, r4, lsl #31");
- COMPARE(usat(r8, 0, Operand(r5, ASR, 17)),
- "e6e088d5 usat r8, #0, r5, asr #17");
-
COMPARE(pkhbt(r3, r4, Operand(r5, LSL, 17)),
"e6843895 pkhbt r3, r4, r5, lsl #17");
COMPARE(pkhtb(r3, r4, Operand(r5, ASR, 17)),
@@ -443,6 +434,15 @@
COMPARE(rbit(r10, ip), "e6ffaf3c rbit r10, ip");
}
+ COMPARE(usat(r0, 1, Operand(r1)),
+ "e6e10011 usat r0, #1, r1");
+ COMPARE(usat(r2, 7, Operand(lr)),
+ "e6e7201e usat r2, #7, lr");
+ COMPARE(usat(r3, 31, Operand(r4, LSL, 31)),
+ "e6ff3f94 usat r3, #31, r4, lsl #31");
+ COMPARE(usat(r8, 0, Operand(r5, ASR, 17)),
+ "e6e088d5 usat r8, #0, r5, asr #17");
+
COMPARE(smmla(r0, r1, r2, r3), "e7503211 smmla r0, r1, r2, r3");
COMPARE(smmla(r10, r9, r8, r7), "e75a7819 smmla r10, r9, r8, r7");
@@ -860,6 +860,51 @@
}
+TEST(ARMv8_vselX_disasm) {
+ SET_UP();
+
+ if (CpuFeatures::IsSupported(ARMv8)) {
+ // Native instructions.
+ COMPARE(vsel(eq, d0, d1, d2),
+ "fe010b02 vseleq.f64 d0, d1, d2");
+ COMPARE(vsel(eq, s0, s1, s2),
+ "fe000a81 vseleq.f32 s0, s1, s2");
+ COMPARE(vsel(ge, d0, d1, d2),
+ "fe210b02 vselge.f64 d0, d1, d2");
+ COMPARE(vsel(ge, s0, s1, s2),
+ "fe200a81 vselge.f32 s0, s1, s2");
+ COMPARE(vsel(gt, d0, d1, d2),
+ "fe310b02 vselgt.f64 d0, d1, d2");
+ COMPARE(vsel(gt, s0, s1, s2),
+ "fe300a81 vselgt.f32 s0, s1, s2");
+ COMPARE(vsel(vs, d0, d1, d2),
+ "fe110b02 vselvs.f64 d0, d1, d2");
+ COMPARE(vsel(vs, s0, s1, s2),
+ "fe100a81 vselvs.f32 s0, s1, s2");
+
+ // Inverted conditions (and swapped inputs).
+ COMPARE(vsel(ne, d0, d1, d2),
+ "fe020b01 vseleq.f64 d0, d2, d1");
+ COMPARE(vsel(ne, s0, s1, s2),
+ "fe010a20 vseleq.f32 s0, s2, s1");
+ COMPARE(vsel(lt, d0, d1, d2),
+ "fe220b01 vselge.f64 d0, d2, d1");
+ COMPARE(vsel(lt, s0, s1, s2),
+ "fe210a20 vselge.f32 s0, s2, s1");
+ COMPARE(vsel(le, d0, d1, d2),
+ "fe320b01 vselgt.f64 d0, d2, d1");
+ COMPARE(vsel(le, s0, s1, s2),
+ "fe310a20 vselgt.f32 s0, s2, s1");
+ COMPARE(vsel(vc, d0, d1, d2),
+ "fe120b01 vselvs.f64 d0, d2, d1");
+ COMPARE(vsel(vc, s0, s1, s2),
+ "fe110a20 vselvs.f32 s0, s2, s1");
+ }
+
+ VERIFY_RUN();
+}
+
+
TEST(Neon) {
SET_UP();
diff --git a/test/cctest/test-disasm-ia32.cc b/test/cctest/test-disasm-ia32.cc
index f96eb00..3ecd7b3 100644
--- a/test/cctest/test-disasm-ia32.cc
+++ b/test/cctest/test-disasm-ia32.cc
@@ -29,11 +29,11 @@
#include "src/v8.h"
+#include "src/code-factory.h"
#include "src/debug/debug.h"
#include "src/disasm.h"
#include "src/disassembler.h"
#include "src/ia32/frames-ia32.h"
-#include "src/ic/ic.h"
#include "src/macro-assembler.h"
#include "test/cctest/cctest.h"
@@ -290,7 +290,7 @@
__ bind(&L2);
__ call(Operand(ebx, ecx, times_4, 10000));
__ nop();
- Handle<Code> ic(LoadIC::initialize_stub(isolate, NOT_INSIDE_TYPEOF));
+ Handle<Code> ic(CodeFactory::LoadIC(isolate, NOT_INSIDE_TYPEOF).code());
__ call(ic, RelocInfo::CODE_TARGET);
__ nop();
__ call(FUNCTION_ADDR(DummyStaticFunction), RelocInfo::RUNTIME_ENTRY);
diff --git a/test/cctest/test-disasm-mips64.cc b/test/cctest/test-disasm-mips64.cc
index 8a1e0e7..d8f5681 100644
--- a/test/cctest/test-disasm-mips64.cc
+++ b/test/cctest/test-disasm-mips64.cc
@@ -530,41 +530,28 @@
COMPARE(dsrav(v0, v1, fp),
"03c31017 dsrav v0, v1, fp");
- if (kArchVariant == kMips64r2) {
- COMPARE(rotr(a0, a1, 0),
- "00252002 rotr a0, a1, 0");
- COMPARE(rotr(s0, s1, 8),
- "00318202 rotr s0, s1, 8");
- COMPARE(rotr(a6, a7, 24),
- "002b5602 rotr a6, a7, 24");
- COMPARE(rotr(v0, v1, 31),
- "002317c2 rotr v0, v1, 31");
- COMPARE(drotr(a0, a1, 0),
- "0025203a drotr a0, a1, 0");
- COMPARE(drotr(s0, s1, 8),
- "0031823a drotr s0, s1, 8");
- COMPARE(drotr(a6, a7, 24),
- "002b563a drotr a6, a7, 24");
- COMPARE(drotr(v0, v1, 31),
- "002317fa drotr v0, v1, 31");
+ COMPARE(rotr(a0, a1, 0), "00252002 rotr a0, a1, 0");
+ COMPARE(rotr(s0, s1, 8), "00318202 rotr s0, s1, 8");
+ COMPARE(rotr(a6, a7, 24), "002b5602 rotr a6, a7, 24");
+ COMPARE(rotr(v0, v1, 31), "002317c2 rotr v0, v1, 31");
+ COMPARE(drotr(a0, a1, 0), "0025203a drotr a0, a1, 0");
+ COMPARE(drotr(s0, s1, 8), "0031823a drotr s0, s1, 8");
+ COMPARE(drotr(a6, a7, 24), "002b563a drotr a6, a7, 24");
+ COMPARE(drotr(v0, v1, 31), "002317fa drotr v0, v1, 31");
- COMPARE(rotrv(a0, a1, a2),
- "00c52046 rotrv a0, a1, a2");
- COMPARE(rotrv(s0, s1, s2),
- "02518046 rotrv s0, s1, s2");
- COMPARE(rotrv(a6, a7, t0),
- "018b5046 rotrv a6, a7, t0");
- COMPARE(rotrv(v0, v1, fp),
- "03c31046 rotrv v0, v1, fp");
- COMPARE(drotrv(a0, a1, a2),
- "00c52056 drotrv a0, a1, a2");
- COMPARE(drotrv(s0, s1, s2),
- "02518056 drotrv s0, s1, s2");
- COMPARE(drotrv(a6, a7, t0),
- "018b5056 drotrv a6, a7, t0");
- COMPARE(drotrv(v0, v1, fp),
- "03c31056 drotrv v0, v1, fp");
- }
+ COMPARE(drotr32(a0, a1, 0), "0025203e drotr32 a0, a1, 0");
+ COMPARE(drotr32(s0, s1, 8), "0031823e drotr32 s0, s1, 8");
+ COMPARE(drotr32(a6, a7, 24), "002b563e drotr32 a6, a7, 24");
+ COMPARE(drotr32(v0, v1, 31), "002317fe drotr32 v0, v1, 31");
+
+ COMPARE(rotrv(a0, a1, a2), "00c52046 rotrv a0, a1, a2");
+ COMPARE(rotrv(s0, s1, s2), "02518046 rotrv s0, s1, s2");
+ COMPARE(rotrv(a6, a7, t0), "018b5046 rotrv a6, a7, t0");
+ COMPARE(rotrv(v0, v1, fp), "03c31046 rotrv v0, v1, fp");
+ COMPARE(drotrv(a0, a1, a2), "00c52056 drotrv a0, a1, a2");
+ COMPARE(drotrv(s0, s1, s2), "02518056 drotrv s0, s1, s2");
+ COMPARE(drotrv(a6, a7, t0), "018b5056 drotrv a6, a7, t0");
+ COMPARE(drotrv(v0, v1, fp), "03c31056 drotrv v0, v1, fp");
COMPARE(break_(0),
"0000000d break, code: 0x00000 (0)");
diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc
index 3722c1f..b855626 100644
--- a/test/cctest/test-disasm-x64.cc
+++ b/test/cctest/test-disasm-x64.cc
@@ -29,10 +29,10 @@
#include "src/v8.h"
+#include "src/code-factory.h"
#include "src/debug/debug.h"
#include "src/disasm.h"
#include "src/disassembler.h"
-#include "src/ic/ic.h"
#include "src/macro-assembler.h"
#include "test/cctest/cctest.h"
@@ -282,7 +282,7 @@
// TODO(mstarzinger): The following is protected.
// __ call(Operand(rbx, rcx, times_4, 10000));
__ nop();
- Handle<Code> ic(LoadIC::initialize_stub(isolate, NOT_INSIDE_TYPEOF));
+ Handle<Code> ic(CodeFactory::LoadIC(isolate, NOT_INSIDE_TYPEOF).code());
__ call(ic, RelocInfo::CODE_TARGET);
__ nop();
__ nop();
diff --git a/test/cctest/test-disasm-x87.cc b/test/cctest/test-disasm-x87.cc
index 697a9d3..9a4c6d4 100644
--- a/test/cctest/test-disasm-x87.cc
+++ b/test/cctest/test-disasm-x87.cc
@@ -29,10 +29,10 @@
#include "src/v8.h"
+#include "src/code-factory.h"
#include "src/debug/debug.h"
#include "src/disasm.h"
#include "src/disassembler.h"
-#include "src/ic/ic.h"
#include "src/macro-assembler.h"
#include "src/x87/frames-x87.h"
#include "test/cctest/cctest.h"
@@ -290,7 +290,7 @@
__ bind(&L2);
__ call(Operand(ebx, ecx, times_4, 10000));
__ nop();
- Handle<Code> ic(LoadIC::initialize_stub(isolate, NOT_INSIDE_TYPEOF));
+ Handle<Code> ic(CodeFactory::LoadIC(isolate, NOT_INSIDE_TYPEOF).code());
__ call(ic, RelocInfo::CODE_TARGET);
__ nop();
__ call(FUNCTION_ADDR(DummyStaticFunction), RelocInfo::RUNTIME_ENTRY);
diff --git a/test/cctest/test-field-type-tracking.cc b/test/cctest/test-field-type-tracking.cc
index 7b262db..9709f87 100644
--- a/test/cctest/test-field-type-tracking.cc
+++ b/test/cctest/test-field-type-tracking.cc
@@ -86,6 +86,7 @@
class Expectations {
static const int MAX_PROPERTIES = 10;
Isolate* isolate_;
+ ElementsKind elements_kind_;
PropertyType types_[MAX_PROPERTIES];
PropertyAttributes attributes_[MAX_PROPERTIES];
Representation representations_[MAX_PROPERTIES];
@@ -97,8 +98,15 @@
int number_of_properties_;
public:
+ explicit Expectations(Isolate* isolate, ElementsKind elements_kind)
+ : isolate_(isolate),
+ elements_kind_(elements_kind),
+ number_of_properties_(0) {}
+
explicit Expectations(Isolate* isolate)
- : isolate_(isolate), number_of_properties_(0) {}
+ : Expectations(
+ isolate,
+ isolate->object_function()->initial_map()->elements_kind()) {}
void Init(int index, PropertyType type, PropertyAttributes attributes,
Representation representation, Handle<Object> value) {
@@ -143,6 +151,10 @@
os << "\n";
}
+ void SetElementsKind(ElementsKind elements_kind) {
+ elements_kind_ = elements_kind;
+ }
+
Handle<FieldType> GetFieldType(int index) {
CHECK(index < MAX_PROPERTIES);
CHECK(types_[index] == DATA || types_[index] == ACCESSOR);
@@ -252,6 +264,7 @@
}
bool Check(Map* map, int expected_nof) const {
+ CHECK_EQ(elements_kind_, map->elements_kind());
CHECK(number_of_properties_ <= MAX_PROPERTIES);
CHECK_EQ(expected_nof, map->NumberOfOwnDescriptors());
CHECK(!map->is_dictionary_map());
@@ -279,6 +292,13 @@
// given |map|.
//
+ Handle<Map> AsElementsKind(Handle<Map> map, ElementsKind elements_kind) {
+ elements_kind_ = elements_kind;
+ map = Map::AsElementsKind(map, elements_kind);
+ CHECK_EQ(elements_kind_, map->elements_kind());
+ return map;
+ }
+
Handle<Map> AddDataField(Handle<Map> map, PropertyAttributes attributes,
Representation representation,
Handle<FieldType> heap_type) {
@@ -401,15 +421,8 @@
int descriptor =
map->instance_descriptors()->SearchWithCache(isolate, *name, *map);
- map = Map::TransitionToAccessorProperty(
- map, name, descriptor, ACCESSOR_GETTER, getter, attributes);
- CHECK(!map->is_deprecated());
- CHECK(!map->is_dictionary_map());
-
- descriptor =
- map->instance_descriptors()->SearchWithCache(isolate, *name, *map);
- map = Map::TransitionToAccessorProperty(
- map, name, descriptor, ACCESSOR_SETTER, setter, attributes);
+ map = Map::TransitionToAccessorProperty(isolate, map, name, descriptor,
+ getter, setter, attributes);
CHECK(!map->is_deprecated());
CHECK(!map->is_dictionary_map());
return map;
@@ -589,7 +602,7 @@
// Create new maps by generalizing representation of propX field.
Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate);
- CompilationInfo info("testing", isolate, &zone);
+ CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner);
@@ -968,7 +981,7 @@
Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
- CompilationInfo info("testing", isolate, &zone);
+ CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner);
@@ -1053,7 +1066,7 @@
Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
- CompilationInfo info("testing", isolate, &zone);
+ CompilationInfo info(ArrayVector("testing"), isolate, &zone);
CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner);
@@ -1529,6 +1542,271 @@
////////////////////////////////////////////////////////////////////////////////
+// A set of tests for elements kind reconfiguration case.
+//
+
+// This test ensures that representation/field type generalization is correctly
+// propagated from one branch of transition tree (|map2) to another (|map|).
+//
+// + - p0 - p1 - p2A - p3 - p4: |map|
+// |
+// ek
+// |
+// {} - p0 - p1 - p2B - p3 - p4: |map2|
+//
+// where "p2A" and "p2B" differ only in the representation/field type.
+//
+static void TestReconfigureElementsKind_GeneralizeRepresentation(
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type) {
+ Isolate* isolate = CcTest::i_isolate();
+
+ Expectations expectations(isolate, FAST_SMI_ELEMENTS);
+
+ // Create a map, add required properties to it and initialize expectations.
+ Handle<Map> initial_map = Map::Create(isolate, 0);
+ initial_map->set_elements_kind(FAST_SMI_ELEMENTS);
+
+ Handle<Map> map = initial_map;
+ map = expectations.AsElementsKind(map, FAST_ELEMENTS);
+ for (int i = 0; i < kPropCount; i++) {
+ map = expectations.AddDataField(map, NONE, from_representation, from_type);
+ }
+ CHECK(!map->is_deprecated());
+ CHECK(map->is_stable());
+ CHECK(expectations.Check(*map));
+
+ // Create another branch in transition tree (property at index |kDiffProp|
+ // has different representatio/field type), initialize expectations.
+ const int kDiffProp = kPropCount / 2;
+ Expectations expectations2(isolate, FAST_SMI_ELEMENTS);
+
+ Handle<Map> map2 = initial_map;
+ for (int i = 0; i < kPropCount; i++) {
+ if (i == kDiffProp) {
+ map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type);
+ } else {
+ map2 = expectations2.AddDataField(map2, NONE, from_representation,
+ from_type);
+ }
+ }
+ CHECK(!map2->is_deprecated());
+ CHECK(map2->is_stable());
+ CHECK(expectations2.Check(*map2));
+
+ Zone zone(isolate->allocator());
+ Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate);
+ CompilationInfo info(ArrayVector("testing"), isolate, &zone);
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->AssumeFieldType(field_owner);
+
+ // Reconfigure elements kinds of |map2|, which should generalize
+ // representations in |map|.
+ Handle<Map> new_map = Map::ReconfigureElementsKind(map2, FAST_ELEMENTS);
+
+ // |map2| should be left unchanged but marked unstable.
+ CHECK(!map2->is_stable());
+ CHECK(!map2->is_deprecated());
+ CHECK_NE(*map2, *new_map);
+ CHECK(expectations2.Check(*map2));
+
+ // |map| should be deprecated and |new_map| should match new expectations.
+ expectations.SetDataField(kDiffProp, expected_representation, expected_type);
+
+ CHECK(map->is_deprecated());
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->Rollback(); // Properly cleanup compilation info.
+ CHECK_NE(*map, *new_map);
+
+ CHECK(!new_map->is_deprecated());
+ CHECK(expectations.Check(*new_map));
+
+ // Update deprecated |map|, it should become |new_map|.
+ Handle<Map> updated_map = Map::Update(map);
+ CHECK_EQ(*new_map, *updated_map);
+
+ // Ensure Map::FindElementsKindTransitionedMap() is able to find the
+ // transitioned map.
+ {
+ MapHandleList map_list;
+ map_list.Add(updated_map);
+ Map* transitioned_map = map2->FindElementsKindTransitionedMap(&map_list);
+ CHECK_EQ(*updated_map, transitioned_map);
+ }
+}
+
+// This test ensures that trivial representation/field type generalization
+// (from HeapObject to HeapObject) is correctly propagated from one branch of
+// transition tree (|map2|) to another (|map|).
+//
+// + - p0 - p1 - p2A - p3 - p4: |map|
+// |
+// ek
+// |
+// {} - p0 - p1 - p2B - p3 - p4: |map2|
+//
+// where "p2A" and "p2B" differ only in the representation/field type.
+//
+static void TestReconfigureElementsKind_GeneralizeRepresentationTrivial(
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type,
+ bool expected_field_type_dependency = true) {
+ Isolate* isolate = CcTest::i_isolate();
+
+ Expectations expectations(isolate, FAST_SMI_ELEMENTS);
+
+ // Create a map, add required properties to it and initialize expectations.
+ Handle<Map> initial_map = Map::Create(isolate, 0);
+ initial_map->set_elements_kind(FAST_SMI_ELEMENTS);
+
+ Handle<Map> map = initial_map;
+ map = expectations.AsElementsKind(map, FAST_ELEMENTS);
+ for (int i = 0; i < kPropCount; i++) {
+ map = expectations.AddDataField(map, NONE, from_representation, from_type);
+ }
+ CHECK(!map->is_deprecated());
+ CHECK(map->is_stable());
+ CHECK(expectations.Check(*map));
+
+ // Create another branch in transition tree (property at index |kDiffProp|
+ // has different attributes), initialize expectations.
+ const int kDiffProp = kPropCount / 2;
+ Expectations expectations2(isolate, FAST_SMI_ELEMENTS);
+
+ Handle<Map> map2 = initial_map;
+ for (int i = 0; i < kPropCount; i++) {
+ if (i == kDiffProp) {
+ map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type);
+ } else {
+ map2 = expectations2.AddDataField(map2, NONE, from_representation,
+ from_type);
+ }
+ }
+ CHECK(!map2->is_deprecated());
+ CHECK(map2->is_stable());
+ CHECK(expectations2.Check(*map2));
+
+ Zone zone(isolate->allocator());
+ Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate);
+ CompilationInfo info(ArrayVector("testing"), isolate, &zone);
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->AssumeFieldType(field_owner);
+
+ // Reconfigure elements kinds of |map2|, which should generalize
+ // representations in |map|.
+ Handle<Map> new_map = Map::ReconfigureElementsKind(map2, FAST_ELEMENTS);
+
+ // |map2| should be left unchanged but marked unstable.
+ CHECK(!map2->is_stable());
+ CHECK(!map2->is_deprecated());
+ CHECK_NE(*map2, *new_map);
+ CHECK(expectations2.Check(*map2));
+
+ // In trivial case |map| should be returned as a result of the elements
+ // kind reconfiguration, respective field types should be generalized and
+ // respective code dependencies should be invalidated. |map| should be NOT
+ // deprecated and it should match new expectations.
+ expectations.SetDataField(kDiffProp, expected_representation, expected_type);
+ CHECK(!map->is_deprecated());
+ CHECK_EQ(*map, *new_map);
+ CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted());
+ info.dependencies()->Rollback(); // Properly cleanup compilation info.
+
+ CHECK(!new_map->is_deprecated());
+ CHECK(expectations.Check(*new_map));
+
+ Handle<Map> updated_map = Map::Update(map);
+ CHECK_EQ(*new_map, *updated_map);
+
+ // Ensure Map::FindElementsKindTransitionedMap() is able to find the
+ // transitioned map.
+ {
+ MapHandleList map_list;
+ map_list.Add(updated_map);
+ Map* transitioned_map = map2->FindElementsKindTransitionedMap(&map_list);
+ CHECK_EQ(*updated_map, transitioned_map);
+ }
+}
+
+TEST(ReconfigureElementsKind_GeneralizeRepresentationSmiToDouble) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+
+ TestReconfigureElementsKind_GeneralizeRepresentation(
+ Representation::Smi(), any_type, Representation::Double(), any_type,
+ Representation::Double(), any_type);
+}
+
+TEST(ReconfigureElementsKind_GeneralizeRepresentationSmiToTagged) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ TestReconfigureElementsKind_GeneralizeRepresentation(
+ Representation::Smi(), any_type, Representation::HeapObject(), value_type,
+ Representation::Tagged(), any_type);
+}
+
+TEST(ReconfigureElementsKind_GeneralizeRepresentationDoubleToTagged) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ TestReconfigureElementsKind_GeneralizeRepresentation(
+ Representation::Double(), any_type, Representation::HeapObject(),
+ value_type, Representation::Tagged(), any_type);
+}
+
+TEST(ReconfigureElementsKind_GeneralizeRepresentationHeapObjToHeapObj) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+
+ Handle<FieldType> current_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ Handle<FieldType> new_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ Handle<FieldType> expected_type = any_type;
+
+ TestReconfigureElementsKind_GeneralizeRepresentationTrivial(
+ Representation::HeapObject(), current_type, Representation::HeapObject(),
+ new_type, Representation::HeapObject(), expected_type);
+ current_type = expected_type;
+
+ new_type = FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ TestReconfigureElementsKind_GeneralizeRepresentationTrivial(
+ Representation::HeapObject(), any_type, Representation::HeapObject(),
+ new_type, Representation::HeapObject(), any_type, false);
+}
+
+TEST(ReconfigureElementsKind_GeneralizeRepresentationHeapObjectToTagged) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
+
+ TestReconfigureElementsKind_GeneralizeRepresentation(
+ Representation::HeapObject(), value_type, Representation::Smi(), any_type,
+ Representation::Tagged(), any_type);
+}
+
+////////////////////////////////////////////////////////////////////////////////
// A set of tests checking split map deprecation.
//
@@ -1644,15 +1922,16 @@
CHECK(map->is_stable());
CHECK(expectations.Check(*map));
+ Expectations expectations2 = expectations;
+
// Apply some special transition to |map|.
CHECK(map->owns_descriptors());
- Handle<Map> map2 = config.Transition(map);
+ Handle<Map> map2 = config.Transition(map, expectations2);
// |map| should still match expectations.
CHECK(!map->is_deprecated());
CHECK(expectations.Check(*map));
- Expectations expectations2 = expectations;
if (config.generalizes_representations()) {
for (int i = 0; i < kPropCount; i++) {
expectations2.GeneralizeRepresentation(i);
@@ -1724,13 +2003,15 @@
FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
- Handle<Map> Transition(Handle<Map> map) {
- return Map::CopyAsElementsKind(map, DICTIONARY_ELEMENTS,
- INSERT_TRANSITION);
+ Handle<Map> Transition(Handle<Map> map, Expectations& expectations) {
+ Handle<Symbol> frozen_symbol(map->GetHeap()->frozen_symbol());
+ expectations.SetElementsKind(DICTIONARY_ELEMENTS);
+ return Map::CopyForPreventExtensions(map, NONE, frozen_symbol,
+ "CopyForPreventExtensions");
}
// TODO(ishell): remove once IS_PROTO_TRANS_ISSUE_FIXED is removed.
bool generalizes_representations() const { return false; }
- bool is_non_equevalent_transition() const { return false; }
+ bool is_non_equevalent_transition() const { return true; }
};
TestConfig config;
TestGeneralizeRepresentationWithSpecialTransition(
@@ -1748,7 +2029,7 @@
FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
- Handle<Map> Transition(Handle<Map> map) {
+ Handle<Map> Transition(Handle<Map> map, Expectations& expectations) {
Isolate* isolate = CcTest::i_isolate();
Handle<FieldType> any_type = FieldType::Any(isolate);
@@ -1760,65 +2041,10 @@
.ToHandleChecked();
CHECK(!map->owns_descriptors());
- return Map::CopyAsElementsKind(map, DICTIONARY_ELEMENTS,
- INSERT_TRANSITION);
- }
- // TODO(ishell): remove once IS_PROTO_TRANS_ISSUE_FIXED is removed.
- bool generalizes_representations() const { return false; }
- bool is_non_equevalent_transition() const { return false; }
- };
- TestConfig config;
- TestGeneralizeRepresentationWithSpecialTransition(
- config, Representation::Smi(), any_type, Representation::HeapObject(),
- value_type, Representation::Tagged(), any_type);
-}
-
-
-TEST(ForObservedTransitionFromMapOwningDescriptor) {
- CcTest::InitializeVM();
- v8::HandleScope scope(CcTest::isolate());
- Isolate* isolate = CcTest::i_isolate();
- Handle<FieldType> any_type = FieldType::Any(isolate);
- Handle<FieldType> value_type =
- FieldType::Class(Map::Create(isolate, 0), isolate);
-
- struct TestConfig {
- Handle<Map> Transition(Handle<Map> map) {
- return Map::CopyForObserved(map);
- }
- // TODO(ishell): remove once IS_PROTO_TRANS_ISSUE_FIXED is removed.
- bool generalizes_representations() const { return false; }
- bool is_non_equevalent_transition() const { return true; }
- };
- TestConfig config;
- TestGeneralizeRepresentationWithSpecialTransition(
- config, Representation::Smi(), any_type, Representation::HeapObject(),
- value_type, Representation::Tagged(), any_type);
-}
-
-
-TEST(ForObservedTransitionFromMapNotOwningDescriptor) {
- CcTest::InitializeVM();
- v8::HandleScope scope(CcTest::isolate());
- Isolate* isolate = CcTest::i_isolate();
- Handle<FieldType> any_type = FieldType::Any(isolate);
- Handle<FieldType> value_type =
- FieldType::Class(Map::Create(isolate, 0), isolate);
-
- struct TestConfig {
- Handle<Map> Transition(Handle<Map> map) {
- Isolate* isolate = CcTest::i_isolate();
- Handle<FieldType> any_type = FieldType::Any(isolate);
-
- // Add one more transition to |map| in order to prevent descriptors
- // ownership.
- CHECK(map->owns_descriptors());
- Map::CopyWithField(map, MakeString("foo"), any_type, NONE,
- Representation::Smi(), INSERT_TRANSITION)
- .ToHandleChecked();
- CHECK(!map->owns_descriptors());
-
- return Map::CopyForObserved(map);
+ Handle<Symbol> frozen_symbol(map->GetHeap()->frozen_symbol());
+ expectations.SetElementsKind(DICTIONARY_ELEMENTS);
+ return Map::CopyForPreventExtensions(map, NONE, frozen_symbol,
+ "CopyForPreventExtensions");
}
// TODO(ishell): remove once IS_PROTO_TRANS_ISSUE_FIXED is removed.
bool generalizes_representations() const { return false; }
@@ -1849,7 +2075,7 @@
prototype_ = factory->NewJSObjectFromMap(Map::Create(isolate, 0));
}
- Handle<Map> Transition(Handle<Map> map) {
+ Handle<Map> Transition(Handle<Map> map, Expectations& expectations) {
return Map::TransitionToPrototype(map, prototype_, REGULAR_PROTOTYPE);
}
// TODO(ishell): remove once IS_PROTO_TRANS_ISSUE_FIXED is removed.
@@ -1883,7 +2109,7 @@
prototype_ = factory->NewJSObjectFromMap(Map::Create(isolate, 0));
}
- Handle<Map> Transition(Handle<Map> map) {
+ Handle<Map> Transition(Handle<Map> map, Expectations& expectations) {
Isolate* isolate = CcTest::i_isolate();
Handle<FieldType> any_type = FieldType::Any(isolate);
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc
index 22fd785..06e7466 100644
--- a/test/cctest/test-global-handles.cc
+++ b/test/cctest/test-global-handles.cc
@@ -417,3 +417,55 @@
// Should not crash.
g.SetWeak<void>(nullptr, &WeakCallback, v8::WeakCallbackType::kParameter);
}
+
+void finalizer(const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
+ data.GetParameter()->ClearWeak();
+ v8::Local<v8::Object> o =
+ v8::Local<v8::Object>::New(data.GetIsolate(), *data.GetParameter());
+ o->Set(data.GetIsolate()->GetCurrentContext(), v8_str("finalizer"),
+ v8_str("was here"))
+ .FromJust();
+}
+
+TEST(FinalizerWeakness) {
+ CcTest::InitializeVM();
+ v8::Isolate* isolate = CcTest::isolate();
+
+ v8::Global<v8::Object> g;
+ int identity;
+
+ {
+ v8::HandleScope scope(isolate);
+ v8::Local<v8::Object> o = v8::Object::New(isolate);
+ identity = o->GetIdentityHash();
+ g.Reset(isolate, o);
+ g.SetWeak(&g, finalizer, v8::WeakCallbackType::kFinalizer);
+ }
+
+ CcTest::i_isolate()->heap()->CollectAllAvailableGarbage();
+
+ CHECK(!g.IsEmpty());
+ v8::HandleScope scope(isolate);
+ v8::Local<v8::Object> o = v8::Local<v8::Object>::New(isolate, g);
+ CHECK_EQ(identity, o->GetIdentityHash());
+ CHECK(o->Has(isolate->GetCurrentContext(), v8_str("finalizer")).FromJust());
+}
+
+TEST(PhatomHandlesWithoutCallbacks) {
+ CcTest::InitializeVM();
+ v8::Isolate* isolate = CcTest::isolate();
+
+ v8::Global<v8::Object> g1, g2;
+ {
+ v8::HandleScope scope(isolate);
+ g1.Reset(isolate, v8::Object::New(isolate));
+ g1.SetWeak();
+ g2.Reset(isolate, v8::Object::New(isolate));
+ g2.SetWeak();
+ }
+
+ CHECK_EQ(0, isolate->NumberOfPhantomHandleResetsSinceLastCall());
+ CcTest::i_isolate()->heap()->CollectAllAvailableGarbage();
+ CHECK_EQ(2, isolate->NumberOfPhantomHandleResetsSinceLastCall());
+ CHECK_EQ(0, isolate->NumberOfPhantomHandleResetsSinceLastCall());
+}
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index dfe5911..767c5cd 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -44,6 +44,7 @@
using i::AllocationTraceTree;
using i::AllocationTracker;
using i::HashMap;
+using i::ArrayVector;
using i::Vector;
namespace {
@@ -2513,8 +2514,7 @@
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
- AllocationTraceNode* node =
- FindNode(tracker, Vector<const char*>(names, arraysize(names)));
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
CHECK(node);
CHECK_GE(node->allocation_count(), 2u);
CHECK_GE(node->allocation_size(), 4u * 5u);
@@ -2540,8 +2540,7 @@
tracker->trace_tree()->Print(tracker);
const char* names[] = {"", "start", "f_0_0", "f_0_1", "f_0_2"};
- AllocationTraceNode* node =
- FindNode(tracker, Vector<const char*>(names, arraysize(names)));
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
CHECK(node);
CHECK_GE(node->allocation_count(), 100u);
CHECK_GE(node->allocation_size(), 4 * node->allocation_count());
@@ -2590,8 +2589,7 @@
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
- AllocationTraceNode* node =
- FindNode(tracker, Vector<const char*>(names, arraysize(names)));
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
CHECK(node);
CHECK_GE(node->allocation_count(), 100u);
CHECK_GE(node->allocation_size(), 4 * node->allocation_count());
@@ -2616,8 +2614,7 @@
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
- AllocationTraceNode* node =
- FindNode(tracker, Vector<const char*>(names, arraysize(names)));
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
CHECK(node);
CHECK_LT(node->allocation_count(), 100u);
@@ -2646,8 +2643,7 @@
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
- AllocationTraceNode* node =
- FindNode(tracker, Vector<const char*>(names, arraysize(names)));
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names));
CHECK(node);
CHECK_GE(node->allocation_count(), 2u);
CHECK_GE(node->allocation_size(), 4 * node->allocation_count());
@@ -2875,6 +2871,15 @@
return node;
}
+static void CheckNoZeroCountNodes(v8::AllocationProfile::Node* node) {
+ for (auto alloc : node->allocations) {
+ CHECK_GT(alloc.count, 0u);
+ }
+ for (auto child : node->children) {
+ CheckNoZeroCountNodes(child);
+ }
+}
+
TEST(SamplingHeapProfiler) {
v8::HandleScope scope(v8::Isolate::GetCurrent());
LocalContext env;
@@ -2913,8 +2918,7 @@
CHECK(!profile.is_empty());
const char* names[] = {"", "foo", "bar"};
- auto node_bar = FindAllocationProfileNode(
- *profile, Vector<const char*>(names, arraysize(names)));
+ auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names));
CHECK(node_bar);
// Count the number of allocations we sampled from bar.
@@ -2941,8 +2945,7 @@
CHECK(!profile.is_empty());
const char* names[] = {"", "foo", "bar"};
- auto node_bar = FindAllocationProfileNode(
- *profile, Vector<const char*>(names, arraysize(names)));
+ auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names));
CHECK(node_bar);
// Count the number of allocations we sampled from bar.
@@ -2976,13 +2979,11 @@
CHECK(!profile.is_empty());
const char* names1[] = {"", "start", "f_0_0", "f_0_1", "f_0_2"};
- auto node1 = FindAllocationProfileNode(
- *profile, Vector<const char*>(names1, arraysize(names1)));
+ auto node1 = FindAllocationProfileNode(*profile, ArrayVector(names1));
CHECK(node1);
const char* names2[] = {"", "generateFunctions"};
- auto node2 = FindAllocationProfileNode(
- *profile, Vector<const char*>(names2, arraysize(names2)));
+ auto node2 = FindAllocationProfileNode(*profile, ArrayVector(names2));
CHECK(node2);
heap_profiler->StopSamplingHeapProfiler();
@@ -3002,6 +3003,8 @@
heap_profiler->GetAllocationProfile());
CHECK(!profile.is_empty());
+ CheckNoZeroCountNodes(profile->GetRootNode());
+
heap_profiler->StopSamplingHeapProfiler();
}
}
@@ -3023,8 +3026,7 @@
heap_profiler->GetAllocationProfile());
CHECK(!profile.is_empty());
const char* names[] = {"(V8 API)"};
- auto node = FindAllocationProfileNode(
- *profile, Vector<const char*>(names, arraysize(names)));
+ auto node = FindAllocationProfileNode(*profile, ArrayVector(names));
CHECK(node);
heap_profiler->StopSamplingHeapProfiler();
diff --git a/test/cctest/test-log-stack-tracer.cc b/test/cctest/test-log-stack-tracer.cc
index 05d7103..e38d74e 100644
--- a/test/cctest/test-log-stack-tracer.cc
+++ b/test/cctest/test-log-stack-tracer.cc
@@ -36,7 +36,7 @@
#include "src/disassembler.h"
#include "src/isolate.h"
#include "src/log.h"
-#include "src/profiler/sampler.h"
+#include "src/profiler/tick-sample.h"
#include "src/vm-state-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/trace-extension.h"
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index 9c7e63b..c3856f2 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -375,9 +375,8 @@
ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry);
#endif
i::EmbeddedVector<char, 100> ref_data;
- i::SNPrintF(ref_data,
- "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"method1\"",
- reinterpret_cast<intptr_t>(ObjMethod1_entry));
+ i::SNPrintF(ref_data, "code-creation,Callback,-2,%p,1,\"method1\"",
+ ObjMethod1_entry);
CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
log.Dispose();
@@ -429,8 +428,8 @@
#endif
EmbeddedVector<char, 100> prop1_getter_record;
i::SNPrintF(prop1_getter_record,
- "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"get prop1\"",
- reinterpret_cast<intptr_t>(Prop1Getter_entry));
+ "code-creation,Callback,-2,%p,1,\"get prop1\"",
+ Prop1Getter_entry);
CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length()));
Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter);
@@ -439,8 +438,8 @@
#endif
EmbeddedVector<char, 100> prop1_setter_record;
i::SNPrintF(prop1_setter_record,
- "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"set prop1\"",
- reinterpret_cast<intptr_t>(Prop1Setter_entry));
+ "code-creation,Callback,-2,%p,1,\"set prop1\"",
+ Prop1Setter_entry);
CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length()));
Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter);
@@ -449,8 +448,8 @@
#endif
EmbeddedVector<char, 100> prop2_getter_record;
i::SNPrintF(prop2_getter_record,
- "code-creation,Callback,-2,0x%" V8PRIxPTR ",1,\"get prop2\"",
- reinterpret_cast<intptr_t>(Prop2Getter_entry));
+ "code-creation,Callback,-2,%p,1,\"get prop2\"",
+ Prop2Getter_entry);
CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length()));
log.Dispose();
}
diff --git a/test/cctest/test-macro-assembler-mips.cc b/test/cctest/test-macro-assembler-mips.cc
index 91ee215..5408061 100644
--- a/test/cctest/test-macro-assembler-mips.cc
+++ b/test/cctest/test-macro-assembler-mips.cc
@@ -390,14 +390,14 @@
}
}
-static const std::vector<uint32_t> uint32_test_values() {
+static const std::vector<uint32_t> cvt_trunc_uint32_test_values() {
static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00ffff00,
0x7fffffff, 0x80000000, 0x80000001,
0x80ffff00, 0x8fffffff, 0xffffffff};
return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
}
-static const std::vector<int32_t> int32_test_values() {
+static const std::vector<int32_t> cvt_trunc_int32_test_values() {
static const int32_t kValues[] = {
static_cast<int32_t>(0x00000000), static_cast<int32_t>(0x00000001),
static_cast<int32_t>(0x00ffff00), static_cast<int32_t>(0x7fffffff),
@@ -408,13 +408,31 @@
}
// Helper macros that can be used in FOR_INT32_INPUTS(i) { ... *i ... }
-#define FOR_INPUTS(ctype, itype, var) \
- std::vector<ctype> var##_vec = itype##_test_values(); \
+#define FOR_INPUTS(ctype, itype, var, test_vector) \
+ std::vector<ctype> var##_vec = test_vector(); \
for (std::vector<ctype>::iterator var = var##_vec.begin(); \
var != var##_vec.end(); ++var)
-#define FOR_UINT32_INPUTS(var) FOR_INPUTS(uint32_t, uint32, var)
-#define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var)
+#define FOR_INPUTS2(ctype, itype, var, var2, test_vector) \
+ std::vector<ctype> var##_vec = test_vector(); \
+ std::vector<ctype>::iterator var; \
+ std::vector<ctype>::reverse_iterator var2; \
+ for (var = var##_vec.begin(), var2 = var##_vec.rbegin(); \
+ var != var##_vec.end(); ++var, ++var2)
+
+#define FOR_ENUM_INPUTS(var, type, test_vector) \
+ FOR_INPUTS(enum type, type, var, test_vector)
+#define FOR_STRUCT_INPUTS(var, type, test_vector) \
+ FOR_INPUTS(struct type, type, var, test_vector)
+#define FOR_UINT32_INPUTS(var, test_vector) \
+ FOR_INPUTS(uint32_t, uint32, var, test_vector)
+#define FOR_INT32_INPUTS(var, test_vector) \
+ FOR_INPUTS(int32_t, int32, var, test_vector)
+#define FOR_INT32_INPUTS2(var, var2, test_vector) \
+ FOR_INPUTS2(int32_t, int32, var, var2, test_vector)
+
+#define FOR_UINT64_INPUTS(var, test_vector) \
+ FOR_INPUTS(uint64_t, uint32, var, test_vector)
template <typename RET_TYPE, typename IN_TYPE, typename Func>
RET_TYPE run_Cvt(IN_TYPE x, Func GenerateConvertInstructionFunc) {
@@ -445,7 +463,7 @@
TEST(cvt_s_w_Trunc_uw_s) {
CcTest::InitializeVM();
- FOR_UINT32_INPUTS(i) {
+ FOR_UINT32_INPUTS(i, cvt_trunc_uint32_test_values) {
uint32_t input = *i;
CHECK_EQ(static_cast<float>(input),
run_Cvt<uint32_t>(input, [](MacroAssembler* masm) {
@@ -457,7 +475,7 @@
TEST(cvt_d_w_Trunc_w_d) {
CcTest::InitializeVM();
- FOR_INT32_INPUTS(i) {
+ FOR_INT32_INPUTS(i, cvt_trunc_int32_test_values) {
int32_t input = *i;
CHECK_EQ(static_cast<double>(input),
run_Cvt<int32_t>(input, [](MacroAssembler* masm) {
@@ -467,6 +485,342 @@
}
}
+static const std::vector<int32_t> overflow_int32_test_values() {
+ static const int32_t kValues[] = {
+ static_cast<int32_t>(0xf0000000), static_cast<int32_t>(0x00000001),
+ static_cast<int32_t>(0xff000000), static_cast<int32_t>(0x0000f000),
+ static_cast<int32_t>(0x0f000000), static_cast<int32_t>(0x991234ab),
+ static_cast<int32_t>(0xb0ffff01), static_cast<int32_t>(0x00006fff),
+ static_cast<int32_t>(0xffffffff)};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+enum OverflowBranchType {
+ kAddBranchOverflow,
+ kSubBranchOverflow,
+};
+
+struct OverflowRegisterCombination {
+ Register dst;
+ Register left;
+ Register right;
+ Register scratch;
+};
+
+static const std::vector<enum OverflowBranchType> overflow_branch_type() {
+ static const enum OverflowBranchType kValues[] = {kAddBranchOverflow,
+ kSubBranchOverflow};
+ return std::vector<enum OverflowBranchType>(&kValues[0],
+ &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<struct OverflowRegisterCombination>
+overflow_register_combination() {
+ static const struct OverflowRegisterCombination kValues[] = {
+ {t0, t1, t2, t3}, {t0, t0, t2, t3}, {t0, t1, t0, t3}, {t0, t1, t1, t3}};
+ return std::vector<struct OverflowRegisterCombination>(
+ &kValues[0], &kValues[arraysize(kValues)]);
+}
+
+template <typename T>
+static bool IsAddOverflow(T x, T y) {
+ DCHECK(std::numeric_limits<T>::is_integer);
+ T max = std::numeric_limits<T>::max();
+ T min = std::numeric_limits<T>::min();
+
+ return (x > 0 && y > (max - x)) || (x < 0 && y < (min - x));
+}
+
+template <typename T>
+static bool IsSubOverflow(T x, T y) {
+ DCHECK(std::numeric_limits<T>::is_integer);
+ T max = std::numeric_limits<T>::max();
+ T min = std::numeric_limits<T>::min();
+
+ return (y > 0 && x < (min + y)) || (y < 0 && x > (max + y));
+}
+
+template <typename IN_TYPE, typename Func>
+static bool runOverflow(IN_TYPE valLeft, IN_TYPE valRight,
+ Func GenerateOverflowInstructions) {
+ typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ MacroAssembler assm(isolate, nullptr, 0,
+ v8::internal::CodeObjectRequired::kYes);
+ MacroAssembler* masm = &assm;
+
+ GenerateOverflowInstructions(masm, valLeft, valRight);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+
+ int32_t r =
+ reinterpret_cast<int32_t>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+
+ DCHECK(r == 0 || r == 1);
+ return r;
+}
+
+TEST(BranchOverflowInt32BothLabels) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt32LeftLabel) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt32RightLabel) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
TEST(min_max_nan) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@@ -577,4 +931,241 @@
}
}
+template <typename IN_TYPE, typename Func>
+bool run_Unaligned(char* memory_buffer, int32_t in_offset, int32_t out_offset,
+ IN_TYPE value, Func GenerateUnalignedInstructionFunc) {
+ typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ MacroAssembler assm(isolate, nullptr, 0,
+ v8::internal::CodeObjectRequired::kYes);
+ MacroAssembler* masm = &assm;
+ IN_TYPE res;
+
+ GenerateUnalignedInstructionFunc(masm, in_offset, out_offset);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+
+ MemCopy(memory_buffer + in_offset, &value, sizeof(IN_TYPE));
+ CALL_GENERATED_CODE(isolate, f, memory_buffer, 0, 0, 0, 0);
+ MemCopy(&res, memory_buffer + out_offset, sizeof(IN_TYPE));
+
+ return res == value;
+}
+
+static const std::vector<uint64_t> unsigned_test_values() {
+ static const uint64_t kValues[] = {
+ 0x2180f18a06384414, 0x000a714532102277, 0xbc1acccf180649f0,
+ 0x8000000080008000, 0x0000000000000001, 0xffffffffffffffff,
+ };
+ return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<int32_t> unsigned_test_offset() {
+ static const int32_t kValues[] = {// value, offset
+ -132 * KB, -21 * KB, 0, 19 * KB, 135 * KB};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<int32_t> unsigned_test_offset_increment() {
+ static const int32_t kValues[] = {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+TEST(Ulh) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint16_t value = static_cast<uint64_t>(*i & 0xFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulh(v0, MemOperand(a0, in_offset));
+ __ Ush(v0, MemOperand(a0, out_offset), v0);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulh(a0, MemOperand(a0, in_offset));
+ __ Ush(a0, MemOperand(t0, out_offset), v0);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulhu(a0, MemOperand(a0, in_offset));
+ __ Ush(a0, MemOperand(t0, out_offset), t1);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulhu(v0, MemOperand(a0, in_offset));
+ __ Ush(v0, MemOperand(a0, out_offset), t1);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulh_bitextension) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint16_t value = static_cast<uint64_t>(*i & 0xFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ Label success, fail, end, different;
+ __ Ulh(t0, MemOperand(a0, in_offset));
+ __ Ulhu(t1, MemOperand(a0, in_offset));
+ __ Branch(&different, ne, t0, Operand(t1));
+
+ // If signed and unsigned values are same, check
+ // the upper bits to see if they are zero
+ __ sra(t0, t0, 15);
+ __ Branch(&success, eq, t0, Operand(zero_reg));
+ __ Branch(&fail);
+
+ // If signed and unsigned values are different,
+ // check that the upper bits are complementary
+ __ bind(&different);
+ __ sra(t1, t1, 15);
+ __ Branch(&fail, ne, t1, Operand(1));
+ __ sra(t0, t0, 15);
+ __ addiu(t0, t0, 1);
+ __ Branch(&fail, ne, t0, Operand(zero_reg));
+ // Fall through to success
+
+ __ bind(&success);
+ __ Ulh(t0, MemOperand(a0, in_offset));
+ __ Ush(t0, MemOperand(a0, out_offset), v0);
+ __ Branch(&end);
+ __ bind(&fail);
+ __ Ush(zero_reg, MemOperand(a0, out_offset), v0);
+ __ bind(&end);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulw) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint32_t value = static_cast<uint32_t>(*i & 0xFFFFFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulw(v0, MemOperand(a0, in_offset));
+ __ Usw(v0, MemOperand(a0, out_offset));
+ }));
+ CHECK_EQ(true,
+ run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, (uint32_t)value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulw(a0, MemOperand(a0, in_offset));
+ __ Usw(a0, MemOperand(t0, out_offset));
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulwc1) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ float value = static_cast<float>(*i & 0xFFFFFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<float>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulwc1(f0, MemOperand(a0, in_offset), t0);
+ __ Uswc1(f0, MemOperand(a0, out_offset), t0);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Uldc1) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ double value = static_cast<double>(*i);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<double>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Uldc1(f0, MemOperand(a0, in_offset), t0);
+ __ Usdc1(f0, MemOperand(a0, out_offset), t0);
+ }));
+ }
+ }
+ }
+}
+
#undef __
diff --git a/test/cctest/test-macro-assembler-mips64.cc b/test/cctest/test-macro-assembler-mips64.cc
index e251242..f0180c1 100644
--- a/test/cctest/test-macro-assembler-mips64.cc
+++ b/test/cctest/test-macro-assembler-mips64.cc
@@ -523,14 +523,14 @@
}
}
-static const std::vector<uint32_t> uint32_test_values() {
+static const std::vector<uint32_t> cvt_trunc_uint32_test_values() {
static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00ffff00,
0x7fffffff, 0x80000000, 0x80000001,
0x80ffff00, 0x8fffffff, 0xffffffff};
return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
}
-static const std::vector<int32_t> int32_test_values() {
+static const std::vector<int32_t> cvt_trunc_int32_test_values() {
static const int32_t kValues[] = {
static_cast<int32_t>(0x00000000), static_cast<int32_t>(0x00000001),
static_cast<int32_t>(0x00ffff00), static_cast<int32_t>(0x7fffffff),
@@ -540,7 +540,7 @@
return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
}
-static const std::vector<uint64_t> uint64_test_values() {
+static const std::vector<uint64_t> cvt_trunc_uint64_test_values() {
static const uint64_t kValues[] = {
0x0000000000000000, 0x0000000000000001, 0x0000ffffffff0000,
0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000001,
@@ -548,7 +548,7 @@
return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
}
-static const std::vector<int64_t> int64_test_values() {
+static const std::vector<int64_t> cvt_trunc_int64_test_values() {
static const int64_t kValues[] = {static_cast<int64_t>(0x0000000000000000),
static_cast<int64_t>(0x0000000000000001),
static_cast<int64_t>(0x0000ffffffff0000),
@@ -562,15 +562,32 @@
}
// Helper macros that can be used in FOR_INT32_INPUTS(i) { ... *i ... }
-#define FOR_INPUTS(ctype, itype, var) \
- std::vector<ctype> var##_vec = itype##_test_values(); \
+#define FOR_INPUTS(ctype, itype, var, test_vector) \
+ std::vector<ctype> var##_vec = test_vector(); \
for (std::vector<ctype>::iterator var = var##_vec.begin(); \
var != var##_vec.end(); ++var)
-#define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var)
-#define FOR_INT64_INPUTS(var) FOR_INPUTS(int64_t, int64, var)
-#define FOR_UINT32_INPUTS(var) FOR_INPUTS(uint32_t, uint32, var)
-#define FOR_UINT64_INPUTS(var) FOR_INPUTS(uint64_t, uint64, var)
+#define FOR_INPUTS2(ctype, itype, var, var2, test_vector) \
+ std::vector<ctype> var##_vec = test_vector(); \
+ std::vector<ctype>::iterator var; \
+ std::vector<ctype>::reverse_iterator var2; \
+ for (var = var##_vec.begin(), var2 = var##_vec.rbegin(); \
+ var != var##_vec.end(); ++var, ++var2)
+
+#define FOR_ENUM_INPUTS(var, type, test_vector) \
+ FOR_INPUTS(enum type, type, var, test_vector)
+#define FOR_STRUCT_INPUTS(var, type, test_vector) \
+ FOR_INPUTS(struct type, type, var, test_vector)
+#define FOR_INT32_INPUTS(var, test_vector) \
+ FOR_INPUTS(int32_t, int32, var, test_vector)
+#define FOR_INT32_INPUTS2(var, var2, test_vector) \
+ FOR_INPUTS2(int32_t, int32, var, var2, test_vector)
+#define FOR_INT64_INPUTS(var, test_vector) \
+ FOR_INPUTS(int64_t, int64, var, test_vector)
+#define FOR_UINT32_INPUTS(var, test_vector) \
+ FOR_INPUTS(uint32_t, uint32, var, test_vector)
+#define FOR_UINT64_INPUTS(var, test_vector) \
+ FOR_INPUTS(uint64_t, uint64, var, test_vector)
template <typename RET_TYPE, typename IN_TYPE, typename Func>
RET_TYPE run_Cvt(IN_TYPE x, Func GenerateConvertInstructionFunc) {
@@ -600,7 +617,7 @@
TEST(Cvt_s_uw_Trunc_uw_s) {
CcTest::InitializeVM();
- FOR_UINT32_INPUTS(i) {
+ FOR_UINT32_INPUTS(i, cvt_trunc_uint32_test_values) {
uint32_t input = *i;
CHECK_EQ(static_cast<float>(input),
run_Cvt<uint64_t>(input, [](MacroAssembler* masm) {
@@ -613,7 +630,7 @@
TEST(Cvt_s_ul_Trunc_ul_s) {
CcTest::InitializeVM();
- FOR_UINT64_INPUTS(i) {
+ FOR_UINT64_INPUTS(i, cvt_trunc_uint64_test_values) {
uint64_t input = *i;
CHECK_EQ(static_cast<float>(input),
run_Cvt<uint64_t>(input, [](MacroAssembler* masm) {
@@ -625,7 +642,7 @@
TEST(Cvt_d_ul_Trunc_ul_d) {
CcTest::InitializeVM();
- FOR_UINT64_INPUTS(i) {
+ FOR_UINT64_INPUTS(i, cvt_trunc_uint64_test_values) {
uint64_t input = *i;
CHECK_EQ(static_cast<double>(input),
run_Cvt<uint64_t>(input, [](MacroAssembler* masm) {
@@ -637,7 +654,7 @@
TEST(cvt_d_l_Trunc_l_d) {
CcTest::InitializeVM();
- FOR_INT64_INPUTS(i) {
+ FOR_INT64_INPUTS(i, cvt_trunc_int64_test_values) {
int64_t input = *i;
CHECK_EQ(static_cast<double>(input),
run_Cvt<int64_t>(input, [](MacroAssembler* masm) {
@@ -650,7 +667,7 @@
TEST(cvt_d_l_Trunc_l_ud) {
CcTest::InitializeVM();
- FOR_INT64_INPUTS(i) {
+ FOR_INT64_INPUTS(i, cvt_trunc_int64_test_values) {
int64_t input = *i;
uint64_t abs_input = (input < 0) ? -input : input;
CHECK_EQ(static_cast<double>(abs_input),
@@ -664,7 +681,7 @@
TEST(cvt_d_w_Trunc_w_d) {
CcTest::InitializeVM();
- FOR_INT32_INPUTS(i) {
+ FOR_INT32_INPUTS(i, cvt_trunc_int32_test_values) {
int32_t input = *i;
CHECK_EQ(static_cast<double>(input),
run_Cvt<int64_t>(input, [](MacroAssembler* masm) {
@@ -677,6 +694,607 @@
}
}
+static const std::vector<int32_t> overflow_int32_test_values() {
+ static const int32_t kValues[] = {
+ static_cast<int32_t>(0xf0000000), static_cast<int32_t>(0x00000001),
+ static_cast<int32_t>(0xff000000), static_cast<int32_t>(0x0000f000),
+ static_cast<int32_t>(0x0f000000), static_cast<int32_t>(0x991234ab),
+ static_cast<int32_t>(0xb0ffff01), static_cast<int32_t>(0x00006fff),
+ static_cast<int32_t>(0xffffffff)};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<int64_t> overflow_int64_test_values() {
+ static const int64_t kValues[] = {static_cast<int64_t>(0xf000000000000000),
+ static_cast<int64_t>(0x0000000000000001),
+ static_cast<int64_t>(0xff00000000000000),
+ static_cast<int64_t>(0x0000f00111111110),
+ static_cast<int64_t>(0x0f00001000000000),
+ static_cast<int64_t>(0x991234ab12a96731),
+ static_cast<int64_t>(0xb0ffff0f0f0f0f01),
+ static_cast<int64_t>(0x00006fffffffffff),
+ static_cast<int64_t>(0xffffffffffffffff)};
+ return std::vector<int64_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+enum OverflowBranchType {
+ kAddBranchOverflow,
+ kSubBranchOverflow,
+};
+
+struct OverflowRegisterCombination {
+ Register dst;
+ Register left;
+ Register right;
+ Register scratch;
+};
+
+static const std::vector<enum OverflowBranchType> overflow_branch_type() {
+ static const enum OverflowBranchType kValues[] = {kAddBranchOverflow,
+ kSubBranchOverflow};
+ return std::vector<enum OverflowBranchType>(&kValues[0],
+ &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<struct OverflowRegisterCombination>
+overflow_register_combination() {
+ static const struct OverflowRegisterCombination kValues[] = {
+ {t0, t1, t2, t3}, {t0, t0, t2, t3}, {t0, t1, t0, t3}, {t0, t1, t1, t3}};
+ return std::vector<struct OverflowRegisterCombination>(
+ &kValues[0], &kValues[arraysize(kValues)]);
+}
+
+template <typename T>
+static bool IsAddOverflow(T x, T y) {
+ DCHECK(std::numeric_limits<T>::is_integer);
+ T max = std::numeric_limits<T>::max();
+ T min = std::numeric_limits<T>::min();
+
+ return (x > 0 && y > (max - x)) || (x < 0 && y < (min - x));
+}
+
+template <typename T>
+static bool IsSubOverflow(T x, T y) {
+ DCHECK(std::numeric_limits<T>::is_integer);
+ T max = std::numeric_limits<T>::max();
+ T min = std::numeric_limits<T>::min();
+
+ return (y > 0 && x < (min + y)) || (y < 0 && x > (max + y));
+}
+
+template <typename IN_TYPE, typename Func>
+static bool runOverflow(IN_TYPE valLeft, IN_TYPE valRight,
+ Func GenerateOverflowInstructions) {
+ typedef int64_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ MacroAssembler assm(isolate, nullptr, 0,
+ v8::internal::CodeObjectRequired::kYes);
+ MacroAssembler* masm = &assm;
+
+ GenerateOverflowInstructions(masm, valLeft, valRight);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+
+ int64_t r =
+ reinterpret_cast<int64_t>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+
+ DCHECK(r == 0 || r == 1);
+ return r;
+}
+
+TEST(BranchOverflowInt32BothLabels) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt32LeftLabel) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt32RightLabel) {
+ FOR_INT32_INPUTS(i, overflow_int32_test_values) {
+ FOR_INT32_INPUTS(j, overflow_int32_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int32_t ii = *i;
+ int32_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int32_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int32_t valLeft,
+ int32_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ AddBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ SubBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int32_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int32_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt64BothLabels) {
+ FOR_INT64_INPUTS(i, overflow_int64_test_values) {
+ FOR_INT64_INPUTS(j, overflow_int64_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int64_t ii = *i;
+ int64_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label overflow, no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 2);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt64LeftLabel) {
+ FOR_INT64_INPUTS(i, overflow_int64_test_values) {
+ FOR_INT64_INPUTS(j, overflow_int64_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int64_t ii = *i;
+ int64_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
+ rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight),
+ &overflow, NULL, rc.scratch);
+ break;
+ }
+ __ li(v0, 0);
+ __ Branch(&end);
+ __ bind(&overflow);
+ __ li(v0, 1);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
+TEST(BranchOverflowInt64RightLabel) {
+ FOR_INT64_INPUTS(i, overflow_int64_test_values) {
+ FOR_INT64_INPUTS(j, overflow_int64_test_values) {
+ FOR_ENUM_INPUTS(br, OverflowBranchType, overflow_branch_type) {
+ FOR_STRUCT_INPUTS(regComb, OverflowRegisterCombination,
+ overflow_register_combination) {
+ int64_t ii = *i;
+ int64_t jj = *j;
+ enum OverflowBranchType branchType = *br;
+ struct OverflowRegisterCombination rc = *regComb;
+
+ // If left and right register are same then left and right
+ // test values must also be same, otherwise we skip the test
+ if (rc.left.code() == rc.right.code()) {
+ if (ii != jj) {
+ continue;
+ }
+ }
+
+ bool res1 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ __ li(rc.right, valRight);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, rc.right, NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ bool res2 = runOverflow<int64_t>(
+ ii, jj, [branchType, rc](MacroAssembler* masm, int64_t valLeft,
+ int64_t valRight) {
+ Label no_overflow, end;
+ __ li(rc.left, valLeft);
+ switch (branchType) {
+ case kAddBranchOverflow:
+ __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ case kSubBranchOverflow:
+ __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+ &no_overflow, rc.scratch);
+ break;
+ }
+ __ li(v0, 1);
+ __ Branch(&end);
+ __ bind(&no_overflow);
+ __ li(v0, 0);
+ __ bind(&end);
+ });
+
+ switch (branchType) {
+ case kAddBranchOverflow:
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsAddOverflow<int64_t>(ii, jj), res2);
+ break;
+ case kSubBranchOverflow:
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res1);
+ CHECK_EQ(IsSubOverflow<int64_t>(ii, jj), res2);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ }
+ }
+}
+
TEST(min_max_nan) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@@ -787,4 +1405,344 @@
}
}
+template <typename IN_TYPE, typename Func>
+bool run_Unaligned(char* memory_buffer, int32_t in_offset, int32_t out_offset,
+ IN_TYPE value, Func GenerateUnalignedInstructionFunc) {
+ typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ MacroAssembler assm(isolate, nullptr, 0,
+ v8::internal::CodeObjectRequired::kYes);
+ MacroAssembler* masm = &assm;
+ IN_TYPE res;
+
+ GenerateUnalignedInstructionFunc(masm, in_offset, out_offset);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+
+ MemCopy(memory_buffer + in_offset, &value, sizeof(IN_TYPE));
+ CALL_GENERATED_CODE(isolate, f, memory_buffer, 0, 0, 0, 0);
+ MemCopy(&res, memory_buffer + out_offset, sizeof(IN_TYPE));
+
+ return res == value;
+}
+
+static const std::vector<uint64_t> unsigned_test_values() {
+ static const uint64_t kValues[] = {
+ 0x2180f18a06384414, 0x000a714532102277, 0xbc1acccf180649f0,
+ 0x8000000080008000, 0x0000000000000001, 0xffffffffffffffff,
+ };
+ return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<int32_t> unsigned_test_offset() {
+ static const int32_t kValues[] = {// value, offset
+ -132 * KB, -21 * KB, 0, 19 * KB, 135 * KB};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+static const std::vector<int32_t> unsigned_test_offset_increment() {
+ static const int32_t kValues[] = {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5};
+ return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+}
+
+TEST(Ulh) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint16_t value = static_cast<uint64_t>(*i & 0xFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulh(v0, MemOperand(a0, in_offset));
+ __ Ush(v0, MemOperand(a0, out_offset), v0);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulh(a0, MemOperand(a0, in_offset));
+ __ Ush(a0, MemOperand(t0, out_offset), v0);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulhu(a0, MemOperand(a0, in_offset));
+ __ Ush(a0, MemOperand(t0, out_offset), t1);
+ }));
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulhu(v0, MemOperand(a0, in_offset));
+ __ Ush(v0, MemOperand(a0, out_offset), t1);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulh_bitextension) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint16_t value = static_cast<uint64_t>(*i & 0xFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint16_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ Label success, fail, end, different;
+ __ Ulh(t0, MemOperand(a0, in_offset));
+ __ Ulhu(t1, MemOperand(a0, in_offset));
+ __ Branch(&different, ne, t0, Operand(t1));
+
+ // If signed and unsigned values are same, check
+ // the upper bits to see if they are zero
+ __ sra(t0, t0, 15);
+ __ Branch(&success, eq, t0, Operand(zero_reg));
+ __ Branch(&fail);
+
+ // If signed and unsigned values are different,
+ // check that the upper bits are complementary
+ __ bind(&different);
+ __ sra(t1, t1, 15);
+ __ Branch(&fail, ne, t1, Operand(1));
+ __ sra(t0, t0, 15);
+ __ addiu(t0, t0, 1);
+ __ Branch(&fail, ne, t0, Operand(zero_reg));
+ // Fall through to success
+
+ __ bind(&success);
+ __ Ulh(t0, MemOperand(a0, in_offset));
+ __ Ush(t0, MemOperand(a0, out_offset), v0);
+ __ Branch(&end);
+ __ bind(&fail);
+ __ Ush(zero_reg, MemOperand(a0, out_offset), v0);
+ __ bind(&end);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulw) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint32_t value = static_cast<uint32_t>(*i & 0xFFFFFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulw(v0, MemOperand(a0, in_offset));
+ __ Usw(v0, MemOperand(a0, out_offset));
+ }));
+ CHECK_EQ(true,
+ run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, (uint32_t)value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulw(a0, MemOperand(a0, in_offset));
+ __ Usw(a0, MemOperand(t0, out_offset));
+ }));
+ CHECK_EQ(true, run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulwu(v0, MemOperand(a0, in_offset));
+ __ Usw(v0, MemOperand(a0, out_offset));
+ }));
+ CHECK_EQ(true,
+ run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, (uint32_t)value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Ulwu(a0, MemOperand(a0, in_offset));
+ __ Usw(a0, MemOperand(t0, out_offset));
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulw_extension) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint32_t value = static_cast<uint32_t>(*i & 0xFFFFFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint32_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ Label success, fail, end, different;
+ __ Ulw(t0, MemOperand(a0, in_offset));
+ __ Ulwu(t1, MemOperand(a0, in_offset));
+ __ Branch(&different, ne, t0, Operand(t1));
+
+ // If signed and unsigned values are same, check
+ // the upper bits to see if they are zero
+ __ dsra(t0, t0, 31);
+ __ Branch(&success, eq, t0, Operand(zero_reg));
+ __ Branch(&fail);
+
+ // If signed and unsigned values are different,
+ // check that the upper bits are complementary
+ __ bind(&different);
+ __ dsra(t1, t1, 31);
+ __ Branch(&fail, ne, t1, Operand(1));
+ __ dsra(t0, t0, 31);
+ __ daddiu(t0, t0, 1);
+ __ Branch(&fail, ne, t0, Operand(zero_reg));
+ // Fall through to success
+
+ __ bind(&success);
+ __ Ulw(t0, MemOperand(a0, in_offset));
+ __ Usw(t0, MemOperand(a0, out_offset));
+ __ Branch(&end);
+ __ bind(&fail);
+ __ Usw(zero_reg, MemOperand(a0, out_offset));
+ __ bind(&end);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Uld) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ uint64_t value = *i;
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<uint64_t>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Uld(v0, MemOperand(a0, in_offset));
+ __ Usd(v0, MemOperand(a0, out_offset));
+ }));
+ CHECK_EQ(true,
+ run_Unaligned<uint64_t>(
+ buffer_middle, in_offset, out_offset, (uint32_t)value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ mov(t0, a0);
+ __ Uld(a0, MemOperand(a0, in_offset));
+ __ Usd(a0, MemOperand(t0, out_offset));
+ }));
+ }
+ }
+ }
+}
+
+TEST(Ulwc1) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ float value = static_cast<float>(*i & 0xFFFFFFFF);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<float>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Ulwc1(f0, MemOperand(a0, in_offset), t0);
+ __ Uswc1(f0, MemOperand(a0, out_offset), t0);
+ }));
+ }
+ }
+ }
+}
+
+TEST(Uldc1) {
+ CcTest::InitializeVM();
+
+ static const int kBufferSize = 300 * KB;
+ char memory_buffer[kBufferSize];
+ char* buffer_middle = memory_buffer + (kBufferSize / 2);
+
+ FOR_UINT64_INPUTS(i, unsigned_test_values) {
+ FOR_INT32_INPUTS2(j1, j2, unsigned_test_offset) {
+ FOR_INT32_INPUTS2(k1, k2, unsigned_test_offset_increment) {
+ double value = static_cast<double>(*i);
+ int32_t in_offset = *j1 + *k1;
+ int32_t out_offset = *j2 + *k2;
+
+ CHECK_EQ(true, run_Unaligned<double>(
+ buffer_middle, in_offset, out_offset, value,
+ [](MacroAssembler* masm, int32_t in_offset,
+ int32_t out_offset) {
+ __ Uldc1(f0, MemOperand(a0, in_offset), t0);
+ __ Usdc1(f0, MemOperand(a0, out_offset), t0);
+ }));
+ }
+ }
+ }
+}
+
#undef __
diff --git a/test/cctest/test-microtask-delivery.cc b/test/cctest/test-microtask-delivery.cc
deleted file mode 100644
index 3150ab8..0000000
--- a/test/cctest/test-microtask-delivery.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include "src/v8.h"
-
-#include "test/cctest/cctest.h"
-
-namespace i = v8::internal;
-
-namespace {
-class HarmonyIsolate {
- public:
- HarmonyIsolate() {
- v8::Isolate::CreateParams create_params;
- create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
- isolate_ = v8::Isolate::New(create_params);
- isolate_->Enter();
- }
-
- ~HarmonyIsolate() {
- isolate_->Exit();
- isolate_->Dispose();
- }
-
- v8::Isolate* GetIsolate() const { return isolate_; }
-
- private:
- v8::Isolate* isolate_;
-};
-} // namespace
-
-
-TEST(MicrotaskDeliverySimple) {
- i::FLAG_harmony_object_observe = true;
- HarmonyIsolate isolate;
- v8::HandleScope scope(isolate.GetIsolate());
- LocalContext context(isolate.GetIsolate());
- CompileRun(
- "var ordering = [];"
- "var resolver = {};"
- "function handler(resolve) { resolver.resolve = resolve; }"
- "var obj = {};"
- "var observeOrders = [1, 4];"
- "function observer() {"
- "ordering.push(observeOrders.shift());"
- "resolver.resolve();"
- "}"
- "var p = new Promise(handler);"
- "p.then(function() {"
- "ordering.push(2);"
- "}).then(function() {"
- "ordering.push(3);"
- "obj.id++;"
- "return new Promise(handler);"
- "}).then(function() {"
- "ordering.push(5);"
- "}).then(function() {"
- "ordering.push(6);"
- "});"
- "Object.observe(obj, observer);"
- "obj.id = 1;");
- CHECK_EQ(
- 6, CompileRun("ordering.length")->Int32Value(context.local()).FromJust());
- CHECK_EQ(1,
- CompileRun("ordering[0]")->Int32Value(context.local()).FromJust());
- CHECK_EQ(2,
- CompileRun("ordering[1]")->Int32Value(context.local()).FromJust());
- CHECK_EQ(3,
- CompileRun("ordering[2]")->Int32Value(context.local()).FromJust());
- CHECK_EQ(4,
- CompileRun("ordering[3]")->Int32Value(context.local()).FromJust());
- CHECK_EQ(5,
- CompileRun("ordering[4]")->Int32Value(context.local()).FromJust());
- CHECK_EQ(6,
- CompileRun("ordering[5]")->Int32Value(context.local()).FromJust());
-}
-
-
-TEST(MicrotaskPerIsolateState) {
- i::FLAG_harmony_object_observe = true;
- HarmonyIsolate isolate;
- v8::HandleScope scope(isolate.GetIsolate());
- LocalContext context1(isolate.GetIsolate());
- isolate.GetIsolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit);
- CompileRun(
- "var obj = { calls: 0 };");
- v8::Local<v8::Value> obj = CompileRun("obj");
- {
- LocalContext context2(isolate.GetIsolate());
- context2->Global()
- ->Set(context2.local(),
- v8::String::NewFromUtf8(isolate.GetIsolate(), "obj",
- v8::NewStringType::kNormal)
- .ToLocalChecked(),
- obj)
- .FromJust();
- CompileRun(
- "var resolver = {};"
- "new Promise(function(resolve) {"
- "resolver.resolve = resolve;"
- "}).then(function() {"
- "obj.calls++;"
- "});"
- "(function() {"
- "resolver.resolve();"
- "})();");
- }
- {
- LocalContext context3(isolate.GetIsolate());
- context3->Global()
- ->Set(context3.local(),
- v8::String::NewFromUtf8(isolate.GetIsolate(), "obj",
- v8::NewStringType::kNormal)
- .ToLocalChecked(),
- obj)
- .FromJust();
- CompileRun(
- "var foo = { id: 1 };"
- "Object.observe(foo, function() {"
- "obj.calls++;"
- "});"
- "foo.id++;");
- }
- {
- LocalContext context4(isolate.GetIsolate());
- context4->Global()
- ->Set(context4.local(),
- v8::String::NewFromUtf8(isolate.GetIsolate(), "obj",
- v8::NewStringType::kNormal)
- .ToLocalChecked(),
- obj)
- .FromJust();
- isolate.GetIsolate()->RunMicrotasks();
- CHECK_EQ(2,
- CompileRun("obj.calls")->Int32Value(context4.local()).FromJust());
- }
-}
diff --git a/test/cctest/test-object-observe.cc b/test/cctest/test-object-observe.cc
deleted file mode 100644
index f17b8c0..0000000
--- a/test/cctest/test-object-observe.cc
+++ /dev/null
@@ -1,1078 +0,0 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include "src/v8.h"
-
-#include "test/cctest/cctest.h"
-
-using namespace v8;
-namespace i = v8::internal;
-
-inline int32_t ToInt32(v8::Local<v8::Value> value) {
- return value->Int32Value(v8::Isolate::GetCurrent()->GetCurrentContext())
- .FromJust();
-}
-
-
-TEST(PerIsolateState) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context1(CcTest::isolate());
-
- Local<Value> foo = v8_str("foo");
- context1->SetSecurityToken(foo);
-
- CompileRun(
- "var count = 0;"
- "var calls = 0;"
- "var observer = function(records) { count = records.length; calls++ };"
- "var obj = {};"
- "Object.observe(obj, observer);");
- Local<Value> observer = CompileRun("observer");
- Local<Value> obj = CompileRun("obj");
- Local<Value> notify_fun1 = CompileRun("(function() { obj.foo = 'bar'; })");
- Local<Value> notify_fun2;
- {
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(foo);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- obj)
- .FromJust();
- notify_fun2 = CompileRun(
- "(function() { obj.foo = 'baz'; })");
- }
- Local<Value> notify_fun3;
- {
- LocalContext context3(CcTest::isolate());
- context3->SetSecurityToken(foo);
- context3->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- obj)
- .FromJust();
- notify_fun3 = CompileRun("(function() { obj.foo = 'bat'; })");
- }
- {
- LocalContext context4(CcTest::isolate());
- context4->SetSecurityToken(foo);
- context4->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("observer"), observer)
- .FromJust();
- context4->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("fun1"),
- notify_fun1)
- .FromJust();
- context4->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("fun2"),
- notify_fun2)
- .FromJust();
- context4->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("fun3"),
- notify_fun3)
- .FromJust();
- CompileRun("fun1(); fun2(); fun3(); Object.deliverChangeRecords(observer)");
- }
- CHECK_EQ(1, ToInt32(CompileRun("calls")));
- CHECK_EQ(3, ToInt32(CompileRun("count")));
-}
-
-
-TEST(EndOfMicrotaskDelivery) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "var count = 0;"
- "var observer = function(records) { count = records.length };"
- "Object.observe(obj, observer);"
- "obj.foo = 'bar';");
- CHECK_EQ(1, ToInt32(CompileRun("count")));
-}
-
-
-TEST(DeliveryOrdering) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj1 = {};"
- "var obj2 = {};"
- "var ordering = [];"
- "function observer2() { ordering.push(2); };"
- "function observer1() { ordering.push(1); };"
- "function observer3() { ordering.push(3); };"
- "Object.observe(obj1, observer1);"
- "Object.observe(obj1, observer2);"
- "Object.observe(obj1, observer3);"
- "obj1.foo = 'bar';");
- CHECK_EQ(3, ToInt32(CompileRun("ordering.length")));
- CHECK_EQ(1, ToInt32(CompileRun("ordering[0]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[1]")));
- CHECK_EQ(3, ToInt32(CompileRun("ordering[2]")));
- CompileRun(
- "ordering = [];"
- "Object.observe(obj2, observer3);"
- "Object.observe(obj2, observer2);"
- "Object.observe(obj2, observer1);"
- "obj2.foo = 'baz'");
- CHECK_EQ(3, ToInt32(CompileRun("ordering.length")));
- CHECK_EQ(1, ToInt32(CompileRun("ordering[0]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[1]")));
- CHECK_EQ(3, ToInt32(CompileRun("ordering[2]")));
-}
-
-
-TEST(DeliveryCallbackThrows) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "var ordering = [];"
- "function observer1() { ordering.push(1); };"
- "function observer2() { ordering.push(2); };"
- "function observer_throws() {"
- " ordering.push(0);"
- " throw new Error();"
- " ordering.push(-1);"
- "};"
- "Object.observe(obj, observer_throws.bind());"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, observer_throws.bind());"
- "Object.observe(obj, observer2);"
- "Object.observe(obj, observer_throws.bind());"
- "obj.foo = 'bar';");
- CHECK_EQ(5, ToInt32(CompileRun("ordering.length")));
- CHECK_EQ(0, ToInt32(CompileRun("ordering[0]")));
- CHECK_EQ(1, ToInt32(CompileRun("ordering[1]")));
- CHECK_EQ(0, ToInt32(CompileRun("ordering[2]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[3]")));
- CHECK_EQ(0, ToInt32(CompileRun("ordering[4]")));
-}
-
-
-TEST(DeliveryChangesMutationInCallback) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "var ordering = [];"
- "function observer1(records) {"
- " ordering.push(100 + records.length);"
- " records.push(11);"
- " records.push(22);"
- "};"
- "function observer2(records) {"
- " ordering.push(200 + records.length);"
- " records.push(33);"
- " records.push(44);"
- "};"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, observer2);"
- "obj.foo = 'bar';");
- CHECK_EQ(2, ToInt32(CompileRun("ordering.length")));
- CHECK_EQ(101, ToInt32(CompileRun("ordering[0]")));
- CHECK_EQ(201, ToInt32(CompileRun("ordering[1]")));
-}
-
-
-TEST(DeliveryOrderingReentrant) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "var reentered = false;"
- "var ordering = [];"
- "function observer1() { ordering.push(1); };"
- "function observer2() {"
- " if (!reentered) {"
- " obj.foo = 'baz';"
- " reentered = true;"
- " }"
- " ordering.push(2);"
- "};"
- "function observer3() { ordering.push(3); };"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, observer2);"
- "Object.observe(obj, observer3);"
- "obj.foo = 'bar';");
- CHECK_EQ(5, ToInt32(CompileRun("ordering.length")));
- CHECK_EQ(1, ToInt32(CompileRun("ordering[0]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[1]")));
- CHECK_EQ(3, ToInt32(CompileRun("ordering[2]")));
- // Note that we re-deliver to observers 1 and 2, while observer3
- // already received the second record during the first round.
- CHECK_EQ(1, ToInt32(CompileRun("ordering[3]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[1]")));
-}
-
-
-TEST(DeliveryOrderingDeliverChangeRecords) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "var ordering = [];"
- "function observer1() { ordering.push(1); if (!obj.b) obj.b = true };"
- "function observer2() { ordering.push(2); };"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, observer2);"
- "obj.a = 1;"
- "Object.deliverChangeRecords(observer2);");
- CHECK_EQ(4, ToInt32(CompileRun("ordering.length")));
- // First, observer2 is called due to deliverChangeRecords
- CHECK_EQ(2, ToInt32(CompileRun("ordering[0]")));
- // Then, observer1 is called when the stack unwinds
- CHECK_EQ(1, ToInt32(CompileRun("ordering[1]")));
- // observer1's mutation causes both 1 and 2 to be reactivated,
- // with 1 having priority.
- CHECK_EQ(1, ToInt32(CompileRun("ordering[2]")));
- CHECK_EQ(2, ToInt32(CompileRun("ordering[3]")));
-}
-
-
-TEST(ObjectHashTableGrowth) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- // Initializing this context sets up initial hash tables.
- LocalContext context(CcTest::isolate());
- Local<Value> obj = CompileRun("obj = {};");
- Local<Value> observer = CompileRun(
- "var ran = false;"
- "(function() { ran = true })");
- {
- // As does initializing this context.
- LocalContext context2(CcTest::isolate());
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- obj)
- .FromJust();
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("observer"), observer)
- .FromJust();
- CompileRun(
- "var objArr = [];"
- // 100 objects should be enough to make the hash table grow
- // (and thus relocate).
- "for (var i = 0; i < 100; ++i) {"
- " objArr.push({});"
- " Object.observe(objArr[objArr.length-1], function(){});"
- "}"
- "Object.observe(obj, observer);");
- }
- // obj is now marked "is_observed", but our map has moved.
- CompileRun("obj.foo = 'bar'");
- CHECK(CompileRun("ran")
- ->BooleanValue(v8::Isolate::GetCurrent()->GetCurrentContext())
- .FromJust());
-}
-
-
-struct RecordExpectation {
- Local<Value> object;
- const char* type;
- const char* name;
- Local<Value> old_value;
-};
-
-
-// TODO(adamk): Use this helper elsewhere in this file.
-static void ExpectRecords(v8::Isolate* isolate, Local<Value> records,
- const RecordExpectation expectations[], int num) {
- CHECK(records->IsArray());
- Local<Array> recordArray = records.As<Array>();
- CHECK_EQ(num, static_cast<int>(recordArray->Length()));
- for (int i = 0; i < num; ++i) {
- Local<Value> record =
- recordArray->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), i)
- .ToLocalChecked();
- CHECK(record->IsObject());
- Local<Object> recordObj = record.As<Object>();
- Local<Value> value =
- recordObj->Get(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("object"))
- .ToLocalChecked();
- CHECK(expectations[i].object->StrictEquals(value));
- value = recordObj->Get(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("type"))
- .ToLocalChecked();
- CHECK(v8_str(expectations[i].type)
- ->Equals(v8::Isolate::GetCurrent()->GetCurrentContext(), value)
- .FromJust());
- if (strcmp("splice", expectations[i].type) != 0) {
- Local<Value> name =
- recordObj->Get(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("name"))
- .ToLocalChecked();
- CHECK(v8_str(expectations[i].name)
- ->Equals(v8::Isolate::GetCurrent()->GetCurrentContext(), name)
- .FromJust());
- if (!expectations[i].old_value.IsEmpty()) {
- Local<Value> old_value =
- recordObj->Get(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("oldValue"))
- .ToLocalChecked();
- CHECK(expectations[i]
- .old_value->Equals(
- v8::Isolate::GetCurrent()->GetCurrentContext(),
- old_value)
- .FromJust());
- }
- }
- }
-}
-
-#define EXPECT_RECORDS(records, expectations) \
- ExpectRecords(CcTest::isolate(), records, expectations, \
- arraysize(expectations))
-
-TEST(APITestBasicMutation) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* v8_isolate = CcTest::isolate();
- HandleScope scope(v8_isolate);
- LocalContext context(v8_isolate);
- Local<Object> obj = Local<Object>::Cast(
- CompileRun("var records = [];"
- "var obj = {};"
- "function observer(r) { [].push.apply(records, r); };"
- "Object.observe(obj, observer);"
- "obj"));
- obj->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("foo"),
- Number::New(v8_isolate, 7))
- .FromJust();
- obj->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), 1,
- Number::New(v8_isolate, 2))
- .FromJust();
- // CreateDataProperty should work just as well as Set
- obj->CreateDataProperty(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("foo"), Number::New(v8_isolate, 3))
- .FromJust();
- obj->CreateDataProperty(v8::Isolate::GetCurrent()->GetCurrentContext(), 1,
- Number::New(v8_isolate, 4))
- .FromJust();
- // Setting an indexed element via the property setting method
- obj->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- Number::New(v8_isolate, 1), Number::New(v8_isolate, 5))
- .FromJust();
- // Setting with a non-String, non-uint32 key
- obj->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- Number::New(v8_isolate, 1.1), Number::New(v8_isolate, 6))
- .FromJust();
- obj->Delete(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("foo"))
- .FromJust();
- obj->Delete(v8::Isolate::GetCurrent()->GetCurrentContext(), 1).FromJust();
- obj->Delete(v8::Isolate::GetCurrent()->GetCurrentContext(),
- Number::New(v8_isolate, 1.1))
- .FromJust();
-
- // Force delivery
- // TODO(adamk): Should the above set methods trigger delivery themselves?
- CompileRun("void 0");
- CHECK_EQ(9, ToInt32(CompileRun("records.length")));
- const RecordExpectation expected_records[] = {
- {obj, "add", "foo", Local<Value>()},
- {obj, "add", "1", Local<Value>()},
- // Note: use 7 not 1 below, as the latter triggers a nifty VS10 compiler
- // bug
- // where instead of 1.0, a garbage value would be passed into Number::New.
- {obj, "update", "foo", Number::New(v8_isolate, 7)},
- {obj, "update", "1", Number::New(v8_isolate, 2)},
- {obj, "update", "1", Number::New(v8_isolate, 4)},
- {obj, "add", "1.1", Local<Value>()},
- {obj, "delete", "foo", Number::New(v8_isolate, 3)},
- {obj, "delete", "1", Number::New(v8_isolate, 5)},
- {obj, "delete", "1.1", Number::New(v8_isolate, 6)}};
- EXPECT_RECORDS(CompileRun("records"), expected_records);
-}
-
-
-TEST(HiddenPrototypeObservation) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* v8_isolate = CcTest::isolate();
- HandleScope scope(v8_isolate);
- LocalContext context(v8_isolate);
- Local<FunctionTemplate> tmpl = FunctionTemplate::New(v8_isolate);
- tmpl->SetHiddenPrototype(true);
- tmpl->InstanceTemplate()->Set(v8_str("foo"), Number::New(v8_isolate, 75));
- Local<Function> function =
- tmpl->GetFunction(v8::Isolate::GetCurrent()->GetCurrentContext())
- .ToLocalChecked();
- Local<Object> proto =
- function->NewInstance(v8::Isolate::GetCurrent()->GetCurrentContext())
- .ToLocalChecked();
- Local<Object> obj = Object::New(v8_isolate);
- obj->SetPrototype(v8::Isolate::GetCurrent()->GetCurrentContext(), proto)
- .FromJust();
- context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"), obj)
- .FromJust();
- context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("proto"),
- proto)
- .FromJust();
- CompileRun(
- "var records;"
- "function observer(r) { records = r; };"
- "Object.observe(obj, observer);"
- "obj.foo = 41;" // triggers a notification
- "proto.foo = 42;"); // does not trigger a notification
- const RecordExpectation expected_records[] = {
- { obj, "update", "foo", Number::New(v8_isolate, 75) }
- };
- EXPECT_RECORDS(CompileRun("records"), expected_records);
- obj->SetPrototype(v8::Isolate::GetCurrent()->GetCurrentContext(),
- Null(v8_isolate))
- .FromJust();
- CompileRun("obj.foo = 43");
- const RecordExpectation expected_records2[] = {
- {obj, "add", "foo", Local<Value>()}};
- EXPECT_RECORDS(CompileRun("records"), expected_records2);
- obj->SetPrototype(v8::Isolate::GetCurrent()->GetCurrentContext(), proto)
- .FromJust();
- CompileRun(
- "Object.observe(proto, observer);"
- "proto.bar = 1;"
- "Object.unobserve(obj, observer);"
- "obj.foo = 44;");
- const RecordExpectation expected_records3[] = {
- {proto, "add", "bar", Local<Value>()}
- // TODO(adamk): The below record should be emitted since proto is observed
- // and has been modified. Not clear if this happens in practice.
- // { proto, "update", "foo", Number::New(43) }
- };
- EXPECT_RECORDS(CompileRun("records"), expected_records3);
-}
-
-
-static int NumberOfElements(i::Handle<i::JSWeakMap> map) {
- return i::ObjectHashTable::cast(map->table())->NumberOfElements();
-}
-
-
-TEST(ObservationWeakMap) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun(
- "var obj = {};"
- "Object.observe(obj, function(){});"
- "Object.getNotifier(obj);"
- "obj = null;");
- i::Isolate* i_isolate = CcTest::i_isolate();
- i::Handle<i::JSObject> observation_state =
- i_isolate->factory()->observation_state();
- i::Handle<i::JSWeakMap> callbackInfoMap = i::Handle<i::JSWeakMap>::cast(
- i::JSReceiver::GetProperty(i_isolate, observation_state,
- "callbackInfoMap")
- .ToHandleChecked());
- i::Handle<i::JSWeakMap> objectInfoMap = i::Handle<i::JSWeakMap>::cast(
- i::JSReceiver::GetProperty(i_isolate, observation_state, "objectInfoMap")
- .ToHandleChecked());
- i::Handle<i::JSWeakMap> notifierObjectInfoMap = i::Handle<i::JSWeakMap>::cast(
- i::JSReceiver::GetProperty(i_isolate, observation_state,
- "notifierObjectInfoMap")
- .ToHandleChecked());
- CHECK_EQ(1, NumberOfElements(callbackInfoMap));
- CHECK_EQ(1, NumberOfElements(objectInfoMap));
- CHECK_EQ(1, NumberOfElements(notifierObjectInfoMap));
- i_isolate->heap()->CollectAllGarbage();
- CHECK_EQ(0, NumberOfElements(callbackInfoMap));
- CHECK_EQ(0, NumberOfElements(objectInfoMap));
- CHECK_EQ(0, NumberOfElements(notifierObjectInfoMap));
-}
-
-
-static int TestObserveSecurity(Local<Context> observer_context,
- Local<Context> object_context,
- Local<Context> mutation_context) {
- Context::Scope observer_scope(observer_context);
- CompileRun("var records = null;"
- "var observer = function(r) { records = r };");
- Local<Value> observer = CompileRun("observer");
- {
- Context::Scope object_scope(object_context);
- object_context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("observer"), observer)
- .FromJust();
- CompileRun("var obj = {};"
- "obj.length = 0;"
- "Object.observe(obj, observer,"
- "['add', 'update', 'delete','reconfigure','splice']"
- ");");
- Local<Value> obj = CompileRun("obj");
- {
- Context::Scope mutation_scope(mutation_context);
- mutation_context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- obj)
- .FromJust();
- CompileRun("obj.foo = 'bar';"
- "obj.foo = 'baz';"
- "delete obj.foo;"
- "Object.defineProperty(obj, 'bar', {value: 'bot'});"
- "Array.prototype.push.call(obj, 1, 2, 3);"
- "Array.prototype.splice.call(obj, 1, 2, 2, 4);"
- "Array.prototype.pop.call(obj);"
- "Array.prototype.shift.call(obj);");
- }
- }
- return ToInt32(CompileRun("records ? records.length : 0"));
-}
-
-
-TEST(ObserverSecurityAAA) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA = Context::New(isolate);
- CHECK_EQ(8, TestObserveSecurity(contextA, contextA, contextA));
-}
-
-
-TEST(ObserverSecurityA1A2A3) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
-
- v8::Local<Context> contextA1 = Context::New(isolate);
- v8::Local<Context> contextA2 = Context::New(isolate);
- v8::Local<Context> contextA3 = Context::New(isolate);
-
- Local<Value> foo = v8_str("foo");
- contextA1->SetSecurityToken(foo);
- contextA2->SetSecurityToken(foo);
- contextA3->SetSecurityToken(foo);
-
- CHECK_EQ(8, TestObserveSecurity(contextA1, contextA2, contextA3));
-}
-
-
-TEST(ObserverSecurityAAB) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
- CHECK_EQ(0, TestObserveSecurity(contextA, contextA, contextB));
-}
-
-
-TEST(ObserverSecurityA1A2B) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
-
- v8::Local<Context> contextA1 = Context::New(isolate);
- v8::Local<Context> contextA2 = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
-
- Local<Value> foo = v8_str("foo");
- contextA1->SetSecurityToken(foo);
- contextA2->SetSecurityToken(foo);
-
- CHECK_EQ(0, TestObserveSecurity(contextA1, contextA2, contextB));
-}
-
-
-TEST(ObserverSecurityABA) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
- CHECK_EQ(0, TestObserveSecurity(contextA, contextB, contextA));
-}
-
-
-TEST(ObserverSecurityA1BA2) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA1 = Context::New(isolate);
- v8::Local<Context> contextA2 = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
-
- Local<Value> foo = v8_str("foo");
- contextA1->SetSecurityToken(foo);
- contextA2->SetSecurityToken(foo);
-
- CHECK_EQ(0, TestObserveSecurity(contextA1, contextB, contextA2));
-}
-
-
-TEST(ObserverSecurityBAA) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
- CHECK_EQ(0, TestObserveSecurity(contextB, contextA, contextA));
-}
-
-
-TEST(ObserverSecurityBA1A2) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA1 = Context::New(isolate);
- v8::Local<Context> contextA2 = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
-
- Local<Value> foo = v8_str("foo");
- contextA1->SetSecurityToken(foo);
- contextA2->SetSecurityToken(foo);
-
- CHECK_EQ(0, TestObserveSecurity(contextB, contextA1, contextA2));
-}
-
-
-TEST(ObserverSecurityNotify) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- v8::Local<Context> contextA = Context::New(isolate);
- v8::Local<Context> contextB = Context::New(isolate);
-
- Context::Scope scopeA(contextA);
- CompileRun("var obj = {};"
- "var recordsA = null;"
- "var observerA = function(r) { recordsA = r };"
- "Object.observe(obj, observerA);");
- Local<Value> obj = CompileRun("obj");
-
- {
- Context::Scope scopeB(contextB);
- contextB->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- obj)
- .FromJust();
- CompileRun("var recordsB = null;"
- "var observerB = function(r) { recordsB = r };"
- "Object.observe(obj, observerB);");
- }
-
- CompileRun("var notifier = Object.getNotifier(obj);"
- "notifier.notify({ type: 'update' });");
- CHECK_EQ(1, ToInt32(CompileRun("recordsA ? recordsA.length : 0")));
-
- {
- Context::Scope scopeB(contextB);
- CHECK_EQ(0, ToInt32(CompileRun("recordsB ? recordsB.length : 0")));
- }
-}
-
-
-TEST(HiddenPropertiesLeakage) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun("var obj = {};"
- "var records = null;"
- "var observer = function(r) { records = r };"
- "Object.observe(obj, observer);");
- Local<Value> obj =
- context->Global()
- ->Get(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"))
- .ToLocalChecked();
- Local<Object>::Cast(obj)
- ->SetPrivate(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8::Private::New(CcTest::isolate(), v8_str("foo")),
- Null(CcTest::isolate()))
- .FromJust();
- CompileRun(""); // trigger delivery
- CHECK(CompileRun("records")->IsNull());
-}
-
-
-TEST(GetNotifierFromOtherContext) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- LocalContext context(CcTest::isolate());
- CompileRun("var obj = {};");
- Local<Value> instance = CompileRun("obj");
- {
- LocalContext context2(CcTest::isolate());
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- instance)
- .FromJust();
- CHECK(CompileRun("Object.getNotifier(obj)")->IsNull());
- }
-}
-
-
-TEST(GetNotifierFromOtherOrigin) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- Local<Value> foo = v8_str("foo");
- Local<Value> bar = v8_str("bar");
- LocalContext context(CcTest::isolate());
- context->SetSecurityToken(foo);
- CompileRun("var obj = {};");
- Local<Value> instance = CompileRun("obj");
- {
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(bar);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- instance)
- .FromJust();
- CHECK(CompileRun("Object.getNotifier(obj)")->IsNull());
- }
-}
-
-
-TEST(GetNotifierFromSameOrigin) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- Local<Value> foo = v8_str("foo");
- LocalContext context(CcTest::isolate());
- context->SetSecurityToken(foo);
- CompileRun("var obj = {};");
- Local<Value> instance = CompileRun("obj");
- {
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(foo);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- instance)
- .FromJust();
- CHECK(CompileRun("Object.getNotifier(obj)")->IsObject());
- }
-}
-
-
-static int GetGlobalObjectsCount() {
- int count = 0;
- i::HeapIterator it(CcTest::heap());
- for (i::HeapObject* object = it.next(); object != NULL; object = it.next())
- if (object->IsJSGlobalObject()) {
- i::JSGlobalObject* g = i::JSGlobalObject::cast(object);
- // Skip dummy global object.
- if (i::GlobalDictionary::cast(g->properties())->NumberOfElements() != 0) {
- count++;
- }
- }
- // Subtract one to compensate for the code stub context that is always present
- return count - 1;
-}
-
-
-static void CheckSurvivingGlobalObjectsCount(int expected) {
- // We need to collect all garbage twice to be sure that everything
- // has been collected. This is because inline caches are cleared in
- // the first garbage collection but some of the maps have already
- // been marked at that point. Therefore some of the maps are not
- // collected until the second garbage collection.
- CcTest::heap()->CollectAllGarbage();
- CcTest::heap()->CollectAllGarbage(i::Heap::kMakeHeapIterableMask);
- int count = GetGlobalObjectsCount();
-#ifdef DEBUG
- if (count != expected) CcTest::heap()->TracePathToGlobal();
-#endif
- CHECK_EQ(expected, count);
-}
-
-
-TEST(DontLeakContextOnObserve) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- Local<Value> foo = v8_str("foo");
- LocalContext context(CcTest::isolate());
- context->SetSecurityToken(foo);
- CompileRun("var obj = {};");
- Local<Value> object = CompileRun("obj");
- {
- HandleScope scope(CcTest::isolate());
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(foo);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- object)
- .FromJust();
- CompileRun("function observer() {};"
- "Object.observe(obj, observer, ['foo', 'bar', 'baz']);"
- "Object.unobserve(obj, observer);");
- }
-
- CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(0);
-}
-
-
-TEST(DontLeakContextOnGetNotifier) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- Local<Value> foo = v8_str("foo");
- LocalContext context(CcTest::isolate());
- context->SetSecurityToken(foo);
- CompileRun("var obj = {};");
- Local<Value> object = CompileRun("obj");
- {
- HandleScope scope(CcTest::isolate());
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(foo);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- object)
- .FromJust();
- CompileRun("Object.getNotifier(obj);");
- }
-
- CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(0);
-}
-
-
-TEST(DontLeakContextOnNotifierPerformChange) {
- i::FLAG_harmony_object_observe = true;
- HandleScope scope(CcTest::isolate());
- Local<Value> foo = v8_str("foo");
- LocalContext context(CcTest::isolate());
- context->SetSecurityToken(foo);
- CompileRun("var obj = {};");
- Local<Value> object = CompileRun("obj");
- Local<Value> notifier = CompileRun("Object.getNotifier(obj)");
- {
- HandleScope scope(CcTest::isolate());
- LocalContext context2(CcTest::isolate());
- context2->SetSecurityToken(foo);
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- object)
- .FromJust();
- context2->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("notifier"), notifier)
- .FromJust();
- CompileRun("var obj2 = {};"
- "var notifier2 = Object.getNotifier(obj2);"
- "notifier2.performChange.call("
- "notifier, 'foo', function(){})");
- }
-
- CcTest::isolate()->ContextDisposedNotification();
- CheckSurvivingGlobalObjectsCount(0);
-}
-
-
-static void ObserverCallback(const FunctionCallbackInfo<Value>& args) {
- *static_cast<int*>(Local<External>::Cast(args.Data())->Value()) =
- Local<Array>::Cast(args[0])->Length();
-}
-
-
-TEST(ObjectObserveCallsCppFunction) {
- i::FLAG_harmony_object_observe = true;
- Isolate* isolate = CcTest::isolate();
- HandleScope scope(isolate);
- LocalContext context(isolate);
- int numRecordsSent = 0;
- Local<Function> observer =
- Function::New(CcTest::isolate()->GetCurrentContext(), ObserverCallback,
- External::New(isolate, &numRecordsSent))
- .ToLocalChecked();
- context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("observer"),
- observer)
- .FromJust();
- CompileRun(
- "var obj = {};"
- "Object.observe(obj, observer);"
- "obj.foo = 1;"
- "obj.bar = 2;");
- CHECK_EQ(2, numRecordsSent);
-}
-
-
-TEST(ObjectObserveCallsFunctionTemplateInstance) {
- i::FLAG_harmony_object_observe = true;
- Isolate* isolate = CcTest::isolate();
- HandleScope scope(isolate);
- LocalContext context(isolate);
- int numRecordsSent = 0;
- Local<FunctionTemplate> tmpl = FunctionTemplate::New(
- isolate, ObserverCallback, External::New(isolate, &numRecordsSent));
- Local<Function> function =
- tmpl->GetFunction(v8::Isolate::GetCurrent()->GetCurrentContext())
- .ToLocalChecked();
- context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("observer"),
- function)
- .FromJust();
- CompileRun(
- "var obj = {};"
- "Object.observe(obj, observer);"
- "obj.foo = 1;"
- "obj.bar = 2;");
- CHECK_EQ(2, numRecordsSent);
-}
-
-
-static void AccessorGetter(Local<Name> property,
- const PropertyCallbackInfo<Value>& info) {
- info.GetReturnValue().Set(Integer::New(info.GetIsolate(), 42));
-}
-
-
-static void AccessorSetter(Local<Name> property, Local<Value> value,
- const PropertyCallbackInfo<void>& info) {
- info.GetReturnValue().SetUndefined();
-}
-
-
-TEST(APIAccessorsShouldNotNotify) {
- i::FLAG_harmony_object_observe = true;
- Isolate* isolate = CcTest::isolate();
- HandleScope handle_scope(isolate);
- LocalContext context(isolate);
- Local<Object> object = Object::New(isolate);
- object->SetAccessor(v8::Isolate::GetCurrent()->GetCurrentContext(),
- v8_str("accessor"), &AccessorGetter, &AccessorSetter)
- .FromJust();
- context->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- object)
- .FromJust();
- CompileRun(
- "var records = null;"
- "Object.observe(obj, function(r) { records = r });"
- "obj.accessor = 43;");
- CHECK(CompileRun("records")->IsNull());
- CompileRun("Object.defineProperty(obj, 'accessor', { value: 44 });");
- CHECK(CompileRun("records")->IsNull());
-}
-
-
-namespace {
-
-int* global_use_counts = NULL;
-
-void MockUseCounterCallback(v8::Isolate* isolate,
- v8::Isolate::UseCounterFeature feature) {
- ++global_use_counts[feature];
-}
-}
-
-
-TEST(UseCountObjectObserve) {
- i::FLAG_harmony_object_observe = true;
- i::Isolate* isolate = CcTest::i_isolate();
- i::HandleScope scope(isolate);
- LocalContext env;
- int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
- global_use_counts = use_counts;
- CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
- CompileRun(
- "var obj = {};"
- "Object.observe(obj, function(){})");
- CHECK_EQ(1, use_counts[v8::Isolate::kObjectObserve]);
- CompileRun(
- "var obj2 = {};"
- "Object.observe(obj2, function(){})");
- // Only counts the first use of observe in a given context.
- CHECK_EQ(1, use_counts[v8::Isolate::kObjectObserve]);
- {
- LocalContext env2;
- CompileRun(
- "var obj = {};"
- "Object.observe(obj, function(){})");
- }
- // Counts different contexts separately.
- CHECK_EQ(2, use_counts[v8::Isolate::kObjectObserve]);
-}
-
-
-TEST(UseCountObjectGetNotifier) {
- i::FLAG_harmony_object_observe = true;
- i::Isolate* isolate = CcTest::i_isolate();
- i::HandleScope scope(isolate);
- LocalContext env;
- int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
- global_use_counts = use_counts;
- CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
- CompileRun("var obj = {}");
- CompileRun("Object.getNotifier(obj)");
- CHECK_EQ(1, use_counts[v8::Isolate::kObjectObserve]);
-}
-
-static bool NamedAccessCheckAlwaysAllow(Local<v8::Context> accessing_context,
- Local<v8::Object> accessed_object,
- Local<v8::Value> data) {
- return true;
-}
-
-
-TEST(DisallowObserveAccessCheckedObject) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- LocalContext env;
- v8::Local<v8::ObjectTemplate> object_template =
- v8::ObjectTemplate::New(isolate);
- object_template->SetAccessCheckCallback(NamedAccessCheckAlwaysAllow);
- Local<Object> new_instance =
- object_template->NewInstance(
- v8::Isolate::GetCurrent()->GetCurrentContext())
- .ToLocalChecked();
- env->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- new_instance)
- .FromJust();
- v8::TryCatch try_catch(isolate);
- CompileRun("Object.observe(obj, function(){})");
- CHECK(try_catch.HasCaught());
-}
-
-
-TEST(DisallowGetNotifierAccessCheckedObject) {
- i::FLAG_harmony_object_observe = true;
- v8::Isolate* isolate = CcTest::isolate();
- v8::HandleScope scope(isolate);
- LocalContext env;
- v8::Local<v8::ObjectTemplate> object_template =
- v8::ObjectTemplate::New(isolate);
- object_template->SetAccessCheckCallback(NamedAccessCheckAlwaysAllow);
- Local<Object> new_instance =
- object_template->NewInstance(
- v8::Isolate::GetCurrent()->GetCurrentContext())
- .ToLocalChecked();
- env->Global()
- ->Set(v8::Isolate::GetCurrent()->GetCurrentContext(), v8_str("obj"),
- new_instance)
- .FromJust();
- v8::TryCatch try_catch(isolate);
- CompileRun("Object.getNotifier(obj)");
- CHECK(try_catch.HasCaught());
-}
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index ae278d8..36f7293 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1070,7 +1070,6 @@
i::Zone zone(CcTest::i_isolate()->allocator());
i::ParseInfo info(&zone, script);
i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
info.set_global();
CHECK(parser.Parse(&info));
CHECK(i::Rewriter::Rewrite(&info));
@@ -1122,13 +1121,11 @@
i::ParseInfo info(handles.main_zone(), script);
i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
info.set_global();
info.set_lazy(false);
info.set_allow_lazy_parsing(false);
info.set_toplevel(true);
- i::CompilationInfo compilation_info(&info);
CHECK(i::Compiler::ParseAndAnalyze(&info));
CHECK(info.scope()->declarations()->length() == 1);
@@ -1438,7 +1435,6 @@
i::ParseInfo info(&zone, script);
info.set_allow_lazy_parsing();
i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
parser.Parse(&info);
function = info.literal();
CHECK_NOT_NULL(function);
@@ -1509,12 +1505,11 @@
enum ParserFlag {
kAllowLazy,
kAllowNatives,
- kAllowHarmonySloppy,
- kAllowHarmonySloppyLet,
- kAllowHarmonyNewTarget,
kAllowHarmonyFunctionSent,
kAllowHarmonyRestrictiveDeclarations,
- kAllowHarmonyExponentiationOperator
+ kAllowHarmonyExponentiationOperator,
+ kAllowHarmonyForIn,
+ kAllowHarmonyAsyncAwait
};
enum ParserSyncTestResult {
@@ -1528,28 +1523,29 @@
i::EnumSet<ParserFlag> flags) {
parser->set_allow_lazy(flags.Contains(kAllowLazy));
parser->set_allow_natives(flags.Contains(kAllowNatives));
- parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
- parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_function_sent(
flags.Contains(kAllowHarmonyFunctionSent));
parser->set_allow_harmony_restrictive_declarations(
flags.Contains(kAllowHarmonyRestrictiveDeclarations));
parser->set_allow_harmony_exponentiation_operator(
flags.Contains(kAllowHarmonyExponentiationOperator));
+ parser->set_allow_harmony_for_in(flags.Contains(kAllowHarmonyForIn));
+ parser->set_allow_harmony_async_await(
+ flags.Contains(kAllowHarmonyAsyncAwait));
}
void TestParserSyncWithFlags(i::Handle<i::String> source,
i::EnumSet<ParserFlag> flags,
ParserSyncTestResult result,
- bool is_module = false) {
+ bool is_module = false,
+ bool test_preparser = true) {
i::Isolate* isolate = CcTest::i_isolate();
i::Factory* factory = isolate->factory();
uintptr_t stack_limit = isolate->stack_guard()->real_climit();
int preparser_materialized_literals = -1;
int parser_materialized_literals = -2;
- bool test_preparser = !is_module;
// Preparse the data.
i::CompleteParserRecorder log;
@@ -1563,8 +1559,8 @@
stack_limit);
SetParserFlags(&preparser, flags);
scanner.Initialize(&stream);
- i::PreParser::PreParseResult result = preparser.PreParseProgram(
- &preparser_materialized_literals);
+ i::PreParser::PreParseResult result =
+ preparser.PreParseProgram(&preparser_materialized_literals, is_module);
CHECK_EQ(i::PreParser::kPreParseSuccess, result);
}
bool preparse_error = log.HasError();
@@ -1674,7 +1670,7 @@
size_t always_true_flags_length = 0,
const ParserFlag* always_false_flags = NULL,
size_t always_false_flags_length = 0,
- bool is_module = false) {
+ bool is_module = false, bool test_preparser = true) {
i::Handle<i::String> str =
CcTest::i_isolate()->factory()->NewStringFromAsciiChecked(source);
for (int bits = 0; bits < (1 << varying_flags_length); bits++) {
@@ -1691,7 +1687,7 @@
++flag_index) {
flags.Remove(always_false_flags[flag_index]);
}
- TestParserSyncWithFlags(str, flags, result, is_module);
+ TestParserSyncWithFlags(str, flags, result, is_module, test_preparser);
}
}
@@ -1839,7 +1835,8 @@
const ParserFlag* always_true_flags = NULL,
int always_true_len = 0,
const ParserFlag* always_false_flags = NULL,
- int always_false_len = 0, bool is_module = false) {
+ int always_false_len = 0, bool is_module = false,
+ bool test_preparser = true) {
v8::HandleScope handles(CcTest::isolate());
v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
v8::Context::Scope context_scope(context);
@@ -1894,7 +1891,7 @@
CHECK(length == kProgramSize);
TestParserSync(program.start(), flags, flags_len, result,
always_true_flags, always_true_len, always_false_flags,
- always_false_len, is_module);
+ always_false_len, is_module, test_preparser);
}
}
delete[] generated_flags;
@@ -1908,10 +1905,11 @@
const ParserFlag* always_true_flags = NULL,
int always_true_len = 0,
const ParserFlag* always_false_flags = NULL,
- int always_false_len = 0) {
+ int always_false_len = 0,
+ bool test_preparser = true) {
RunParserSyncTest(context_data, statement_data, result, flags, flags_len,
always_true_flags, always_true_len, always_false_flags,
- always_false_len, true);
+ always_false_len, true, test_preparser);
}
@@ -2017,25 +2015,28 @@
RunParserSyncTest(context_data, statement_data, kSuccess);
}
+#define FUTURE_STRICT_RESERVED_WORDS_NO_LET(V) \
+ V(implements) \
+ V(interface) \
+ V(package) \
+ V(private) \
+ V(protected) \
+ V(public) \
+ V(static) \
+ V(yield)
#define FUTURE_STRICT_RESERVED_WORDS(V) \
- V(implements) \
- V(interface) \
V(let) \
- V(package) \
- V(private) \
- V(protected) \
- V(public) \
- V(static) \
- V(yield)
+ FUTURE_STRICT_RESERVED_WORDS_NO_LET(V)
+#define LIMITED_FUTURE_STRICT_RESERVED_WORDS_NO_LET(V) \
+ V(implements) \
+ V(static) \
+ V(yield)
#define LIMITED_FUTURE_STRICT_RESERVED_WORDS(V) \
- V(implements) \
V(let) \
- V(static) \
- V(yield)
-
+ LIMITED_FUTURE_STRICT_RESERVED_WORDS_NO_LET(V)
#define FUTURE_STRICT_RESERVED_STATEMENTS(NAME) \
"var " #NAME ";", \
@@ -2051,26 +2052,53 @@
"++" #NAME ";", \
#NAME " ++;",
+// clang-format off
+#define FUTURE_STRICT_RESERVED_LEX_BINDINGS(NAME) \
+ "let " #NAME ";", \
+ "for (let " #NAME "; false; ) {}", \
+ "for (let " #NAME " in {}) {}", \
+ "for (let " #NAME " of []) {}", \
+ "const " #NAME " = null;", \
+ "for (const " #NAME " = null; false; ) {}", \
+ "for (const " #NAME " in {}) {}", \
+ "for (const " #NAME " of []) {}",
+// clang-format on
TEST(ErrorsFutureStrictReservedWords) {
// Tests that both preparsing and parsing produce the right kind of errors for
// using future strict reserved words as identifiers. Without the strict mode,
// it's ok to use future strict reserved words as identifiers. With the strict
// mode, it isn't.
- const char* context_data[][2] = {
+ const char* strict_contexts[][2] = {
{"function test_func() {\"use strict\"; ", "}"},
{"() => { \"use strict\"; ", "}"},
{NULL, NULL}};
+ // clang-format off
const char* statement_data[] {
LIMITED_FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
+ LIMITED_FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_LEX_BINDINGS)
NULL
};
+ // clang-format on
- RunParserSyncTest(context_data, statement_data, kError);
+ RunParserSyncTest(strict_contexts, statement_data, kError);
+
+ // From ES2015, 13.3.1.1 Static Semantics: Early Errors:
+ //
+ // > LexicalDeclaration : LetOrConst BindingList ;
+ // >
+ // > - It is a Syntax Error if the BoundNames of BindingList contains "let".
+ const char* non_strict_contexts[][2] = {{"", ""},
+ {"function test_func() {", "}"},
+ {"() => {", "}"},
+ {NULL, NULL}};
+ const char* invalid_statements[] = {FUTURE_STRICT_RESERVED_LEX_BINDINGS("let")
+ NULL};
+
+ RunParserSyncTest(non_strict_contexts, invalid_statements, kError);
}
-
#undef LIMITED_FUTURE_STRICT_RESERVED_WORDS
@@ -2082,10 +2110,13 @@
{ NULL, NULL }
};
+ // clang-format off
const char* statement_data[] = {
FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
+ FUTURE_STRICT_RESERVED_WORDS_NO_LET(FUTURE_STRICT_RESERVED_LEX_BINDINGS)
NULL
};
+ // clang-format on
RunParserSyncTest(context_data, statement_data, kSuccess);
}
@@ -2349,9 +2380,7 @@
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, statement_data, kSuccess);
}
@@ -2407,6 +2436,10 @@
"var {foo: yield 24} = {a: 42};",
"[yield 24] = [42];",
"({a: yield 24} = {a: 42});",
+ "for (yield 'x' in {});",
+ "for (yield 'x' of {});",
+ "for (yield 'x' in {} in {});",
+ "for (yield 'x' in {} of {});",
"class C extends yield { }",
NULL
};
@@ -3949,11 +3982,7 @@
NULL
};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, statement_data, kSuccess);
}
@@ -3980,9 +4009,7 @@
NULL
};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, expression_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, expression_data, kError);
}
@@ -3996,9 +4023,7 @@
NULL
};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, success_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, success_data, kSuccess);
const char* error_data[] = {
"class C { constructor() { super(); } }",
@@ -4020,8 +4045,7 @@
NULL
};
- RunParserSyncTest(context_data, error_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, error_data, kError);
}
@@ -4046,9 +4070,7 @@
NULL
};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, expression_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, expression_data, kSuccess);
}
@@ -4079,9 +4101,7 @@
NULL
};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, statement_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, statement_data, kError);
}
@@ -4119,11 +4139,7 @@
NULL
};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, statement_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, statement_data, kError);
}
@@ -4336,9 +4352,7 @@
"class name extends class base {} {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, class_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_data, kSuccess);
}
@@ -4412,11 +4426,7 @@
NULL};
// clang-format on
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kSuccess);
}
@@ -4469,11 +4479,7 @@
"finally",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, name_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, name_data, kSuccess);
}
@@ -4499,11 +4505,7 @@
"class { m() {}, n() {} }", // No commas allowed.
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_data, kError);
}
@@ -4535,11 +4537,7 @@
"class name { *static m() {} }",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_data, kError);
}
@@ -4564,11 +4562,7 @@
"yield",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_name, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_name, kError);
}
@@ -4596,11 +4590,7 @@
"yield",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_name, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_name, kError);
}
@@ -4623,11 +4613,7 @@
"static *'prot\\u006ftype'() {}",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kError);
}
@@ -4649,11 +4635,7 @@
"*'c\\u006fnstructor'() {}",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kError);
}
@@ -4670,11 +4652,7 @@
"static *constructor() {}",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kSuccess);
}
@@ -4687,11 +4665,7 @@
"constructor() {}; constructor() {}",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kError);
}
@@ -4708,11 +4682,7 @@
"get m() {}; set m(_) {}; get m() {}; set m(_) {};",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kSuccess);
}
@@ -4727,11 +4697,7 @@
"class C { *method() { with ({}) {} } }",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy
- };
- RunParserSyncTest(context_data, class_body_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, class_body_data, kError);
}
@@ -4869,10 +4835,7 @@
"for(let x in {}, {}) {}", "for(const x in {}, {}) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -4980,9 +4943,7 @@
"for (const i, j = 1 in {}) {}",
"for (const i, j = void 0 in [1, 2, 3]) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5009,9 +4970,7 @@
"for (const i, j = 1 of {}) {}",
"for (const i, j = void 0 of [1, 2, 3]) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5026,9 +4985,7 @@
"for (var in {}) {}",
"for (const in {}) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5043,9 +5000,7 @@
"for (var of [1, 2, 3]) {}",
"for (const of [1, 2, 3]) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5059,10 +5014,7 @@
"for(x of 'foo' in {}) {}", "for(var x of 'foo' in {}) {}",
"for(let x of 'foo' in {}) {}", "for(const x of 'foo' in {}) {}", NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5073,10 +5025,7 @@
"for(let x of yield) {}", "for(const x of yield) {}",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5091,10 +5040,7 @@
"function* g() { for(let x of yield) {} }",
"function* g() { for(const x of yield) {} }", NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5112,10 +5058,7 @@
"for(x of { y = 23 }) {}", "for(var x of { y = 23 }) {}",
"for(let x of { y = 23 }) {}", "for(const x of { y = 23 }) {}", NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5205,7 +5148,7 @@
"`foo${\r a}`",
"`foo${'a' in a}`",
NULL};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5240,7 +5183,7 @@
"tag`foo${\r a}`",
"tag`foo${'a' in a}`",
NULL};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5267,7 +5210,7 @@
NULL
};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5301,7 +5244,7 @@
"`foo${fn(}`",
"`foo${1 if}`",
NULL};
- RunParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5321,7 +5264,7 @@
"`hello${1}\\x\n${2}`",
NULL};
- RunParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5396,13 +5339,12 @@
{nullptr, nullptr}};
const char* data[] = {"...a", "...arguments", "...eval", nullptr};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, nullptr, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
TEST(RestParametersEvalArguments) {
+ // clang-format off
const char* strict_context_data[][2] =
{{"'use strict';(function(",
"){ return;})(1, [], /regexp/, 'str',function(){});"},
@@ -5416,8 +5358,10 @@
"...eval",
"eval, ...args",
"...arguments",
- "arguments, ...args",
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=4577
+ // "arguments, ...args",
NULL};
+ // clang-format on
// Fail in strict mode
RunParserSyncTest(strict_context_data, data, kError);
@@ -5484,7 +5428,7 @@
"var [...x,] = [1,2,3];", "var [...x, y] = [1,2,3];",
"var {...x} = [1,2,3];", "var { x } = {x: ...[1,2,3]}",
NULL};
- RunParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, data, kError);
}
@@ -5494,28 +5438,12 @@
{"function f() {", "}"},
{"{", "}"},
{NULL, NULL}};
- const char* bad_data[] = {
- "let x = 1;",
- "for(let x = 1;;){}",
- "for(let x of []){}",
- "for(let x in []){}",
- "class C {}",
- "class C extends D {}",
- "(class {})",
- "(class extends D {})",
- "(class C {})",
- "(class C extends D {})",
- NULL};
- static const ParserFlag always_false_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, bad_data, kError, NULL, 0, NULL, 0,
- always_false_flags, arraysize(always_false_flags));
const char* good_data[] = {
"let = 1;",
"for(let = 1;;){}",
NULL};
- RunParserSyncTest(context_data, good_data, kSuccess, NULL, 0, NULL, 0,
- always_false_flags, arraysize(always_false_flags));
+ RunParserSyncTest(context_data, good_data, kSuccess);
}
@@ -5535,11 +5463,7 @@
"var name",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy,
- };
- RunParserSyncTest(context_data, error_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, error_data, kError);
const char* name_data[] = {
"1",
@@ -5550,8 +5474,7 @@
"{}",
NULL};
- RunParserSyncTest(context_data, name_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, name_data, kSuccess);
}
@@ -5563,11 +5486,7 @@
"[1], a: 1",
NULL};
- static const ParserFlag always_flags[] = {
- kAllowHarmonySloppy,
- };
- RunParserSyncTest(context_data, error_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(context_data, error_data, kError);
}
@@ -5600,6 +5519,8 @@
"export { static } from 'm.js'",
"export { let } from 'm.js'",
"var a; export { a as b, a as c };",
+ "var a; export { a as await };",
+ "var a; export { a as enum };",
"import 'somemodule.js';",
"import { } from 'm.js';",
@@ -5725,6 +5646,8 @@
"import { y as yield } from 'm.js'",
"import { s as static } from 'm.js'",
"import { l as let } from 'm.js'",
+ "import { a as await } from 'm.js';",
+ "import { a as enum } from 'm.js';",
"import { x }, def from 'm.js';",
"import def, def2 from 'm.js';",
"import * as x, def from 'm.js';",
@@ -5757,6 +5680,179 @@
}
}
+TEST(ModuleTopLevelFunctionDecl) {
+ // clang-format off
+ const char* kErrorSources[] = {
+ "function f() {} function f() {}",
+ "var f; function f() {}",
+ "function f() {} var f;",
+ "function* f() {} function* f() {}",
+ "var f; function* f() {}",
+ "function* f() {} var f;",
+ "function f() {} function* f() {}",
+ "function* f() {} function f() {}",
+ };
+ // clang-format on
+
+ i::Isolate* isolate = CcTest::i_isolate();
+ i::Factory* factory = isolate->factory();
+
+ v8::HandleScope handles(CcTest::isolate());
+ v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
+ v8::Context::Scope context_scope(context);
+
+ isolate->stack_guard()->SetStackLimit(i::GetCurrentStackPosition() -
+ 128 * 1024);
+
+ for (unsigned i = 0; i < arraysize(kErrorSources); ++i) {
+ i::Handle<i::String> source =
+ factory->NewStringFromAsciiChecked(kErrorSources[i]);
+
+ i::Handle<i::Script> script = factory->NewScript(source);
+ i::Zone zone(CcTest::i_isolate()->allocator());
+ i::ParseInfo info(&zone, script);
+ i::Parser parser(&info);
+ info.set_module();
+ CHECK(!parser.Parse(&info));
+ }
+}
+
+TEST(ModuleAwaitReserved) {
+ // clang-format off
+ const char* kErrorSources[] = {
+ "await;",
+ "await: ;",
+ "var await;",
+ "var [await] = [];",
+ "var { await } = {};",
+ "var { x: await } = {};",
+ "{ var await; }",
+ "let await;",
+ "let [await] = [];",
+ "let { await } = {};",
+ "let { x: await } = {};",
+ "{ let await; }",
+ "const await = null;",
+ "const [await] = [];",
+ "const { await } = {};",
+ "const { x: await } = {};",
+ "{ const await = null; }",
+ "function await() {}",
+ "function f(await) {}",
+ "function* await() {}",
+ "function* g(await) {}",
+ "(function await() {});",
+ "(function (await) {});",
+ "(function* await() {});",
+ "(function* (await) {});",
+ "(await) => {};",
+ "await => {};",
+ "class await {}",
+ "class C { constructor(await) {} }",
+ "class C { m(await) {} }",
+ "class C { static m(await) {} }",
+ "class C { *m(await) {} }",
+ "class C { static *m(await) {} }",
+ "(class await {})",
+ "(class { constructor(await) {} });",
+ "(class { m(await) {} });",
+ "(class { static m(await) {} });",
+ "(class { *m(await) {} });",
+ "(class { static *m(await) {} });",
+ "({ m(await) {} });",
+ "({ *m(await) {} });",
+ "({ set p(await) {} });",
+ "try {} catch (await) {}",
+ "try {} catch (await) {} finally {}",
+ NULL
+ };
+ // clang-format on
+ const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+
+ RunModuleParserSyncTest(context_data, kErrorSources, kError);
+}
+
+TEST(ModuleAwaitReservedPreParse) {
+ const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+ const char* error_data[] = {"function f() { var await = 0; }", NULL};
+
+ RunModuleParserSyncTest(context_data, error_data, kError);
+}
+
+TEST(ModuleAwaitPermitted) {
+ // clang-format off
+ const char* kValidSources[] = {
+ "({}).await;",
+ "({ await: null });",
+ "({ await() {} });",
+ "({ get await() {} });",
+ "({ set await(x) {} });",
+ "(class { await() {} });",
+ "(class { static await() {} });",
+ "(class { *await() {} });",
+ "(class { static *await() {} });",
+ NULL
+ };
+ // clang-format on
+ const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+
+ RunModuleParserSyncTest(context_data, kValidSources, kSuccess);
+}
+
+TEST(EnumReserved) {
+ // clang-format off
+ const char* kErrorSources[] = {
+ "enum;",
+ "enum: ;",
+ "var enum;",
+ "var [enum] = [];",
+ "var { enum } = {};",
+ "var { x: enum } = {};",
+ "{ var enum; }",
+ "let enum;",
+ "let [enum] = [];",
+ "let { enum } = {};",
+ "let { x: enum } = {};",
+ "{ let enum; }",
+ "const enum = null;",
+ "const [enum] = [];",
+ "const { enum } = {};",
+ "const { x: enum } = {};",
+ "{ const enum = null; }",
+ "function enum() {}",
+ "function f(enum) {}",
+ "function* enum() {}",
+ "function* g(enum) {}",
+ "(function enum() {});",
+ "(function (enum) {});",
+ "(function* enum() {});",
+ "(function* (enum) {});",
+ "(enum) => {};",
+ "enum => {};",
+ "class enum {}",
+ "class C { constructor(enum) {} }",
+ "class C { m(enum) {} }",
+ "class C { static m(enum) {} }",
+ "class C { *m(enum) {} }",
+ "class C { static *m(enum) {} }",
+ "(class enum {})",
+ "(class { constructor(enum) {} });",
+ "(class { m(enum) {} });",
+ "(class { static m(enum) {} });",
+ "(class { *m(enum) {} });",
+ "(class { static *m(enum) {} });",
+ "({ m(enum) {} });",
+ "({ *m(enum) {} });",
+ "({ set p(enum) {} });",
+ "try {} catch (enum) {}",
+ "try {} catch (enum) {} finally {}",
+ NULL
+ };
+ // clang-format on
+ const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+
+ RunModuleParserSyncTest(context_data, kErrorSources, kError);
+}
TEST(ModuleParsingInternals) {
i::Isolate* isolate = CcTest::i_isolate();
@@ -6213,9 +6309,7 @@
"[ a ]",
NULL};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
}
@@ -6684,6 +6778,9 @@
// Arrow function within generator has the same rules.
{"'use strict'; (function *g() { (", ") => {} });"},
{"(function *g() { (", ") => {} });"},
+ // And similarly for arrow functions in the parameter list.
+ {"'use strict'; (function *g(z = (", ") => {}) { });"},
+ {"(function *g(z = (", ") => {}) { });"},
{NULL, NULL}
};
@@ -6819,16 +6916,10 @@
NULL
};
- static const ParserFlag always_flags[] = {
- kAllowHarmonyNewTarget,
- kAllowHarmonySloppy,
- };
// clang-format on
- RunParserSyncTest(good_context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
- RunParserSyncTest(bad_context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(good_context_data, data, kSuccess);
+ RunParserSyncTest(bad_context_data, data, kError);
}
@@ -6848,9 +6939,7 @@
NULL
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -6873,10 +6962,7 @@
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -6922,9 +7008,7 @@
"{ initializedBindingPattern } = { initializedBindingPattern: true }",
NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -6952,10 +7036,7 @@
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
// Some things should be rejected even in sloppy mode
// This addresses BUG(v8:4403).
@@ -6989,10 +7070,7 @@
};
// clang-format on
- static const ParserFlag fail_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(context_data, fail_data, kError, NULL, 0, fail_flags,
- arraysize(fail_flags));
+ RunParserSyncTest(context_data, fail_data, kError);
}
@@ -7092,13 +7170,9 @@
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
- RunParserSyncTest(sloppy_context_data, fail_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
- RunParserSyncTest(strict_context_data, fail_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
- RunModuleParserSyncTest(sloppy_context_data, fail_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(sloppy_context_data, fail_data, kError);
+ RunParserSyncTest(strict_context_data, fail_data, kError);
+ RunModuleParserSyncTest(sloppy_context_data, fail_data, kError);
// clang-format off
const char* let_data[] = {
@@ -7109,15 +7183,8 @@
};
// clang-format on
- RunParserSyncTest(sloppy_context_data, let_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
- RunParserSyncTest(strict_context_data, let_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
-
- static const ParserFlag sloppy_let_flags[] = {kAllowHarmonySloppy,
- kAllowHarmonySloppyLet};
- RunParserSyncTest(sloppy_context_data, let_data, kSuccess, NULL, 0,
- sloppy_let_flags, arraysize(sloppy_let_flags));
+ RunParserSyncTest(sloppy_context_data, let_data, kSuccess);
+ RunParserSyncTest(strict_context_data, let_data, kError);
// Non-errors in sloppy mode
const char* valid_data[] = {"(\\u0069mplements = 1);",
@@ -7142,12 +7209,9 @@
"var st\\u0061tic = 1;",
"var { st\\u0061tic } = {};",
NULL};
- RunParserSyncTest(sloppy_context_data, valid_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
- RunParserSyncTest(strict_context_data, valid_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
- RunModuleParserSyncTest(strict_context_data, valid_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
+ RunParserSyncTest(sloppy_context_data, valid_data, kSuccess);
+ RunParserSyncTest(strict_context_data, valid_data, kError);
+ RunModuleParserSyncTest(strict_context_data, valid_data, kError);
}
@@ -7167,7 +7231,7 @@
};
// clang-format on
- RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, error_data, kError);
}
@@ -7196,7 +7260,7 @@
};
// clang-format on
- RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0);
+ RunParserSyncTest(context_data, error_data, kError);
}
@@ -7281,6 +7345,13 @@
"with ({}) label: function f() { };",
"if (true) label: function f() {}",
"if (true) {} else label: function f() {}",
+ "if (true) function* f() { }",
+ "label: function* f() { }",
+ // TODO(littledan, v8:4806): Ban duplicate generator declarations in
+ // a block, maybe by tracking whether a Variable is a generator declaration
+ // "{ function* f() {} function* f() {} }",
+ // "{ function f() {} function* f() {} }",
+ // "{ function* f() {} function f() {} }",
NULL
};
// Valid only in sloppy mode, with or without
@@ -7412,3 +7483,251 @@
RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags,
arraysize(always_flags));
}
+
+TEST(AsyncAwait) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "'use strict';", "" },
+ { "", "" },
+ { NULL, NULL }
+ };
+
+ const char* data[] = {
+ "var asyncFn = async function() { await 1; };",
+ "var asyncFn = async function withName() { await 1; };",
+ "var asyncFn = async () => await 'test';",
+ "var asyncFn = async x => await x + 'test';",
+ "async function asyncFn() { await 1; }",
+ "var O = { async method() { await 1; } }",
+ "var O = { async ['meth' + 'od']() { await 1; } }",
+ "var O = { async 'method'() { await 1; } }",
+ "var O = { async 0() { await 1; } }",
+ "async function await() {}",
+ NULL
+ };
+ // clang-format on
+
+ static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait};
+ RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
+ arraysize(always_flags));
+
+ // clang-format off
+ const char* async_body_context_data[][2] = {
+ { "async function f() {", "}" },
+ { "var f = async function() {", "}" },
+ { "var f = async() => {", "}" },
+ { "var O = { async method() {", "} }" },
+ { "'use strict'; async function f() {", "}" },
+ { "'use strict'; var f = async function() {", "}" },
+ { "'use strict'; var f = async() => {", "}" },
+ { "'use strict'; var O = { async method() {", "} }" },
+ { NULL, NULL }
+ };
+
+ const char* body_context_data[][2] = {
+ { "function f() {", "}" },
+ { "function* g() {", "}" },
+ { "var f = function() {", "}" },
+ { "var g = function*() {", "}" },
+ { "var O = { method() {", "} }" },
+ { "var O = { *method() {", "} }" },
+ { "var f = () => {", "}" },
+ { "'use strict'; function f() {", "}" },
+ { "'use strict'; function* g() {", "}" },
+ { "'use strict'; var f = function() {", "}" },
+ { "'use strict'; var g = function*() {", "}" },
+ { "'use strict'; var O = { method() {", "} }" },
+ { "'use strict'; var O = { *method() {", "} }" },
+ { "'use strict'; var f = () => {", "}" },
+ { NULL, NULL }
+ };
+
+ const char* body_data[] = {
+ "var async = 1; return async;",
+ "let async = 1; return async;",
+ "const async = 1; return async;",
+ "function async() {} return async();",
+ "var async = async => async; return async();",
+ "function foo() { var await = 1; return await; }",
+ "function foo(await) { return await; }",
+ "function* foo() { var await = 1; return await; }",
+ "function* foo(await) { return await; }",
+ "var f = (await) => await;",
+ "var f = () => { var await = 1; return await; }",
+ "var O = { method() { var await = 1; return await; } };",
+ "var O = { method(await) { return await; } };",
+ "var O = { *method() { var await = 1; return await; } };",
+ "var O = { *method(await) { return await; } };",
+
+ "(function await() {})",
+ NULL
+ };
+ // clang-format on
+
+ RunParserSyncTest(async_body_context_data, body_data, kSuccess, NULL, 0,
+ always_flags, arraysize(always_flags));
+ RunParserSyncTest(body_context_data, body_data, kSuccess, NULL, 0,
+ always_flags, arraysize(always_flags));
+}
+
+TEST(AsyncAwaitErrors) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "'use strict';", "" },
+ { "", "" },
+ { NULL, NULL }
+ };
+
+ const char* strict_context_data[][2] = {
+ { "'use strict';", "" },
+ { NULL, NULL }
+ };
+
+ const char* error_data[] = {
+ "var asyncFn = async function() { var await = 1; };",
+ "var asyncFn = async function() { var { await } = 1; };",
+ "var asyncFn = async function() { var [ await ] = 1; };",
+ "var asyncFn = async function await() {};",
+ "var asyncFn = async () => var await = 'test';",
+ "var asyncFn = async await => await + 'test';",
+ "var asyncFn = async function(await) {};",
+ "var asyncFn = async function() { return async (await) => {}; }",
+ "var asyncFn = async (await) => 'test';",
+ "var asyncFn = async x => { var await = 1; }",
+ "var asyncFn = async x => { var { await } = 1; }",
+ "var asyncFn = async x => { var [ await ] = 1; }",
+ "async function f(await) {}",
+ "async function f() { var await = 1; }",
+ "async function f() { var { await } = 1; }",
+ "async function f() { var [ await ] = 1; }",
+
+ "var O = { async method(a, a) {} }",
+ "var O = { async ['meth' + 'od'](a, a) {} }",
+ "var O = { async 'method'(a, a) {} }",
+ "var O = { async 0(a, a) {} }",
+
+ "async function f() { var O = { async [await](a, a) {} } }",
+
+ "var asyncFn = async function() { await; }",
+ "async function f() { await; }",
+ "var O = { async method() { await; } };",
+ "var f = async() => await;",
+ "var f = async() => { await; };",
+
+ "var asyncFn = async function*() {}",
+ "async function* f() {}",
+ "var O = { *async method() {} };",
+ "var O = { async *method() {} };",
+ "var O = { async method*() {} };",
+
+ "var asyncFn = async function(x = await 1) { return x; }",
+ "async function f(x = await 1) { return x; }",
+ "var f = async(x = await 1) => x;",
+ "var O = { async method(x = await 1) { return x; } };",
+
+ "var f = async(x = await) => 1;",
+
+ "class C { async constructor() {} }",
+ "class C {}; class C2 extends C { async constructor() {} }",
+ "class C { static async prototype() {} }",
+ "class C {}; class C2 extends C { static async prototype() {} }",
+
+ "var f = async() => ((async(x = await 1) => x)();",
+
+ "var asyncFn = async function() { function await() {} }",
+ "var asyncFn = async() => { function await() {} }",
+ "var O = { async method() { function await() {} } }",
+ "async function foo() { function await() {} }",
+
+ NULL
+ };
+
+ const char* strict_error_data[] = {
+ "var O = { async method(eval) {} }",
+ "var O = { async ['meth' + 'od'](eval) {} }",
+ "var O = { async 'method'(eval) {} }",
+ "var O = { async 0(eval) {} }",
+
+ "var O = { async method(arguments) {} }",
+ "var O = { async ['meth' + 'od'](arguments) {} }",
+ "var O = { async 'method'(arguments) {} }",
+ "var O = { async 0(arguments) {} }",
+
+ "var O = { async method(dupe, dupe) {} }",
+
+ // TODO(caitp): preparser needs to report duplicate parameter errors, too.
+ // "var f = async(dupe, dupe) => {}",
+
+ NULL
+ };
+ // clang-format on
+
+ static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait};
+ RunParserSyncTest(context_data, error_data, kError, NULL, 0, always_flags,
+ arraysize(always_flags));
+ RunParserSyncTest(strict_context_data, strict_error_data, kError, NULL, 0,
+ always_flags, arraysize(always_flags));
+}
+
+TEST(AsyncAwaitModule) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "", "" },
+ { NULL, NULL }
+ };
+
+ const char* data[] = {
+ "export default async function() { await 1; }",
+ "export default async function async() { await 1; }",
+ "export async function async() { await 1; }",
+ NULL
+ };
+ // clang-format on
+
+ static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait};
+ RunModuleParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
+ arraysize(always_flags), NULL, 0, false);
+}
+
+TEST(AsyncAwaitModuleErrors) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "", "" },
+ { NULL, NULL }
+ };
+
+ const char* error_data[] = {
+ "export default (async function await() {})",
+ "export default async function await() {}",
+ "export async function await() {}",
+ "export async function() {}",
+ "export async",
+ NULL
+ };
+ // clang-format on
+
+ static const ParserFlag always_flags[] = {kAllowHarmonyAsyncAwait};
+ RunModuleParserSyncTest(context_data, error_data, kError, NULL, 0,
+ always_flags, arraysize(always_flags), NULL, 0,
+ false);
+}
+
+TEST(RestrictiveForInErrors) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "'use strict'", "" },
+ { "", "" },
+ { NULL, NULL }
+ };
+ const char* error_data[] = {
+ "for (var x = 0 in {});",
+ "for (const x = 0 in {});",
+ "for (let x = 0 in {});",
+ NULL
+ };
+ // clang-format on
+
+ static const ParserFlag always_flags[] = {kAllowHarmonyForIn};
+ RunParserSyncTest(context_data, error_data, kError, nullptr, 0, always_flags,
+ arraysize(always_flags));
+}
diff --git a/test/cctest/test-platform.cc b/test/cctest/test-platform.cc
index 6012fd4..48eda3d 100644
--- a/test/cctest/test-platform.cc
+++ b/test/cctest/test-platform.cc
@@ -25,9 +25,9 @@
#elif V8_HOST_ARCH_MIPS64
__asm__ __volatile__("sd $sp, %0" : "=g"(sp_addr));
#elif defined(__s390x__) || defined(_ARCH_S390X)
- __asm__ __volatile__("stg 15, %0" : "=g"(sp_addr));
+ __asm__ __volatile__("stg 15, %0" : "=m"(sp_addr));
#elif defined(__s390__) || defined(_ARCH_S390)
- __asm__ __volatile__("st 15, %0" : "=g"(sp_addr));
+ __asm__ __volatile__("st 15, %0" : "=m"(sp_addr));
#elif defined(__PPC64__) || defined(_ARCH_PPC64)
__asm__ __volatile__("std 1, %0" : "=g"(sp_addr));
#elif defined(__PPC__) || defined(_ARCH_PPC)
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
index 48633f5..71c5ba8 100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -698,12 +698,7 @@
" debugger;\n"
" startProfiling();\n"
"}\n"
- "function TryFinally() {\n"
- " try {\n"
- " Debugger();\n"
- " } finally { };\n"
- "}\n"
- "TryFinally();\n"
+ "Debugger();\n"
"stopProfiling();"));
script->Run(v8::Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
CHECK_EQ(1, iprofiler->GetProfilesCount());
@@ -715,15 +710,10 @@
// The tree should look like this:
// (root)
// ""
- // kTryFinallyStatement
- // kDebuggerStatement
+ // kDebuggerStatement
current = PickChild(current, "");
CHECK(const_cast<v8::CpuProfileNode*>(current));
- current = PickChild(current, "TryFinally");
- CHECK(const_cast<v8::CpuProfileNode*>(current));
- CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
-
current = PickChild(current, "Debugger");
CHECK(const_cast<v8::CpuProfileNode*>(current));
CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason()));
diff --git a/test/cctest/test-run-wasm-relocation-arm.cc b/test/cctest/test-run-wasm-relocation-arm.cc
index adfeb28..b2e6ec3 100644
--- a/test/cctest/test-run-wasm-relocation-arm.cc
+++ b/test/cctest/test-run-wasm-relocation-arm.cc
@@ -23,8 +23,7 @@
static int32_t DummyStaticFunction(Object* result) { return 1; }
-TEST(WasmRelocationArm) {
- CcTest::InitializeVM();
+TEST(WasmRelocationArmMemoryReference) {
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::internal::byte buffer[4096];
@@ -77,4 +76,59 @@
#endif
}
+TEST(WasmRelocationArmMemorySizeReference) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ v8::internal::byte buffer[4096];
+ DummyStaticFunction(NULL);
+ int32_t size = 512;
+ Label fail;
+
+ Assembler assm(isolate, buffer, sizeof buffer);
+
+ __ mov(r0, Operand(size, RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ cmp(r0, Operand(size, RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ b(ne, &fail);
+ __ mov(pc, Operand(lr));
+ __ bind(&fail);
+ __ mov(r0, Operand(0xdeadbeef));
+ __ mov(pc, Operand(lr));
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ CSignature0<int32_t> csig;
+ CodeRunner<int32_t> runnable(isolate, code, &csig);
+ int32_t ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef DEBUG
+ OFStream os(stdout);
+ code->Print(os);
+ ::printf("f() = %d\n\n", ret_value);
+#endif
+ size_t diff = 512;
+
+ int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemorySizeReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(
+ reinterpret_cast<Address>(1234), reinterpret_cast<Address>(1234),
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + diff, SKIP_ICACHE_FLUSH);
+ }
+ }
+
+ ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef DEBUG
+ code->Print(os);
+ ::printf("f() = %d\n\n", ret_value);
+#endif
+}
#undef __
diff --git a/test/cctest/test-run-wasm-relocation-arm64.cc b/test/cctest/test-run-wasm-relocation-arm64.cc
index 48f9e85..3b49f00 100644
--- a/test/cctest/test-run-wasm-relocation-arm64.cc
+++ b/test/cctest/test-run-wasm-relocation-arm64.cc
@@ -24,8 +24,7 @@
static int64_t DummyStaticFunction(Object* result) { return 1; }
-TEST(WasmRelocationArm64) {
- CcTest::InitializeVM();
+TEST(WasmRelocationArm64MemoryReference) {
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::internal::byte buffer[4096];
@@ -51,7 +50,7 @@
#ifdef DEBUG
OFStream os(stdout);
code->Print(os);
- ::printf("f() = %ld\n\n", ret_value);
+ ::printf("f() = %" PRIx64 "\n\n", ret_value);
#endif
size_t offset = 1234;
@@ -75,7 +74,64 @@
#ifdef DEBUG
code->Print(os);
- ::printf("f() = %ld\n\n", ret_value);
+ ::printf("f() = %" PRIx64 "\n\n", ret_value);
+#endif
+}
+
+TEST(WasmRelocationArm64MemorySizeReference) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ v8::internal::byte buffer[4096];
+ DummyStaticFunction(NULL);
+ Immediate size = Immediate(512, RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ Label fail;
+
+ MacroAssembler masm(isolate, buffer, sizeof buffer,
+ v8::internal::CodeObjectRequired::kYes);
+
+ __ Mov(x0, size);
+ __ Cmp(x0, size);
+ __ B(ne, &fail);
+ __ Ret();
+ __ Bind(&fail);
+ __ Mov(x0, Immediate(0xdeadbeef));
+ __ Ret();
+
+ CodeDesc desc;
+ masm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+ CSignature0<int64_t> csig;
+ CodeRunner<int64_t> runnable(isolate, code, &csig);
+ int64_t ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef DEBUG
+ OFStream os(stdout);
+ code->Print(os);
+ ::printf("f() = %" PRIx64 "\n\n", ret_value);
+#endif
+ int32_t diff = 512;
+
+ int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemorySizeReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(
+ reinterpret_cast<Address>(0x1234), reinterpret_cast<Address>(0x1234),
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + diff, SKIP_ICACHE_FLUSH);
+ }
+ }
+
+ ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef DEBUG
+ code->Print(os);
+ ::printf("f() = %" PRIx64 "\n\n", ret_value);
#endif
}
diff --git a/test/cctest/test-run-wasm-relocation-ia32.cc b/test/cctest/test-run-wasm-relocation-ia32.cc
index 135b522..305d008 100644
--- a/test/cctest/test-run-wasm-relocation-ia32.cc
+++ b/test/cctest/test-run-wasm-relocation-ia32.cc
@@ -23,8 +23,7 @@
static int32_t DummyStaticFunction(Object* result) { return 1; }
-TEST(WasmRelocationIa32) {
- CcTest::InitializeVM();
+TEST(WasmRelocationIa32MemoryReference) {
Isolate* isolate = CcTest::i_isolate();
Zone zone(isolate->allocator());
HandleScope scope(isolate);
@@ -78,7 +77,6 @@
CHECK_EQ(ret_value, imm + offset);
#ifdef OBJECT_PRINT
- // OFStream os(stdout);
code->Print(os);
begin = code->instruction_start();
end = begin + code->instruction_size();
@@ -86,4 +84,67 @@
#endif
}
+TEST(WasmRelocationIa32MemorySizeReference) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ Zone zone(isolate->allocator());
+ HandleScope scope(isolate);
+ v8::internal::byte buffer[4096];
+ Assembler assm(isolate, buffer, sizeof buffer);
+ DummyStaticFunction(NULL);
+ int32_t size = 80;
+ Label fail;
+
+ __ mov(eax, Immediate(reinterpret_cast<Address>(size),
+ RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ cmp(eax, Immediate(reinterpret_cast<Address>(size),
+ RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ j(not_equal, &fail);
+ __ ret(0);
+ __ bind(&fail);
+ __ mov(eax, 0xdeadbeef);
+ __ ret(0);
+
+ CSignature0<int32_t> csig;
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ USE(code);
+
+ CodeRunner<int32_t> runnable(isolate, code, &csig);
+ int32_t ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ OFStream os(stdout);
+ code->Print(os);
+ byte* begin = code->instruction_start();
+ byte* end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+
+ size_t offset = 10;
+
+ int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemorySizeReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(
+ reinterpret_cast<Address>(1234), reinterpret_cast<Address>(1234),
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + offset, SKIP_ICACHE_FLUSH);
+ }
+ }
+
+ ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ code->Print(os);
+ begin = code->instruction_start();
+ end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+}
#undef __
diff --git a/test/cctest/test-run-wasm-relocation-x64.cc b/test/cctest/test-run-wasm-relocation-x64.cc
index f1b6d96..11fa451 100644
--- a/test/cctest/test-run-wasm-relocation-x64.cc
+++ b/test/cctest/test-run-wasm-relocation-x64.cc
@@ -21,8 +21,8 @@
#define __ assm.
static int32_t DummyStaticFunction(Object* result) { return 1; }
-TEST(WasmRelocationX64movq64) {
- CcTest::InitializeVM();
+
+TEST(WasmRelocationX64MemoryReference) {
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::internal::byte buffer[4096];
@@ -80,4 +80,63 @@
#endif
}
+TEST(WasmRelocationX64WasmMemorySizeReference) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ v8::internal::byte buffer[4096];
+ Assembler assm(isolate, buffer, sizeof buffer);
+ DummyStaticFunction(NULL);
+ int32_t size = 512;
+ Label fail;
+
+ __ movl(rax, Immediate(size, RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ cmpl(rax, Immediate(size, RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ j(not_equal, &fail);
+ __ ret(0);
+ __ bind(&fail);
+ __ movl(rax, Immediate(0xdeadbeef));
+ __ ret(0);
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ USE(code);
+
+ CSignature0<int64_t> csig;
+ CodeRunner<int64_t> runnable(isolate, code, &csig);
+ int64_t ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ OFStream os(stdout);
+ code->Print(os);
+ byte* begin = code->instruction_start();
+ byte* end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+ int32_t diff = 512;
+
+ int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemorySizeReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(
+ reinterpret_cast<Address>(1234), reinterpret_cast<Address>(1234),
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + diff, SKIP_ICACHE_FLUSH);
+ }
+ }
+
+ ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ code->Print(os);
+ begin = code->instruction_start();
+ end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+}
#undef __
diff --git a/test/cctest/test-run-wasm-relocation-x87.cc b/test/cctest/test-run-wasm-relocation-x87.cc
index 6cbd065..2156e96 100644
--- a/test/cctest/test-run-wasm-relocation-x87.cc
+++ b/test/cctest/test-run-wasm-relocation-x87.cc
@@ -23,8 +23,7 @@
static int32_t DummyStaticFunction(Object* result) { return 1; }
-TEST(WasmRelocationIa32) {
- CcTest::InitializeVM();
+TEST(WasmRelocationX87MemoryReference) {
Isolate* isolate = CcTest::i_isolate();
Zone zone(isolate->allocator());
HandleScope scope(isolate);
@@ -78,7 +77,6 @@
CHECK_EQ(ret_value, imm + offset);
#ifdef OBJECT_PRINT
- // OFStream os(stdout);
code->Print(os);
begin = code->instruction_start();
end = begin + code->instruction_size();
@@ -86,4 +84,67 @@
#endif
}
+TEST(WasmRelocationX87MemorySizeReference) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ Zone zone(isolate->allocator());
+ HandleScope scope(isolate);
+ v8::internal::byte buffer[4096];
+ Assembler assm(isolate, buffer, sizeof buffer);
+ DummyStaticFunction(NULL);
+ int32_t size = 80;
+ Label fail;
+
+ __ mov(eax, Immediate(reinterpret_cast<Address>(size),
+ RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ cmp(eax, Immediate(reinterpret_cast<Address>(size),
+ RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ __ j(not_equal, &fail);
+ __ ret(0);
+ __ bind(&fail);
+ __ mov(eax, 0xdeadbeef);
+ __ ret(0);
+
+ CSignature0<int32_t> csig;
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ USE(code);
+
+ CodeRunner<int32_t> runnable(isolate, code, &csig);
+ int32_t ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ OFStream os(stdout);
+ code->Print(os);
+ byte* begin = code->instruction_start();
+ byte* end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+
+ size_t offset = 10;
+
+ int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+ RelocInfo::Mode mode = it.rinfo()->rmode();
+ if (RelocInfo::IsWasmMemorySizeReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(
+ reinterpret_cast<Address>(1234), reinterpret_cast<Address>(1234),
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + offset, SKIP_ICACHE_FLUSH);
+ }
+ }
+
+ ret_value = runnable.Call();
+ CHECK_NE(ret_value, 0xdeadbeef);
+
+#ifdef OBJECT_PRINT
+ code->Print(os);
+ begin = code->instruction_start();
+ end = begin + code->instruction_size();
+ disasm::Disassembler::Disassemble(stdout, begin, end);
+#endif
+}
#undef __
diff --git a/test/cctest/test-typing-reset.cc b/test/cctest/test-typing-reset.cc
deleted file mode 100644
index 4e9413a..0000000
--- a/test/cctest/test-typing-reset.cc
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdlib.h>
-
-#include "src/v8.h"
-
-#include "src/ast/ast.h"
-#include "src/ast/ast-expression-visitor.h"
-#include "src/ast/scopes.h"
-#include "src/parsing/parser.h"
-#include "src/parsing/rewriter.h"
-#include "src/typing-reset.h"
-#include "test/cctest/cctest.h"
-#include "test/cctest/compiler/function-tester.h"
-#include "test/cctest/expression-type-collector.h"
-#include "test/cctest/expression-type-collector-macros.h"
-
-#define INT32_TYPE Bounds(Type::Signed32(), Type::Signed32())
-
-using namespace v8::internal;
-
-namespace {
-
-class TypeSetter : public AstExpressionVisitor {
- public:
- TypeSetter(Isolate* isolate, FunctionLiteral* root)
- : AstExpressionVisitor(isolate, root) {}
-
- protected:
- void VisitExpression(Expression* expression) {
- expression->set_bounds(INT32_TYPE);
- }
-};
-
-
-void CheckAllSame(ZoneVector<ExpressionTypeEntry>& types,
- Bounds expected_type) {
- CHECK_TYPES_BEGIN {
- // function logSum
- CHECK_EXPR(FunctionLiteral, expected_type) {
- CHECK_EXPR(FunctionLiteral, expected_type) {
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(start, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(start, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(sum, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(q, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- // for (p = start << 3, q = end << 3;
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(start, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(q, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- }
- // (p|0) < (q|0);
- CHECK_EXPR(CompareOperation, expected_type) {
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(q, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // p = (p + 8)|0) {\n"
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // sum = sum + +log(values[p>>3]);
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(sum, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(sum, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(Call, expected_type) {
- CHECK_VAR(log, expected_type);
- CHECK_EXPR(Property, expected_type) {
- CHECK_VAR(values, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(p, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- }
- // return +sum;
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(sum, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // function geometricMean
- CHECK_EXPR(FunctionLiteral, expected_type) {
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(start, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(start, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // return +exp(+logSum(start, end) / +((end - start)|0));
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(Call, expected_type) {
- CHECK_VAR(exp, expected_type);
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(Call, expected_type) {
- CHECK_VAR(logSum, expected_type);
- CHECK_VAR(start, expected_type);
- CHECK_VAR(end, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_EXPR(BinaryOperation, expected_type) {
- CHECK_VAR(end, expected_type);
- CHECK_VAR(start, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // "use asm";
- CHECK_EXPR(Literal, expected_type);
- // var exp = stdlib.Math.exp;
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(exp, expected_type);
- CHECK_EXPR(Property, expected_type) {
- CHECK_EXPR(Property, expected_type) {
- CHECK_VAR(stdlib, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // var log = stdlib.Math.log;
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(log, expected_type);
- CHECK_EXPR(Property, expected_type) {
- CHECK_EXPR(Property, expected_type) {
- CHECK_VAR(stdlib, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_EXPR(Literal, expected_type);
- }
- }
- // var values = new stdlib.Float64Array(buffer);
- CHECK_EXPR(Assignment, expected_type) {
- CHECK_VAR(values, expected_type);
- CHECK_EXPR(CallNew, expected_type) {
- CHECK_EXPR(Property, expected_type) {
- CHECK_VAR(stdlib, expected_type);
- CHECK_EXPR(Literal, expected_type);
- }
- CHECK_VAR(buffer, expected_type);
- }
- }
- // return { geometricMean: geometricMean };
- CHECK_EXPR(ObjectLiteral, expected_type) {
- CHECK_VAR(geometricMean, expected_type);
- }
- }
- }
- CHECK_TYPES_END
-}
-
-} // namespace
-
-
-TEST(ResetTypingInfo) {
- const char test_function[] =
- "function GeometricMean(stdlib, foreign, buffer) {\n"
- " \"use asm\";\n"
- "\n"
- " var exp = stdlib.Math.exp;\n"
- " var log = stdlib.Math.log;\n"
- " var values = new stdlib.Float64Array(buffer);\n"
- "\n"
- " function logSum(start, end) {\n"
- " start = start|0;\n"
- " end = end|0;\n"
- "\n"
- " var sum = 0.0, p = 0, q = 0;\n"
- "\n"
- " // asm.js forces byte addressing of the heap by requiring shifting "
- "by 3\n"
- " for (p = start << 3, q = end << 3; (p|0) < (q|0); p = (p + 8)|0) {\n"
- " sum = sum + +log(values[p>>3]);\n"
- " }\n"
- "\n"
- " return +sum;\n"
- " }\n"
- "\n"
- " function geometricMean(start, end) {\n"
- " start = start|0;\n"
- " end = end|0;\n"
- "\n"
- " return +exp(+logSum(start, end) / +((end - start)|0));\n"
- " }\n"
- "\n"
- " return { geometricMean: geometricMean };\n"
- "}\n";
-
- v8::V8::Initialize();
- HandleAndZoneScope handles;
-
- i::Isolate* isolate = CcTest::i_isolate();
- i::Factory* factory = isolate->factory();
-
- i::Handle<i::String> source_code =
- factory->NewStringFromUtf8(i::CStrVector(test_function))
- .ToHandleChecked();
-
- i::Handle<i::Script> script = factory->NewScript(source_code);
-
- i::ParseInfo info(handles.main_zone(), script);
- i::Parser parser(&info);
- parser.set_allow_harmony_sloppy(true);
- info.set_global();
- info.set_lazy(false);
- info.set_allow_lazy_parsing(false);
- info.set_toplevel(true);
-
- CHECK(i::Compiler::ParseAndAnalyze(&info));
- FunctionLiteral* root =
- info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
-
- // Core of the test.
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- ExpressionTypeCollector(isolate, root, &types).Run();
- CheckAllSame(types, Bounds::Unbounded());
-
- TypeSetter(isolate, root).Run();
-
- ExpressionTypeCollector(isolate, root, &types).Run();
- CheckAllSame(types, INT32_TYPE);
-
- TypingReseter(isolate, root).Run();
-
- ExpressionTypeCollector(isolate, root, &types).Run();
- CheckAllSame(types, Bounds::Unbounded());
-}
diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
index 7fc9b5b..39f8fbf 100644
--- a/test/cctest/test-unboxed-doubles.cc
+++ b/test/cctest/test-unboxed-doubles.cc
@@ -1504,10 +1504,12 @@
CHECK_EQ(boom_value, obj->RawFastDoublePropertyAt(double_field_index));
}
-
-enum WriteBarrierKind { OLD_TO_OLD_WRITE_BARRIER, OLD_TO_NEW_WRITE_BARRIER };
+enum OldToWriteBarrierKind {
+ OLD_TO_OLD_WRITE_BARRIER,
+ OLD_TO_NEW_WRITE_BARRIER
+};
static void TestWriteBarrierObjectShiftFieldsRight(
- WriteBarrierKind write_barrier_kind) {
+ OldToWriteBarrierKind write_barrier_kind) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::HandleScope scope(CcTest::isolate());
diff --git a/test/cctest/test-weakmaps.cc b/test/cctest/test-weakmaps.cc
index 781ad1f..829f320 100644
--- a/test/cctest/test-weakmaps.cc
+++ b/test/cctest/test-weakmaps.cc
@@ -52,8 +52,7 @@
}
static int NumberOfWeakCalls = 0;
-static void WeakPointerCallback(
- const v8::WeakCallbackData<v8::Value, void>& data) {
+static void WeakPointerCallback(const v8::WeakCallbackInfo<void>& data) {
std::pair<v8::Persistent<v8::Value>*, int>* p =
reinterpret_cast<std::pair<v8::Persistent<v8::Value>*, int>*>(
data.GetParameter());
@@ -107,20 +106,12 @@
{
HandleScope scope(isolate);
std::pair<Handle<Object>*, int> handle_and_id(&key, 1234);
- GlobalHandles::MakeWeak(key.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ key.location(), reinterpret_cast<void*>(&handle_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
}
CHECK(global_handles->IsWeak(key.location()));
- // Force a full GC.
- // Perform two consecutive GCs because the first one will only clear
- // weak references whereas the second one will also clear weak maps.
- heap->CollectAllGarbage(false);
- CHECK_EQ(1, NumberOfWeakCalls);
- CHECK_EQ(2, ObjectHashTable::cast(weakmap->table())->NumberOfElements());
- CHECK_EQ(
- 0, ObjectHashTable::cast(weakmap->table())->NumberOfDeletedElements());
heap->CollectAllGarbage(false);
CHECK_EQ(1, NumberOfWeakCalls);
CHECK_EQ(0, ObjectHashTable::cast(weakmap->table())->NumberOfElements());
diff --git a/test/cctest/test-weaksets.cc b/test/cctest/test-weaksets.cc
index 643bb48..53a5913 100644
--- a/test/cctest/test-weaksets.cc
+++ b/test/cctest/test-weaksets.cc
@@ -55,8 +55,7 @@
}
static int NumberOfWeakCalls = 0;
-static void WeakPointerCallback(
- const v8::WeakCallbackData<v8::Value, void>& data) {
+static void WeakPointerCallback(const v8::WeakCallbackInfo<void>& data) {
std::pair<v8::Persistent<v8::Value>*, int>* p =
reinterpret_cast<std::pair<v8::Persistent<v8::Value>*, int>*>(
data.GetParameter());
@@ -106,20 +105,12 @@
{
HandleScope scope(isolate);
std::pair<Handle<Object>*, int> handle_and_id(&key, 1234);
- GlobalHandles::MakeWeak(key.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &WeakPointerCallback);
+ GlobalHandles::MakeWeak(
+ key.location(), reinterpret_cast<void*>(&handle_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
}
CHECK(global_handles->IsWeak(key.location()));
- // Force a full GC.
- // Perform two consecutive GCs because the first one will only clear
- // weak references whereas the second one will also clear weak sets.
- heap->CollectAllGarbage(false);
- CHECK_EQ(1, NumberOfWeakCalls);
- CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
- CHECK_EQ(
- 0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
heap->CollectAllGarbage(false);
CHECK_EQ(1, NumberOfWeakCalls);
CHECK_EQ(0, ObjectHashTable::cast(weakset->table())->NumberOfElements());
diff --git a/test/cctest/trace-extension.cc b/test/cctest/trace-extension.cc
index 77a29e9..6eb81b2 100644
--- a/test/cctest/trace-extension.cc
+++ b/test/cctest/trace-extension.cc
@@ -27,7 +27,7 @@
#include "test/cctest/trace-extension.h"
-#include "src/profiler/sampler.h"
+#include "src/profiler/tick-sample.h"
#include "src/vm-state-inl.h"
#include "test/cctest/cctest.h"
diff --git a/test/cctest/wasm/test-run-wasm-64.cc b/test/cctest/wasm/test-run-wasm-64.cc
index 784f21a..333183a 100644
--- a/test/cctest/wasm/test-run-wasm-64.cc
+++ b/test/cctest/wasm/test-run-wasm-64.cc
@@ -24,20 +24,14 @@
#define asu64(x) static_cast<uint64_t>(x)
-#define B2(a, b) kExprBlock, 2, a, b
-#define B1(a) kExprBlock, 1, a
+#define B2(a, b) kExprBlock, a, b, kExprEnd
+#define B1(a) kExprBlock, a, kExprEnd
// Can't bridge macro land with nested macros.
-#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_X87
-#define MIPS_OR_X87 true
+#if V8_TARGET_ARCH_MIPS
+#define MIPS true
#else
-#define MIPS_OR_X87 false
-#endif
-
-#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_X87 || V8_TARGET_ARCH_ARM
-#define MIPS_OR_ARM_OR_X87 true
-#else
-#define MIPS_OR_ARM_OR_X87 false
+#define MIPS false
#endif
#define FOREACH_I64_OPERATOR(V) \
@@ -47,9 +41,9 @@
V(I64Return, true) \
V(I64Param, true) \
V(I64LoadStore, true) \
- V(I64Add, !MIPS_OR_X87) \
- V(I64Sub, !MIPS_OR_X87) \
- V(I64Mul, !MIPS_OR_X87) \
+ V(I64Add, true) \
+ V(I64Sub, true) \
+ V(I64Mul, !MIPS) \
V(I64DivS, true) \
V(I64DivU, true) \
V(I64RemS, true) \
@@ -57,9 +51,9 @@
V(I64And, true) \
V(I64Ior, true) \
V(I64Xor, true) \
- V(I64Shl, !MIPS_OR_X87) \
- V(I64ShrU, !MIPS_OR_X87) \
- V(I64ShrS, !MIPS_OR_X87) \
+ V(I64Shl, true) \
+ V(I64ShrU, true) \
+ V(I64ShrS, true) \
V(I64Eq, true) \
V(I64Ne, true) \
V(I64LtS, true) \
@@ -72,7 +66,7 @@
V(I64GeU, true) \
V(I64Ctz, true) \
V(I64Clz, true) \
- V(I64Popcnt, !MIPS_OR_X87) \
+ V(I64Popcnt, true) \
V(I32ConvertI64, true) \
V(I64SConvertF32, true) \
V(I64SConvertF64, true) \
@@ -96,7 +90,7 @@
#define REQUIRE(name) \
if (!WASM_64 && !kSupported_##name) return
-TEST(Run_Wasm_I64Const) {
+WASM_EXEC_TEST(I64Const) {
REQUIRE(I64Const);
WasmRunner<int64_t> r;
const int64_t kExpectedValue = 0x1122334455667788LL;
@@ -105,7 +99,7 @@
CHECK_EQ(kExpectedValue, r.Call());
}
-TEST(Run_Wasm_I64Const_many) {
+WASM_EXEC_TEST(I64Const_many) {
REQUIRE(I64Const);
int cntr = 0;
FOR_INT32_INPUTS(i) {
@@ -118,19 +112,16 @@
}
}
-TEST(Run_Wasm_Return_I64) {
+WASM_EXEC_TEST(Return_I64) {
REQUIRE(I64Return);
WasmRunner<int64_t> r(MachineType::Int64());
- BUILD(r, WASM_RETURN(WASM_GET_LOCAL(0)));
+ BUILD(r, WASM_RETURN1(WASM_GET_LOCAL(0)));
FOR_INT64_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-// todo(ahaas): I added a list of missing instructions here to make merging
-// easier when I do them one by one.
-// kExprI64Add:
-TEST(Run_WasmI64Add) {
+WASM_EXEC_TEST(I64Add) {
REQUIRE(I64Add);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -138,8 +129,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i + *j, r.Call(*i, *j)); }
}
}
-// kExprI64Sub:
-TEST(Run_Wasm_I64Sub) {
+
+WASM_EXEC_TEST(I64Sub) {
REQUIRE(I64Sub);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -147,10 +138,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i - *j, r.Call(*i, *j)); }
}
}
-// kExprI64Mul:
-// kExprI64DivS:
-TEST(Run_WasmI64DivS) {
+WASM_EXEC_TEST(I64DivS) {
REQUIRE(I64DivS);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -167,7 +156,7 @@
}
}
-TEST(Run_WasmI64DivS_Trap) {
+WASM_EXEC_TEST(I64DivS_Trap) {
REQUIRE(I64DivS);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -178,7 +167,7 @@
CHECK_TRAP64(r.Call(std::numeric_limits<int64_t>::min(), asi64(0)));
}
-TEST(Run_WasmI64DivS_Byzero_Const) {
+WASM_EXEC_TEST(I64DivS_Byzero_Const) {
REQUIRE(I64DivS);
for (int8_t denom = -2; denom < 8; denom++) {
WasmRunner<int64_t> r(MachineType::Int64());
@@ -192,9 +181,8 @@
}
}
}
-// kExprI64DivU:
-TEST(Run_WasmI64DivU) {
+WASM_EXEC_TEST(I64DivU) {
REQUIRE(I64DivU);
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
BUILD(r, WASM_I64_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -209,7 +197,7 @@
}
}
-TEST(Run_WasmI64DivU_Trap) {
+WASM_EXEC_TEST(I64DivU_Trap) {
REQUIRE(I64DivU);
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
BUILD(r, WASM_I64_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -219,7 +207,7 @@
CHECK_TRAP64(r.Call(std::numeric_limits<uint64_t>::max(), asu64(0)));
}
-TEST(Run_WasmI64DivU_Byzero_Const) {
+WASM_EXEC_TEST(I64DivU_Byzero_Const) {
REQUIRE(I64DivU);
for (uint64_t denom = 0xfffffffffffffffe; denom < 8; denom++) {
WasmRunner<uint64_t> r(MachineType::Uint64());
@@ -234,8 +222,8 @@
}
}
}
-// kExprI64RemS:
-TEST(Run_WasmI64RemS) {
+
+WASM_EXEC_TEST(I64RemS) {
REQUIRE(I64RemS);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -250,7 +238,7 @@
}
}
-TEST(Run_WasmI64RemS_Trap) {
+WASM_EXEC_TEST(I64RemS_Trap) {
REQUIRE(I64RemS);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -261,8 +249,7 @@
CHECK_TRAP64(r.Call(std::numeric_limits<int64_t>::min(), asi64(0)));
}
-// kExprI64RemU:
-TEST(Run_WasmI64RemU) {
+WASM_EXEC_TEST(I64RemU) {
REQUIRE(I64RemU);
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
BUILD(r, WASM_I64_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -277,7 +264,7 @@
}
}
-TEST(Run_Wasm_I64RemU_Trap) {
+WASM_EXEC_TEST(I64RemU_Trap) {
REQUIRE(I64RemU);
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
BUILD(r, WASM_I64_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -287,8 +274,7 @@
CHECK_TRAP64(r.Call(std::numeric_limits<uint64_t>::max(), asu64(0)));
}
-// kExprI64And:
-TEST(Run_Wasm_I64And) {
+WASM_EXEC_TEST(I64And) {
REQUIRE(I64And);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_AND(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -296,8 +282,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) & (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Ior:
-TEST(Run_Wasm_I64Ior) {
+
+WASM_EXEC_TEST(I64Ior) {
REQUIRE(I64Ior);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_IOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -305,8 +291,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) | (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Xor:
-TEST(Run_Wasm_I64Xor) {
+
+WASM_EXEC_TEST(I64Xor) {
REQUIRE(I64Xor);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_XOR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -314,8 +300,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ((*i) ^ (*j), r.Call(*i, *j)); }
}
}
-// kExprI64Shl:
-TEST(Run_Wasm_I64Shl) {
+
+WASM_EXEC_TEST(I64Shl) {
REQUIRE(I64Shl);
{
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
@@ -349,8 +335,8 @@
FOR_UINT64_INPUTS(i) { CHECK_EQ(*i << 40, r.Call(*i)); }
}
}
-// kExprI64ShrU:
-TEST(Run_Wasm_I64ShrU) {
+
+WASM_EXEC_TEST(I64ShrU) {
REQUIRE(I64ShrU);
{
WasmRunner<uint64_t> r(MachineType::Uint64(), MachineType::Uint64());
@@ -384,8 +370,8 @@
FOR_UINT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); }
}
}
-// kExprI64ShrS:
-TEST(Run_Wasm_I64ShrS) {
+
+WASM_EXEC_TEST(I64ShrS) {
REQUIRE(I64ShrS);
{
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
@@ -419,8 +405,8 @@
FOR_INT64_INPUTS(i) { CHECK_EQ(*i >> 40, r.Call(*i)); }
}
}
-// kExprI64Eq:
-TEST(Run_Wasm_I64Eq) {
+
+WASM_EXEC_TEST(I64Eq) {
REQUIRE(I64Eq);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -428,8 +414,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i == *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI64Ne:
-TEST(Run_Wasm_I64Ne) {
+
+WASM_EXEC_TEST(I64Ne) {
REQUIRE(I64Ne);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_NE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -437,8 +423,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i != *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI64LtS:
-TEST(Run_Wasm_I64LtS) {
+
+WASM_EXEC_TEST(I64LtS) {
REQUIRE(I64LtS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_LTS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -446,7 +432,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i < *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-TEST(Run_Wasm_I64LeS) {
+
+WASM_EXEC_TEST(I64LeS) {
REQUIRE(I64LeS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_LES(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -454,7 +441,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i <= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-TEST(Run_Wasm_I64LtU) {
+
+WASM_EXEC_TEST(I64LtU) {
REQUIRE(I64LtU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_LTU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -462,7 +450,8 @@
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i < *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-TEST(Run_Wasm_I64LeU) {
+
+WASM_EXEC_TEST(I64LeU) {
REQUIRE(I64LeU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_LEU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -470,7 +459,8 @@
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i <= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-TEST(Run_Wasm_I64GtS) {
+
+WASM_EXEC_TEST(I64GtS) {
REQUIRE(I64GtS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_GTS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -478,7 +468,8 @@
FOR_INT64_INPUTS(j) { CHECK_EQ(*i > *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-TEST(Run_Wasm_I64GeS) {
+
+WASM_EXEC_TEST(I64GeS) {
REQUIRE(I64GeS);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_GES(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -487,7 +478,7 @@
}
}
-TEST(Run_Wasm_I64GtU) {
+WASM_EXEC_TEST(I64GtU) {
REQUIRE(I64GtU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_GTU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -496,7 +487,7 @@
}
}
-TEST(Run_Wasm_I64GeU) {
+WASM_EXEC_TEST(I64GeU) {
REQUIRE(I64GeU);
WasmRunner<int32_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_GEU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -504,8 +495,8 @@
FOR_UINT64_INPUTS(j) { CHECK_EQ(*i >= *j ? 1 : 0, r.Call(*i, *j)); }
}
}
-// kExprI32ConvertI64:
-TEST(Run_Wasm_I32ConvertI64) {
+
+WASM_EXEC_TEST(I32ConvertI64) {
REQUIRE(I32ConvertI64);
FOR_INT64_INPUTS(i) {
WasmRunner<int32_t> r;
@@ -513,29 +504,22 @@
CHECK_EQ(static_cast<int32_t>(*i), r.Call());
}
}
-// kExprI64SConvertI32:
-TEST(Run_Wasm_I64SConvertI32) {
+
+WASM_EXEC_TEST(I64SConvertI32) {
REQUIRE(I64SConvertI32);
WasmRunner<int64_t> r(MachineType::Int32());
BUILD(r, WASM_I64_SCONVERT_I32(WASM_GET_LOCAL(0)));
FOR_INT32_INPUTS(i) { CHECK_EQ(static_cast<int64_t>(*i), r.Call(*i)); }
}
-// kExprI64UConvertI32:
-TEST(Run_Wasm_I64UConvertI32) {
+WASM_EXEC_TEST(I64UConvertI32) {
REQUIRE(I64UConvertI32);
WasmRunner<int64_t> r(MachineType::Uint32());
BUILD(r, WASM_I64_UCONVERT_I32(WASM_GET_LOCAL(0)));
FOR_UINT32_INPUTS(i) { CHECK_EQ(static_cast<uint64_t>(*i), r.Call(*i)); }
}
-// kExprF64ReinterpretI64:
-// kExprI64ReinterpretF64:
-
-// kExprI64Clz:
-// kExprI64Ctz:
-// kExprI64Popcnt:
-TEST(Run_WasmI64Popcnt) {
+WASM_EXEC_TEST(I64Popcnt) {
struct {
int64_t expected;
uint64_t input;
@@ -552,15 +536,14 @@
}
}
-// kExprF32SConvertI64:
-TEST(Run_WasmF32SConvertI64) {
+WASM_EXEC_TEST(F32SConvertI64) {
REQUIRE(F32SConvertI64);
WasmRunner<float> r(MachineType::Int64());
BUILD(r, WASM_F32_SCONVERT_I64(WASM_GET_LOCAL(0)));
FOR_INT64_INPUTS(i) { CHECK_FLOAT_EQ(static_cast<float>(*i), r.Call(*i)); }
}
-// kExprF32UConvertI64:
-TEST(Run_WasmF32UConvertI64) {
+
+WASM_EXEC_TEST(F32UConvertI64) {
REQUIRE(F32UConvertI64);
struct {
uint64_t input;
@@ -647,15 +630,15 @@
CHECK_EQ(bit_cast<float>(values[i].expected), r.Call(values[i].input));
}
}
-// kExprF64SConvertI64:
-TEST(Run_WasmF64SConvertI64) {
+
+WASM_EXEC_TEST(F64SConvertI64) {
REQUIRE(F64SConvertI64);
WasmRunner<double> r(MachineType::Int64());
BUILD(r, WASM_F64_SCONVERT_I64(WASM_GET_LOCAL(0)));
FOR_INT64_INPUTS(i) { CHECK_DOUBLE_EQ(static_cast<double>(*i), r.Call(*i)); }
}
-// kExprF64UConvertI64:
-TEST(Run_Wasm_F64UConvertI64) {
+
+WASM_EXEC_TEST(F64UConvertI64) {
REQUIRE(F64UConvertI64);
struct {
uint64_t input;
@@ -741,9 +724,8 @@
CHECK_EQ(bit_cast<double>(values[i].expected), r.Call(values[i].input));
}
}
-// kExprI64SConvertF32:
-TEST(Run_Wasm_I64SConvertF32a) {
+WASM_EXEC_TEST(I64SConvertF32a) {
WasmRunner<int64_t> r(MachineType::Float32());
BUILD(r, WASM_I64_SCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -756,8 +738,8 @@
}
}
}
-// kExprI64SConvertF64:
-TEST(Run_Wasm_I64SConvertF64a) {
+
+WASM_EXEC_TEST(I64SConvertF64a) {
WasmRunner<int64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -771,8 +753,7 @@
}
}
-// kExprI64UConvertF32:
-TEST(Run_Wasm_I64UConvertF32a) {
+WASM_EXEC_TEST(I64UConvertF32a) {
WasmRunner<uint64_t> r(MachineType::Float32());
BUILD(r, WASM_I64_UCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -786,8 +767,7 @@
}
}
-// kExprI64UConvertF64:
-TEST(Run_Wasm_I64UConvertF64a) {
+WASM_EXEC_TEST(I64UConvertF64a) {
WasmRunner<uint64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_UCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -801,7 +781,7 @@
}
}
-TEST(Run_WasmCallI64Parameter) {
+WASM_EXEC_TEST(CallI64Parameter) {
// Build the target function.
LocalType param_types[20];
for (int i = 0; i < 20; i++) param_types[i] = kAstI64;
@@ -822,8 +802,8 @@
WasmRunner<int32_t> r(&module);
BUILD(
r,
- WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION(
- index, WASM_I64V_9(0xbcd12340000000b),
+ WASM_I32_CONVERT_I64(WASM_CALL_FUNCTIONN(
+ 19, index, WASM_I64V_9(0xbcd12340000000b),
WASM_I64V_9(0xbcd12340000000c), WASM_I32V_1(0xd),
WASM_I32_CONVERT_I64(WASM_I64V_9(0xbcd12340000000e)),
WASM_I64V_9(0xbcd12340000000f), WASM_I64V_10(0xbcd1234000000010),
@@ -875,7 +855,7 @@
TestI64Binop(kExpr##name, expected, a, b); \
} while (false)
-TEST(Run_Wasm_I64Binops) {
+WASM_EXEC_TEST(I64Binops) {
TEST_I64_BINOP(I64Add, -5586332274295447011, 0x501b72ebabc26847,
0x625de9793d8f79d6);
TEST_I64_BINOP(I64Sub, 9001903251710731490, 0xf24fe6474640002e,
@@ -912,7 +892,7 @@
if (WASM_64 || kSupported_##name) TestI64Cmp(kExpr##name, expected, a, b); \
} while (false)
-TEST(Run_Wasm_I64Compare) {
+WASM_EXEC_TEST(I64Compare) {
TEST_I64_CMP(I64Eq, 0, 0xB915D8FA494064F0, 0x04D700B2536019A3);
TEST_I64_CMP(I64Ne, 1, 0xC2FAFAAAB0446CDC, 0x52A3328F780C97A3);
TEST_I64_CMP(I64LtS, 0, 0x673636E6306B0578, 0x028EC9ECA78F7227);
@@ -925,7 +905,7 @@
TEST_I64_CMP(I64GeU, 0, 0x0886A0C58C7AA224, 0x5DDBE5A81FD7EE47);
}
-TEST(Run_Wasm_I64Clz) {
+WASM_EXEC_TEST(I64Clz) {
REQUIRE(I64Clz);
struct {
int64_t expected;
@@ -971,7 +951,7 @@
}
}
-TEST(Run_Wasm_I64Ctz) {
+WASM_EXEC_TEST(I64Ctz) {
REQUIRE(I64Ctz);
struct {
int64_t expected;
@@ -1017,7 +997,7 @@
}
}
-TEST(Run_Wasm_I64Popcnt) {
+WASM_EXEC_TEST(I64Popcnt2) {
REQUIRE(I64Popcnt);
struct {
int64_t expected;
@@ -1088,7 +1068,7 @@
}
}
-TEST(Run_WasmCall_Int64Sub) {
+WASM_EXEC_TEST(Call_Int64Sub) {
REQUIRE(I64Sub);
// Build the target function.
TestSignatures sigs;
@@ -1099,7 +1079,7 @@
// Build the caller function.
WasmRunner<int64_t> r(&module, MachineType::Int64(), MachineType::Int64());
- BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ BUILD(r, WASM_CALL_FUNCTION2(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
FOR_INT32_INPUTS(i) {
FOR_INT32_INPUTS(j) {
@@ -1115,7 +1095,7 @@
}
}
-TEST(Run_Wasm_LoadStoreI64_sx) {
+WASM_EXEC_TEST(LoadStoreI64_sx) {
REQUIRE(I64LoadStore);
REQUIRE(DepthFirst);
byte loads[] = {kExprI64LoadMem8S, kExprI64LoadMem16S, kExprI64LoadMem32S,
@@ -1126,12 +1106,16 @@
byte* memory = module.AddMemoryElems<byte>(16);
WasmRunner<int64_t> r(&module);
- byte code[] = {kExprI64StoreMem, ZERO_ALIGNMENT,
- ZERO_OFFSET, // --
- kExprI8Const, 8, // --
- loads[m], ZERO_ALIGNMENT,
- ZERO_OFFSET, // --
- kExprI8Const, 0}; // --
+ byte code[] = {
+ kExprI8Const, 8, // --
+ kExprI8Const, 0, // --
+ loads[m], // --
+ ZERO_ALIGNMENT, // --
+ ZERO_OFFSET, // --
+ kExprI64StoreMem, // --
+ ZERO_ALIGNMENT, // --
+ ZERO_OFFSET // --
+ };
r.Build(code, code + arraysize(code));
@@ -1152,7 +1136,7 @@
}
}
-TEST(Run_Wasm_I64SConvertF32b) {
+WASM_EXEC_TEST(I64SConvertF32b) {
REQUIRE(I64SConvertF32);
WasmRunner<int64_t> r(MachineType::Float32());
BUILD(r, WASM_I64_SCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -1167,7 +1151,7 @@
}
}
-TEST(Run_Wasm_I64SConvertF64b) {
+WASM_EXEC_TEST(I64SConvertF64b) {
REQUIRE(I64SConvertF64);
WasmRunner<int64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -1182,7 +1166,7 @@
}
}
-TEST(Run_Wasm_I64UConvertF32b) {
+WASM_EXEC_TEST(I64UConvertF32b) {
REQUIRE(I64UConvertF32);
WasmRunner<uint64_t> r(MachineType::Float32());
BUILD(r, WASM_I64_UCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -1196,7 +1180,7 @@
}
}
-TEST(Run_Wasm_I64UConvertF64b) {
+WASM_EXEC_TEST(I64UConvertF64b) {
REQUIRE(I64UConvertF64);
WasmRunner<uint64_t> r(MachineType::Float64());
BUILD(r, WASM_I64_UCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -1210,7 +1194,7 @@
}
}
-TEST(Run_Wasm_I64ReinterpretF64) {
+WASM_EXEC_TEST(I64ReinterpretF64) {
REQUIRE(I64ReinterpretF64);
TestingModule module;
int64_t* memory = module.AddMemoryElems<int64_t>(8);
@@ -1226,7 +1210,7 @@
}
}
-TEST(Run_Wasm_F64ReinterpretI64) {
+WASM_EXEC_TEST(F64ReinterpretI64) {
REQUIRE(F64ReinterpretI64);
TestingModule module;
int64_t* memory = module.AddMemoryElems<int64_t>(8);
@@ -1244,7 +1228,7 @@
}
}
-TEST(Run_Wasm_LoadMemI64) {
+WASM_EXEC_TEST(LoadMemI64) {
REQUIRE(I64LoadStore);
TestingModule module;
int64_t* memory = module.AddMemoryElems<int64_t>(8);
@@ -1263,7 +1247,7 @@
CHECK_EQ(77777777, r.Call());
}
-TEST(Run_Wasm_MemI64_Sum) {
+WASM_EXEC_TEST(MemI64_Sum) {
REQUIRE(I64LoadStore);
REQUIRE(I64Add);
REQUIRE(I64Sub);
@@ -1299,7 +1283,7 @@
}
}
-TEST(Run_Wasm_I64Global) {
+WASM_EXEC_TEST(I64Global) {
REQUIRE(I64LoadStore);
REQUIRE(I64SConvertI32);
REQUIRE(I64And);
@@ -1321,7 +1305,7 @@
}
}
-TEST(Run_Wasm_I64Eqz) {
+WASM_EXEC_TEST(I64Eqz) {
REQUIRE(I64Eq);
WasmRunner<int32_t> r(MachineType::Int64());
@@ -1333,7 +1317,7 @@
}
}
-TEST(Run_Wasm_I64Ror) {
+WASM_EXEC_TEST(I64Ror) {
REQUIRE(I64Ror);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_ROR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -1346,7 +1330,7 @@
}
}
-TEST(Run_Wasm_I64Rol) {
+WASM_EXEC_TEST(I64Rol) {
REQUIRE(I64Rol);
WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64());
BUILD(r, WASM_I64_ROL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
diff --git a/test/cctest/wasm/test-run-wasm-asmjs.cc b/test/cctest/wasm/test-run-wasm-asmjs.cc
new file mode 100644
index 0000000..c597fc8
--- /dev/null
+++ b/test/cctest/wasm/test-run-wasm-asmjs.cc
@@ -0,0 +1,195 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "src/base/platform/elapsed-timer.h"
+
+#include "src/wasm/wasm-macro-gen.h"
+
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/value-helper.h"
+#include "test/cctest/wasm/test-signatures.h"
+#include "test/cctest/wasm/wasm-run-utils.h"
+
+using namespace v8::base;
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+using namespace v8::internal::wasm;
+
+// for even shorter tests.
+#define B2(a, b) kExprBlock, a, b, kExprEnd
+#define B1(a) kExprBlock, a, kExprEnd
+#define RET(x) x, kExprReturn, 1
+#define RET_I8(x) kExprI8Const, x, kExprReturn, 1
+
+WASM_EXEC_TEST(Int32AsmjsDivS) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ BUILD(r, WASM_BINOP(kExprI32AsmjsDivS, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ const int32_t kMin = std::numeric_limits<int32_t>::min();
+ CHECK_EQ(0, r.Call(0, 100));
+ CHECK_EQ(0, r.Call(100, 0));
+ CHECK_EQ(0, r.Call(-1001, 0));
+ CHECK_EQ(kMin, r.Call(kMin, -1));
+ CHECK_EQ(0, r.Call(kMin, 0));
+}
+
+WASM_EXEC_TEST(Int32AsmjsRemS) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ BUILD(r, WASM_BINOP(kExprI32AsmjsRemS, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ const int32_t kMin = std::numeric_limits<int32_t>::min();
+ CHECK_EQ(33, r.Call(133, 100));
+ CHECK_EQ(0, r.Call(kMin, -1));
+ CHECK_EQ(0, r.Call(100, 0));
+ CHECK_EQ(0, r.Call(-1001, 0));
+ CHECK_EQ(0, r.Call(kMin, 0));
+}
+
+WASM_EXEC_TEST(Int32AsmjsDivU) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ BUILD(r, WASM_BINOP(kExprI32AsmjsDivU, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ const int32_t kMin = std::numeric_limits<int32_t>::min();
+ CHECK_EQ(0, r.Call(0, 100));
+ CHECK_EQ(0, r.Call(kMin, -1));
+ CHECK_EQ(0, r.Call(100, 0));
+ CHECK_EQ(0, r.Call(-1001, 0));
+ CHECK_EQ(0, r.Call(kMin, 0));
+}
+
+WASM_EXEC_TEST(Int32AsmjsRemU) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ BUILD(r, WASM_BINOP(kExprI32AsmjsRemU, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ const int32_t kMin = std::numeric_limits<int32_t>::min();
+ CHECK_EQ(17, r.Call(217, 100));
+ CHECK_EQ(0, r.Call(100, 0));
+ CHECK_EQ(0, r.Call(-1001, 0));
+ CHECK_EQ(0, r.Call(kMin, 0));
+ CHECK_EQ(kMin, r.Call(kMin, -1));
+}
+
+WASM_EXEC_TEST(I32AsmjsSConvertF32) {
+ WasmRunner<int32_t> r(MachineType::Float32());
+ BUILD(r, WASM_UNOP(kExprI32AsmjsSConvertF32, WASM_GET_LOCAL(0)));
+
+ FOR_FLOAT32_INPUTS(i) {
+ int32_t expected = DoubleToInt32(*i);
+ CHECK_EQ(expected, r.Call(*i));
+ }
+}
+
+WASM_EXEC_TEST(I32AsmjsSConvertF64) {
+ WasmRunner<int32_t> r(MachineType::Float64());
+ BUILD(r, WASM_UNOP(kExprI32AsmjsSConvertF64, WASM_GET_LOCAL(0)));
+
+ FOR_FLOAT64_INPUTS(i) {
+ int32_t expected = DoubleToInt32(*i);
+ CHECK_EQ(expected, r.Call(*i));
+ }
+}
+
+WASM_EXEC_TEST(I32AsmjsUConvertF32) {
+ WasmRunner<uint32_t> r(MachineType::Float32());
+ BUILD(r, WASM_UNOP(kExprI32AsmjsUConvertF32, WASM_GET_LOCAL(0)));
+
+ FOR_FLOAT32_INPUTS(i) {
+ uint32_t expected = DoubleToUint32(*i);
+ CHECK_EQ(expected, r.Call(*i));
+ }
+}
+
+WASM_EXEC_TEST(I32AsmjsUConvertF64) {
+ WasmRunner<uint32_t> r(MachineType::Float64());
+ BUILD(r, WASM_UNOP(kExprI32AsmjsUConvertF64, WASM_GET_LOCAL(0)));
+
+ FOR_FLOAT64_INPUTS(i) {
+ uint32_t expected = DoubleToUint32(*i);
+ CHECK_EQ(expected, r.Call(*i));
+ }
+}
+
+WASM_EXEC_TEST(LoadMemI32_oob_asm) {
+ TestingModule module;
+ int32_t* memory = module.AddMemoryElems<int32_t>(8);
+ WasmRunner<int32_t> r(&module, MachineType::Uint32());
+ module.RandomizeMemory(1112);
+
+ BUILD(r, WASM_UNOP(kExprI32AsmjsLoadMem, WASM_GET_LOCAL(0)));
+
+ memory[0] = 999999;
+ CHECK_EQ(999999, r.Call(0u));
+ // TODO(titzer): offset 29-31 should also be OOB.
+ for (uint32_t offset = 32; offset < 40; offset++) {
+ CHECK_EQ(0, r.Call(offset));
+ }
+
+ for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) {
+ CHECK_EQ(0, r.Call(offset));
+ }
+}
+
+WASM_EXEC_TEST(LoadMemF32_oob_asm) {
+ TestingModule module;
+ float* memory = module.AddMemoryElems<float>(8);
+ WasmRunner<float> r(&module, MachineType::Uint32());
+ module.RandomizeMemory(1112);
+
+ BUILD(r, WASM_UNOP(kExprF32AsmjsLoadMem, WASM_GET_LOCAL(0)));
+
+ memory[0] = 9999.5f;
+ CHECK_EQ(9999.5f, r.Call(0u));
+ // TODO(titzer): offset 29-31 should also be OOB.
+ for (uint32_t offset = 32; offset < 40; offset++) {
+ CHECK(std::isnan(r.Call(offset)));
+ }
+
+ for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) {
+ CHECK(std::isnan(r.Call(offset)));
+ }
+}
+
+WASM_EXEC_TEST(LoadMemF64_oob_asm) {
+ TestingModule module;
+ double* memory = module.AddMemoryElems<double>(8);
+ WasmRunner<double> r(&module, MachineType::Uint32());
+ module.RandomizeMemory(1112);
+
+ BUILD(r, WASM_UNOP(kExprF64AsmjsLoadMem, WASM_GET_LOCAL(0)));
+
+ memory[0] = 9799.5;
+ CHECK_EQ(9799.5, r.Call(0u));
+ memory[1] = 11799.25;
+ CHECK_EQ(11799.25, r.Call(8u));
+ // TODO(titzer): offset 57-63 should also be OOB.
+ for (uint32_t offset = 64; offset < 80; offset++) {
+ CHECK(std::isnan(r.Call(offset)));
+ }
+
+ for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) {
+ CHECK(std::isnan(r.Call(offset)));
+ }
+}
+
+WASM_EXEC_TEST(StoreMemI32_oob_asm) {
+ TestingModule module;
+ int32_t* memory = module.AddMemoryElems<int32_t>(8);
+ WasmRunner<int32_t> r(&module, MachineType::Uint32(), MachineType::Uint32());
+ module.RandomizeMemory(1112);
+
+ BUILD(r, WASM_BINOP(kExprI32AsmjsStoreMem, WASM_GET_LOCAL(0),
+ WASM_GET_LOCAL(1)));
+
+ memory[0] = 7777;
+ CHECK_EQ(999999, r.Call(0u, 999999));
+ CHECK_EQ(999999, memory[0]);
+ // TODO(titzer): offset 29-31 should also be OOB.
+ for (uint32_t offset = 32; offset < 40; offset++) {
+ CHECK_EQ(8888, r.Call(offset, 8888));
+ }
+
+ for (uint32_t offset = 0x10000000; offset < 0xF0000000; offset += 0x1000000) {
+ CHECK_EQ(7777, r.Call(offset, 7777));
+ }
+}
diff --git a/test/cctest/wasm/test-run-wasm-js.cc b/test/cctest/wasm/test-run-wasm-js.cc
index 6d95d6e..827cb3a 100644
--- a/test/cctest/wasm/test-run-wasm-js.cc
+++ b/test/cctest/wasm/test-run-wasm-js.cc
@@ -25,14 +25,12 @@
r.Build(code, code + arraysize(code)); \
} while (false)
-
#define ADD_CODE(vec, ...) \
do { \
byte __buf[] = {__VA_ARGS__}; \
for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
} while (false)
-
namespace {
// A helper for generating predictable but unique argument values that
// are easy to debug (e.g. with misaligned stacks).
@@ -48,23 +46,6 @@
}
};
-
-uint32_t AddJsFunction(TestingModule* module, FunctionSig* sig,
- const char* source) {
- Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
- *v8::Local<v8::Function>::Cast(CompileRun(source))));
- module->AddFunction(sig, Handle<Code>::null());
- uint32_t index = static_cast<uint32_t>(module->module->functions.size() - 1);
- Isolate* isolate = CcTest::InitIsolateOnce();
- WasmName module_name = {"test", 4};
- WasmName function_name = {nullptr, 0};
- Handle<Code> code = CompileWasmToJSWrapper(isolate, module, jsfunc, sig,
- module_name, function_name);
- module->instance->function_code[index] = code;
- return index;
-}
-
-
uint32_t AddJSSelector(TestingModule* module, FunctionSig* sig, int which) {
const int kMaxParams = 11;
static const char* formals[kMaxParams] = {"",
@@ -86,22 +67,9 @@
SNPrintF(source, "(function(%s) { return %c; })",
formals[sig->parameter_count()], param);
- return AddJsFunction(module, sig, source.start());
+ return module->AddJsFunction(sig, source.start());
}
-
-Handle<JSFunction> WrapCode(ModuleEnv* module, uint32_t index) {
- Isolate* isolate = module->module->shared_isolate;
- // Wrap the code so it can be called as a JS function.
- Handle<String> name = isolate->factory()->NewStringFromStaticChars("main");
- Handle<JSObject> module_object = Handle<JSObject>(0, isolate);
- Handle<Code> code = module->instance->function_code[index];
- WasmJs::InstallWasmFunctionMap(isolate, isolate->native_context());
- return compiler::CompileJSToWasmWrapper(isolate, module, name, code,
- module_object, index);
-}
-
-
void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc,
Handle<Object>* buffer, int count) {
Isolate* isolate = jsfunc->GetIsolate();
@@ -119,7 +87,6 @@
}
}
-
void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc, double a,
double b) {
Isolate* isolate = jsfunc->GetIsolate();
@@ -134,68 +101,61 @@
TestingModule module;
WasmFunctionCompiler t(sigs.i_ii(), &module);
BUILD(t, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
EXPECT_CALL(33, jsfunc, 44, 11);
EXPECT_CALL(-8723487, jsfunc, -8000000, 723487);
}
-
TEST(Run_Float32Div_jswrapped) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t(sigs.f_ff(), &module);
BUILD(t, WASM_F32_DIV(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
EXPECT_CALL(92, jsfunc, 46, 0.5);
EXPECT_CALL(64, jsfunc, -16, -0.25);
}
-
TEST(Run_Float64Add_jswrapped) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t(sigs.d_dd(), &module);
BUILD(t, WASM_F64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
EXPECT_CALL(3, jsfunc, 2, 1);
EXPECT_CALL(-5.5, jsfunc, -5.25, -0.25);
}
-
TEST(Run_I32Popcount_jswrapped) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t(sigs.i_i(), &module);
BUILD(t, WASM_I32_POPCNT(WASM_GET_LOCAL(0)));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
EXPECT_CALL(2, jsfunc, 9, 0);
EXPECT_CALL(3, jsfunc, 11, 0);
EXPECT_CALL(6, jsfunc, 0x3F, 0);
-
- USE(AddJsFunction);
}
-
TEST(Run_CallJS_Add_jswrapped) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t(sigs.i_i(), &module);
uint32_t js_index =
- AddJsFunction(&module, sigs.i_i(), "(function(a) { return a + 99; })");
- BUILD(t, WASM_CALL_FUNCTION(js_index, WASM_GET_LOCAL(0)));
+ module.AddJsFunction(sigs.i_i(), "(function(a) { return a + 99; })");
+ BUILD(t, WASM_CALL_FUNCTION1(js_index, WASM_GET_LOCAL(0)));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
EXPECT_CALL(101, jsfunc, 2, -8);
EXPECT_CALL(199, jsfunc, 100, -1);
EXPECT_CALL(-666666801, jsfunc, -666666900, -1);
}
-
void RunJSSelectTest(int which) {
const int kMaxParams = 8;
PredictableInputValues inputs(0x100);
@@ -212,24 +172,25 @@
{
std::vector<byte> code;
- ADD_CODE(code, kExprCallFunction, static_cast<byte>(js_index));
for (int i = 0; i < num_params; i++) {
ADD_CODE(code, WASM_F64(inputs.arg_d(i)));
}
+ ADD_CODE(code, kExprCallFunction, static_cast<byte>(num_params),
+ static_cast<byte>(js_index));
+
size_t end = code.size();
code.push_back(0);
t.Build(&code[0], &code[end]);
}
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
double expected = inputs.arg_d(which);
EXPECT_CALL(expected, jsfunc, 0.0, 0.0);
}
}
-
TEST(Run_JSSelect_0) { RunJSSelectTest(0); }
TEST(Run_JSSelect_1) { RunJSSelectTest(1); }
@@ -246,7 +207,6 @@
TEST(Run_JSSelect_7) { RunJSSelectTest(7); }
-
void RunWASMSelectTest(int which) {
PredictableInputValues inputs(0x200);
Isolate* isolate = CcTest::InitIsolateOnce();
@@ -260,7 +220,7 @@
TestingModule module;
WasmFunctionCompiler t(&sig, &module);
BUILD(t, WASM_GET_LOCAL(which));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
Handle<Object> args[] = {
isolate->factory()->NewNumber(inputs.arg_d(0)),
@@ -278,7 +238,6 @@
}
}
-
TEST(Run_WASMSelect_0) { RunWASMSelectTest(0); }
TEST(Run_WASMSelect_1) { RunWASMSelectTest(1); }
@@ -295,7 +254,6 @@
TEST(Run_WASMSelect_7) { RunWASMSelectTest(7); }
-
void RunWASMSelectAlignTest(int num_args, int num_params) {
PredictableInputValues inputs(0x300);
Isolate* isolate = CcTest::InitIsolateOnce();
@@ -310,7 +268,7 @@
TestingModule module;
WasmFunctionCompiler t(&sig, &module);
BUILD(t, WASM_GET_LOCAL(which));
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
Handle<Object> args[] = {isolate->factory()->NewNumber(inputs.arg_d(0)),
isolate->factory()->NewNumber(inputs.arg_d(1)),
@@ -329,31 +287,26 @@
}
}
-
TEST(Run_WASMSelectAlign_0) {
RunWASMSelectAlignTest(0, 1);
RunWASMSelectAlignTest(0, 2);
}
-
TEST(Run_WASMSelectAlign_1) {
RunWASMSelectAlignTest(1, 2);
RunWASMSelectAlignTest(1, 3);
}
-
TEST(Run_WASMSelectAlign_2) {
RunWASMSelectAlignTest(2, 3);
RunWASMSelectAlignTest(2, 4);
}
-
TEST(Run_WASMSelectAlign_3) {
RunWASMSelectAlignTest(3, 3);
RunWASMSelectAlignTest(3, 4);
}
-
TEST(Run_WASMSelectAlign_4) {
RunWASMSelectAlignTest(4, 3);
RunWASMSelectAlignTest(4, 4);
@@ -400,12 +353,13 @@
// Build the calling code.
std::vector<byte> code;
- ADD_CODE(code, kExprCallFunction, 0);
for (int i = 0; i < num_params; i++) {
ADD_CODE(code, WASM_GET_LOCAL(i));
}
+ ADD_CODE(code, kExprCallFunction, static_cast<byte>(num_params), 0);
+
size_t end = code.size();
code.push_back(0);
@@ -418,7 +372,7 @@
WasmFunctionCompiler t(&sig, &module);
t.Build(&code[0], &code[end]);
- Handle<JSFunction> jsfunc = WrapCode(&module, t.CompileAndAdd());
+ Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd());
Handle<Object> args[] = {
factory->NewNumber(inputs.arg_d(0)),
@@ -439,7 +393,6 @@
}
}
-
TEST(Run_JSSelectAlign_0) {
RunJSSelectAlignTest(0, 1);
RunJSSelectAlignTest(0, 2);
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index 118a91f..05edd62 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -12,14 +12,13 @@
#include "src/wasm/wasm-opcodes.h"
#include "test/cctest/cctest.h"
+#include "test/cctest/wasm/test-signatures.h"
using namespace v8::base;
using namespace v8::internal;
using namespace v8::internal::compiler;
using namespace v8::internal::wasm;
-
-// TODO(titzer): fix arm64 frame alignment.
namespace {
void TestModule(WasmModuleIndex* module, int32_t expected_result) {
Isolate* isolate = CcTest::InitIsolateOnce();
@@ -31,50 +30,16 @@
}
} // namespace
-
-// A raw test that skips the WasmModuleBuilder.
-TEST(Run_WasmModule_CallAdd_rev) {
- static const byte data[] = {
- WASM_MODULE_HEADER,
- // sig#0 ------------------------------------------
- WASM_SECTION_SIGNATURES_SIZE + 7, // Section size.
- WASM_SECTION_SIGNATURES, 2, 0, kLocalI32, // void -> int
- 2, kLocalI32, kLocalI32, kLocalI32, // int,int -> int
- // func#0 (main) ----------------------------------
- WASM_SECTION_FUNCTIONS_SIZE + 24, WASM_SECTION_FUNCTIONS, 2,
- kDeclFunctionExport, 0, 0, // sig index
- 7, 0, // body size
- 0, // locals
- kExprCallFunction, 1, // --
- kExprI8Const, 77, // --
- kExprI8Const, 22, // --
- // func#1 -----------------------------------------
- 0, // no name, not exported
- 1, 0, // sig index
- 6, 0, // body size
- 0, // locals
- kExprI32Add, // --
- kExprGetLocal, 0, // --
- kExprGetLocal, 1, // --
- };
-
- Isolate* isolate = CcTest::InitIsolateOnce();
- HandleScope scope(isolate);
- WasmJs::InstallWasmFunctionMap(isolate, isolate->native_context());
- int32_t result =
- CompileAndRunWasmModule(isolate, data, data + arraysize(data));
- CHECK_EQ(99, result);
-}
-
-
TEST(Run_WasmModule_Return114) {
static const int32_t kReturnValue = 114;
+ TestSignatures sigs;
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint16_t f_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
f->Exported(1);
byte code[] = {WASM_I8(kReturnValue)};
f->EmitCode(code, sizeof(code));
@@ -82,38 +47,43 @@
TestModule(writer->WriteTo(&zone), kReturnValue);
}
-
TEST(Run_WasmModule_CallAdd) {
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+ TestSignatures sigs;
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
+
uint16_t f1_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f1_index);
- f->ReturnType(kAstI32);
- uint16_t param1 = f->AddParam(kAstI32);
- uint16_t param2 = f->AddParam(kAstI32);
+ f->SetSignature(sigs.i_ii());
+ uint16_t param1 = 0;
+ uint16_t param2 = 1;
byte code1[] = {WASM_I32_ADD(WASM_GET_LOCAL(param1), WASM_GET_LOCAL(param2))};
- uint32_t local_indices1[] = {2, 4};
- f->EmitCode(code1, sizeof(code1), local_indices1, sizeof(local_indices1) / 4);
+ f->EmitCode(code1, sizeof(code1));
+
uint16_t f2_index = builder->AddFunction();
f = builder->FunctionAt(f2_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
+
f->Exported(1);
- byte code2[] = {WASM_CALL_FUNCTION(f1_index, WASM_I8(77), WASM_I8(22))};
+ byte code2[] = {WASM_CALL_FUNCTION2(f1_index, WASM_I8(77), WASM_I8(22))};
f->EmitCode(code2, sizeof(code2));
WasmModuleWriter* writer = builder->Build(&zone);
TestModule(writer->WriteTo(&zone), 99);
}
-
TEST(Run_WasmModule_ReadLoadedDataSegment) {
static const byte kDataSegmentDest0 = 12;
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+ TestSignatures sigs;
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint16_t f_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
+
f->Exported(1);
byte code[] = {
WASM_LOAD_MEM(MachineType::Int32(), WASM_I8(kDataSegmentDest0))};
@@ -129,10 +99,13 @@
static const int kCheckSize = 16 * 1024;
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+ TestSignatures sigs;
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint16_t f_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
+
uint16_t localIndex = f->AddLocal(kAstI32);
f->Exported(1);
byte code[] = {WASM_BLOCK(
@@ -143,7 +116,7 @@
WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(localIndex)),
WASM_BRV(2, WASM_I8(-1)), WASM_INC_LOCAL_BY(localIndex, 4))),
WASM_I8(11))};
- f->EmitCode(code, sizeof(code), nullptr, 0);
+ f->EmitCode(code, sizeof(code));
WasmModuleWriter* writer = builder->Build(&zone);
TestModule(writer->WriteTo(&zone), 11);
}
@@ -151,10 +124,13 @@
TEST(Run_WasmModule_CallMain_recursive) {
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+ TestSignatures sigs;
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint16_t f_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
+
uint16_t localIndex = f->AddLocal(kAstI32);
f->Exported(1);
byte code[] = {WASM_BLOCK(
@@ -165,7 +141,7 @@
WASM_INC_LOCAL(localIndex)),
WASM_BRV(1, WASM_CALL_FUNCTION0(0))),
WASM_BRV(0, WASM_I8(55))))};
- f->EmitCode(code, sizeof(code), nullptr, 0);
+ f->EmitCode(code, sizeof(code));
WasmModuleWriter* writer = builder->Build(&zone);
TestModule(writer->WriteTo(&zone), 55);
}
@@ -173,22 +149,24 @@
TEST(Run_WasmModule_Global) {
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
+ TestSignatures sigs;
+
WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
uint32_t global1 = builder->AddGlobal(MachineType::Int32(), 0);
uint32_t global2 = builder->AddGlobal(MachineType::Int32(), 0);
uint16_t f1_index = builder->AddFunction();
WasmFunctionBuilder* f = builder->FunctionAt(f1_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
byte code1[] = {
WASM_I32_ADD(WASM_LOAD_GLOBAL(global1), WASM_LOAD_GLOBAL(global2))};
f->EmitCode(code1, sizeof(code1));
uint16_t f2_index = builder->AddFunction();
f = builder->FunctionAt(f2_index);
- f->ReturnType(kAstI32);
+ f->SetSignature(sigs.i_v());
f->Exported(1);
byte code2[] = {WASM_STORE_GLOBAL(global1, WASM_I32V_1(56)),
WASM_STORE_GLOBAL(global2, WASM_I32V_1(41)),
- WASM_RETURN(WASM_CALL_FUNCTION0(f1_index))};
+ WASM_RETURN1(WASM_CALL_FUNCTION0(f1_index))};
f->EmitCode(code2, sizeof(code2));
WasmModuleWriter* writer = builder->Build(&zone);
TestModule(writer->WriteTo(&zone), 97);
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index 70d461b..236624f 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -6,6 +6,8 @@
#include <stdlib.h>
#include <string.h>
+#include "src/base/platform/elapsed-timer.h"
+
#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
@@ -19,12 +21,12 @@
using namespace v8::internal::wasm;
// for even shorter tests.
-#define B2(a, b) kExprBlock, 2, a, b
-#define B1(a) kExprBlock, 1, a
-#define RET(x) kExprReturn, x
-#define RET_I8(x) kExprReturn, kExprI8Const, x
+#define B2(a, b) kExprBlock, a, b, kExprEnd
+#define B1(a) kExprBlock, a, kExprEnd
+#define RET(x) x, kExprReturn, 1
+#define RET_I8(x) kExprI8Const, x, kExprReturn, 1
-TEST(Run_WasmInt8Const) {
+WASM_EXEC_TEST(Int8Const) {
WasmRunner<int32_t> r;
const byte kExpectedValue = 121;
// return(kExpectedValue)
@@ -32,8 +34,7 @@
CHECK_EQ(kExpectedValue, r.Call());
}
-
-TEST(Run_WasmInt8Const_fallthru1) {
+WASM_EXEC_TEST(Int8Const_fallthru1) {
WasmRunner<int32_t> r;
const byte kExpectedValue = 122;
// kExpectedValue
@@ -41,8 +42,7 @@
CHECK_EQ(kExpectedValue, r.Call());
}
-
-TEST(Run_WasmInt8Const_fallthru2) {
+WASM_EXEC_TEST(Int8Const_fallthru2) {
WasmRunner<int32_t> r;
const byte kExpectedValue = 123;
// -99 kExpectedValue
@@ -50,8 +50,7 @@
CHECK_EQ(kExpectedValue, r.Call());
}
-
-TEST(Run_WasmInt8Const_all) {
+WASM_EXEC_TEST(Int8Const_all) {
for (int value = -128; value <= 127; value++) {
WasmRunner<int32_t> r;
// return(value)
@@ -61,8 +60,7 @@
}
}
-
-TEST(Run_WasmInt32Const) {
+WASM_EXEC_TEST(Int32Const) {
WasmRunner<int32_t> r;
const int32_t kExpectedValue = 0x11223344;
// return(kExpectedValue)
@@ -70,8 +68,7 @@
CHECK_EQ(kExpectedValue, r.Call());
}
-
-TEST(Run_WasmInt32Const_many) {
+WASM_EXEC_TEST(Int32Const_many) {
FOR_INT32_INPUTS(i) {
WasmRunner<int32_t> r;
const int32_t kExpectedValue = *i;
@@ -81,8 +78,7 @@
}
}
-
-TEST(Run_WasmMemorySize) {
+WASM_EXEC_TEST(MemorySize) {
TestingModule module;
WasmRunner<int32_t> r(&module);
module.AddMemory(1024);
@@ -90,56 +86,49 @@
CHECK_EQ(1024, r.Call());
}
-
-TEST(Run_WasmInt32Param0) {
+WASM_EXEC_TEST(Int32Param0) {
WasmRunner<int32_t> r(MachineType::Int32());
// return(local[0])
BUILD(r, WASM_GET_LOCAL(0));
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
-TEST(Run_WasmInt32Param0_fallthru) {
+WASM_EXEC_TEST(Int32Param0_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// local[0]
BUILD(r, WASM_GET_LOCAL(0));
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
-TEST(Run_WasmInt32Param1) {
+WASM_EXEC_TEST(Int32Param1) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
// local[1]
BUILD(r, WASM_GET_LOCAL(1));
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(-111, *i)); }
}
-
-TEST(Run_WasmInt32Add) {
+WASM_EXEC_TEST(Int32Add) {
WasmRunner<int32_t> r;
// 11 + 44
BUILD(r, WASM_I32_ADD(WASM_I8(11), WASM_I8(44)));
CHECK_EQ(55, r.Call());
}
-
-TEST(Run_WasmInt32Add_P) {
+WASM_EXEC_TEST(Int32Add_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 + 13
BUILD(r, WASM_I32_ADD(WASM_I8(13), WASM_GET_LOCAL(0)));
FOR_INT32_INPUTS(i) { CHECK_EQ(*i + 13, r.Call(*i)); }
}
-
-TEST(Run_WasmInt32Add_P_fallthru) {
+WASM_EXEC_TEST(Int32Add_P_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 + 13
BUILD(r, WASM_I32_ADD(WASM_I8(13), WASM_GET_LOCAL(0)));
FOR_INT32_INPUTS(i) { CHECK_EQ(*i + 13, r.Call(*i)); }
}
-
-TEST(Run_WasmInt32Add_P2) {
+WASM_EXEC_TEST(Int32Add_P2) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
// p0 + p1
BUILD(r, WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -152,8 +141,7 @@
}
}
-
-TEST(Run_WasmFloat32Add) {
+WASM_EXEC_TEST(Float32Add) {
WasmRunner<int32_t> r;
// int(11.5f + 44.5f)
BUILD(r,
@@ -161,15 +149,13 @@
CHECK_EQ(56, r.Call());
}
-
-TEST(Run_WasmFloat64Add) {
+WASM_EXEC_TEST(Float64Add) {
WasmRunner<int32_t> r;
// return int(13.5d + 43.5d)
BUILD(r, WASM_I32_SCONVERT_F64(WASM_F64_ADD(WASM_F64(13.5), WASM_F64(43.5))));
CHECK_EQ(57, r.Call());
}
-
void TestInt32Binop(WasmOpcode opcode, int32_t expected, int32_t a, int32_t b) {
{
WasmRunner<int32_t> r;
@@ -185,7 +171,7 @@
}
}
-TEST(Run_WasmInt32Binops) {
+WASM_EXEC_TEST(Int32Binops) {
TestInt32Binop(kExprI32Add, 88888888, 33333333, 55555555);
TestInt32Binop(kExprI32Sub, -1111111, 7777777, 8888888);
TestInt32Binop(kExprI32Mul, 65130756, 88734, 734);
@@ -217,7 +203,6 @@
TestInt32Binop(kExprI32GeU, 1, 0xF0000000, 98978);
}
-
void TestInt32Unop(WasmOpcode opcode, int32_t expected, int32_t a) {
{
WasmRunner<int32_t> r;
@@ -233,8 +218,7 @@
}
}
-
-TEST(Run_WasmInt32Clz) {
+WASM_EXEC_TEST(Int32Clz) {
TestInt32Unop(kExprI32Clz, 0, 0x80001000);
TestInt32Unop(kExprI32Clz, 1, 0x40000500);
TestInt32Unop(kExprI32Clz, 2, 0x20000300);
@@ -270,8 +254,7 @@
TestInt32Unop(kExprI32Clz, 32, 0x00000000);
}
-
-TEST(Run_WasmInt32Ctz) {
+WASM_EXEC_TEST(Int32Ctz) {
TestInt32Unop(kExprI32Ctz, 32, 0x00000000);
TestInt32Unop(kExprI32Ctz, 31, 0x80000000);
TestInt32Unop(kExprI32Ctz, 30, 0x40000000);
@@ -307,8 +290,7 @@
TestInt32Unop(kExprI32Ctz, 0, 0x9afdbc81);
}
-
-TEST(Run_WasmInt32Popcnt) {
+WASM_EXEC_TEST(Int32Popcnt) {
TestInt32Unop(kExprI32Popcnt, 32, 0xffffffff);
TestInt32Unop(kExprI32Popcnt, 0, 0x00000000);
TestInt32Unop(kExprI32Popcnt, 1, 0x00008000);
@@ -316,7 +298,7 @@
TestInt32Unop(kExprI32Popcnt, 19, 0xfedcba09);
}
-TEST(Run_WasmI32Eqz) {
+WASM_EXEC_TEST(I32Eqz) {
TestInt32Unop(kExprI32Eqz, 0, 1);
TestInt32Unop(kExprI32Eqz, 0, -1);
TestInt32Unop(kExprI32Eqz, 0, -827343);
@@ -324,7 +306,7 @@
TestInt32Unop(kExprI32Eqz, 1, 0);
}
-TEST(Run_WasmI32Shl) {
+WASM_EXEC_TEST(I32Shl) {
WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
BUILD(r, WASM_I32_SHL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -336,7 +318,7 @@
}
}
-TEST(Run_WasmI32Shr) {
+WASM_EXEC_TEST(I32Shr) {
WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
BUILD(r, WASM_I32_SHR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -348,7 +330,7 @@
}
}
-TEST(Run_WasmI32Sar) {
+WASM_EXEC_TEST(I32Sar) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_SAR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -360,7 +342,7 @@
}
}
-TEST(Run_WASM_Int32DivS_trap) {
+WASM_EXEC_TEST(Int32DivS_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
const int32_t kMin = std::numeric_limits<int32_t>::min();
@@ -371,8 +353,7 @@
CHECK_TRAP(r.Call(kMin, 0));
}
-
-TEST(Run_WASM_Int32RemS_trap) {
+WASM_EXEC_TEST(Int32RemS_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
const int32_t kMin = std::numeric_limits<int32_t>::min();
@@ -383,8 +364,7 @@
CHECK_TRAP(r.Call(kMin, 0));
}
-
-TEST(Run_WASM_Int32DivU_trap) {
+WASM_EXEC_TEST(Int32DivU_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
const int32_t kMin = std::numeric_limits<int32_t>::min();
@@ -395,8 +375,7 @@
CHECK_TRAP(r.Call(kMin, 0));
}
-
-TEST(Run_WASM_Int32RemU_trap) {
+WASM_EXEC_TEST(Int32RemU_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
CHECK_EQ(17, r.Call(217, 100));
@@ -407,60 +386,7 @@
CHECK_EQ(kMin, r.Call(kMin, -1));
}
-TEST(Run_WASM_Int32DivS_asmjs) {
- TestingModule module;
- module.origin = kAsmJsOrigin;
- WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
- BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- const int32_t kMin = std::numeric_limits<int32_t>::min();
- CHECK_EQ(0, r.Call(0, 100));
- CHECK_EQ(0, r.Call(100, 0));
- CHECK_EQ(0, r.Call(-1001, 0));
- CHECK_EQ(kMin, r.Call(kMin, -1));
- CHECK_EQ(0, r.Call(kMin, 0));
-}
-
-TEST(Run_WASM_Int32RemS_asmjs) {
- TestingModule module;
- module.origin = kAsmJsOrigin;
- WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
- BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- const int32_t kMin = std::numeric_limits<int32_t>::min();
- CHECK_EQ(33, r.Call(133, 100));
- CHECK_EQ(0, r.Call(kMin, -1));
- CHECK_EQ(0, r.Call(100, 0));
- CHECK_EQ(0, r.Call(-1001, 0));
- CHECK_EQ(0, r.Call(kMin, 0));
-}
-
-TEST(Run_WASM_Int32DivU_asmjs) {
- TestingModule module;
- module.origin = kAsmJsOrigin;
- WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
- BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- const int32_t kMin = std::numeric_limits<int32_t>::min();
- CHECK_EQ(0, r.Call(0, 100));
- CHECK_EQ(0, r.Call(kMin, -1));
- CHECK_EQ(0, r.Call(100, 0));
- CHECK_EQ(0, r.Call(-1001, 0));
- CHECK_EQ(0, r.Call(kMin, 0));
-}
-
-TEST(Run_WASM_Int32RemU_asmjs) {
- TestingModule module;
- module.origin = kAsmJsOrigin;
- WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
- BUILD(r, WASM_I32_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
- const int32_t kMin = std::numeric_limits<int32_t>::min();
- CHECK_EQ(17, r.Call(217, 100));
- CHECK_EQ(0, r.Call(100, 0));
- CHECK_EQ(0, r.Call(-1001, 0));
- CHECK_EQ(0, r.Call(kMin, 0));
- CHECK_EQ(kMin, r.Call(kMin, -1));
-}
-
-
-TEST(Run_WASM_Int32DivS_byzero_const) {
+WASM_EXEC_TEST(Int32DivS_byzero_const) {
for (int8_t denom = -2; denom < 8; denom++) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_I8(denom)));
@@ -474,8 +400,7 @@
}
}
-
-TEST(Run_WASM_Int32DivU_byzero_const) {
+WASM_EXEC_TEST(Int32DivU_byzero_const) {
for (uint32_t denom = 0xfffffffe; denom < 8; denom++) {
WasmRunner<uint32_t> r(MachineType::Uint32());
BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_I32V_1(denom)));
@@ -490,8 +415,7 @@
}
}
-
-TEST(Run_WASM_Int32DivS_trap_effect) {
+WASM_EXEC_TEST(Int32DivS_trap_effect) {
TestingModule module;
module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
@@ -525,7 +449,6 @@
}
}
-
void TestFloat32BinopWithConvert(WasmOpcode opcode, int32_t expected, float a,
float b) {
{
@@ -544,7 +467,6 @@
}
}
-
void TestFloat32UnopWithConvert(WasmOpcode opcode, int32_t expected, float a) {
{
WasmRunner<int32_t> r;
@@ -560,7 +482,6 @@
}
}
-
void TestFloat64Binop(WasmOpcode opcode, int32_t expected, double a, double b) {
{
WasmRunner<int32_t> r;
@@ -576,7 +497,6 @@
}
}
-
void TestFloat64BinopWithConvert(WasmOpcode opcode, int32_t expected, double a,
double b) {
{
@@ -594,7 +514,6 @@
}
}
-
void TestFloat64UnopWithConvert(WasmOpcode opcode, int32_t expected, double a) {
{
WasmRunner<int32_t> r;
@@ -610,7 +529,7 @@
}
}
-TEST(Run_WasmFloat32Binops) {
+WASM_EXEC_TEST(Float32Binops) {
TestFloat32Binop(kExprF32Eq, 1, 8.125f, 8.125f);
TestFloat32Binop(kExprF32Ne, 1, 8.125f, 8.127f);
TestFloat32Binop(kExprF32Lt, 1, -9.5f, -9.0f);
@@ -624,14 +543,14 @@
TestFloat32BinopWithConvert(kExprF32Div, 11, 22.1f, 2.0f);
}
-TEST(Run_WasmFloat32Unops) {
+WASM_EXEC_TEST(Float32Unops) {
TestFloat32UnopWithConvert(kExprF32Abs, 8, 8.125f);
TestFloat32UnopWithConvert(kExprF32Abs, 9, -9.125f);
TestFloat32UnopWithConvert(kExprF32Neg, -213, 213.125f);
TestFloat32UnopWithConvert(kExprF32Sqrt, 12, 144.4f);
}
-TEST(Run_WasmFloat64Binops) {
+WASM_EXEC_TEST(Float64Binops) {
TestFloat64Binop(kExprF64Eq, 1, 16.25, 16.25);
TestFloat64Binop(kExprF64Ne, 1, 16.25, 16.15);
TestFloat64Binop(kExprF64Lt, 1, -32.4, 11.7);
@@ -645,14 +564,14 @@
TestFloat64BinopWithConvert(kExprF64Div, -1111, -2222.3, 2);
}
-TEST(Run_WasmFloat64Unops) {
+WASM_EXEC_TEST(Float64Unops) {
TestFloat64UnopWithConvert(kExprF64Abs, 108, 108.125);
TestFloat64UnopWithConvert(kExprF64Abs, 209, -209.125);
TestFloat64UnopWithConvert(kExprF64Neg, -209, 209.125);
TestFloat64UnopWithConvert(kExprF64Sqrt, 13, 169.4);
}
-TEST(Run_WasmFloat32Neg) {
+WASM_EXEC_TEST(Float32Neg) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, WASM_F32_NEG(WASM_GET_LOCAL(0)));
@@ -662,8 +581,22 @@
}
}
+WASM_EXEC_TEST(Float32SubMinusZero) {
+ WasmRunner<float> r(MachineType::Float32());
+ BUILD(r, WASM_F32_SUB(WASM_F32(-0.0), WASM_GET_LOCAL(0)));
-TEST(Run_WasmFloat64Neg) {
+ CHECK_EQ(0x7fe00000, bit_cast<uint32_t>(r.Call(bit_cast<float>(0x7fa00000))));
+}
+
+WASM_EXEC_TEST(Float64SubMinusZero) {
+ WasmRunner<double> r(MachineType::Float64());
+ BUILD(r, WASM_F64_SUB(WASM_F64(-0.0), WASM_GET_LOCAL(0)));
+
+ CHECK_EQ(0x7ff8123456789abc,
+ bit_cast<uint64_t>(r.Call(bit_cast<double>(0x7ff0123456789abc))));
+}
+
+WASM_EXEC_TEST(Float64Neg) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_NEG(WASM_GET_LOCAL(0)));
@@ -673,8 +606,7 @@
}
}
-
-TEST(Run_Wasm_IfElse_P) {
+WASM_EXEC_TEST(IfElse_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// if (p0) return 11; else return 22;
BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
@@ -686,8 +618,53 @@
}
}
+WASM_EXEC_TEST(If_empty1) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, WASM_GET_LOCAL(0), kExprIf, kExprEnd, WASM_GET_LOCAL(1));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i - 9, *i)); }
+}
-TEST(Run_Wasm_IfElse_Unreachable1) {
+WASM_EXEC_TEST(IfElse_empty1) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, WASM_GET_LOCAL(0), kExprIf, kExprElse, kExprEnd, WASM_GET_LOCAL(1));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i - 8, *i)); }
+}
+
+WASM_EXEC_TEST(IfElse_empty2) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, WASM_GET_LOCAL(0), kExprIf, WASM_ZERO, kExprElse, kExprEnd,
+ WASM_GET_LOCAL(1));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i - 7, *i)); }
+}
+
+WASM_EXEC_TEST(IfElse_empty3) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, WASM_GET_LOCAL(0), kExprIf, kExprElse, WASM_ZERO, kExprEnd,
+ WASM_GET_LOCAL(1));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i - 6, *i)); }
+}
+
+WASM_EXEC_TEST(If_chain) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ // if (p0) 13; if (p0) 14; 15
+ BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_I8(13)),
+ WASM_IF(WASM_GET_LOCAL(0), WASM_I8(14)), WASM_I8(15));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(15, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(If_chain_set) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ // if (p0) p1 = 73; if (p0) p1 = 74; p1
+ BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_SET_LOCAL(1, WASM_I8(73))),
+ WASM_IF(WASM_GET_LOCAL(0), WASM_SET_LOCAL(1, WASM_I8(74))),
+ WASM_GET_LOCAL(1));
+ FOR_INT32_INPUTS(i) {
+ int32_t expected = *i ? 74 : *i;
+ CHECK_EQ(expected, r.Call(*i, *i));
+ }
+}
+
+WASM_EXEC_TEST(IfElse_Unreachable1) {
WasmRunner<int32_t> r;
// if (0) unreachable; else return 22;
BUILD(r, WASM_IF_ELSE(WASM_ZERO, // --
@@ -696,24 +673,21 @@
CHECK_EQ(27, r.Call());
}
-
-TEST(Run_Wasm_Return12) {
+WASM_EXEC_TEST(Return12) {
WasmRunner<int32_t> r;
BUILD(r, RET_I8(12));
CHECK_EQ(12, r.Call());
}
-
-TEST(Run_Wasm_Return17) {
+WASM_EXEC_TEST(Return17) {
WasmRunner<int32_t> r;
BUILD(r, B1(RET_I8(17)));
CHECK_EQ(17, r.Call());
}
-
-TEST(Run_Wasm_Return_I32) {
+WASM_EXEC_TEST(Return_I32) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, RET(WASM_GET_LOCAL(0)));
@@ -721,8 +695,7 @@
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
-TEST(Run_Wasm_Return_F32) {
+WASM_EXEC_TEST(Return_F32) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, RET(WASM_GET_LOCAL(0)));
@@ -738,8 +711,7 @@
}
}
-
-TEST(Run_Wasm_Return_F64) {
+WASM_EXEC_TEST(Return_F64) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, RET(WASM_GET_LOCAL(0)));
@@ -755,8 +727,7 @@
}
}
-
-TEST(Run_Wasm_Select) {
+WASM_EXEC_TEST(Select) {
WasmRunner<int32_t> r(MachineType::Int32());
// return select(11, 22, a);
BUILD(r, WASM_SELECT(WASM_I8(11), WASM_I8(22), WASM_GET_LOCAL(0)));
@@ -766,8 +737,7 @@
}
}
-
-TEST(Run_Wasm_Select_strict1) {
+WASM_EXEC_TEST(Select_strict1) {
WasmRunner<int32_t> r(MachineType::Int32());
// select(a=0, a=1, a=2); return a
BUILD(r, B2(WASM_SELECT(WASM_SET_LOCAL(0, WASM_I8(0)),
@@ -777,8 +747,7 @@
FOR_INT32_INPUTS(i) { CHECK_EQ(2, r.Call(*i)); }
}
-
-TEST(Run_Wasm_Select_strict2) {
+WASM_EXEC_TEST(Select_strict2) {
WasmRunner<int32_t> r(MachineType::Int32());
r.AllocateLocal(kAstI32);
r.AllocateLocal(kAstI32);
@@ -791,7 +760,7 @@
}
}
-TEST(Run_Wasm_Select_strict3) {
+WASM_EXEC_TEST(Select_strict3) {
WasmRunner<int32_t> r(MachineType::Int32());
r.AllocateLocal(kAstI32);
r.AllocateLocal(kAstI32);
@@ -805,8 +774,7 @@
}
}
-
-TEST(Run_Wasm_BrIf_strict) {
+WASM_EXEC_TEST(BrIf_strict) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(
r,
@@ -816,14 +784,14 @@
FOR_INT32_INPUTS(i) { CHECK_EQ(99, r.Call(*i)); }
}
-TEST(Run_Wasm_BrTable0a) {
+WASM_EXEC_TEST(BrTable0a) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
B2(B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(0))), WASM_I8(91)));
FOR_INT32_INPUTS(i) { CHECK_EQ(91, r.Call(*i)); }
}
-TEST(Run_Wasm_BrTable0b) {
+WASM_EXEC_TEST(BrTable0b) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
B2(B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 1, BR_TARGET(0), BR_TARGET(0))),
@@ -831,7 +799,7 @@
FOR_INT32_INPUTS(i) { CHECK_EQ(92, r.Call(*i)); }
}
-TEST(Run_Wasm_BrTable0c) {
+WASM_EXEC_TEST(BrTable0c) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(
r,
@@ -844,13 +812,13 @@
}
}
-TEST(Run_Wasm_BrTable1) {
+WASM_EXEC_TEST(BrTable1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(0))), RET_I8(93));
FOR_INT32_INPUTS(i) { CHECK_EQ(93, r.Call(*i)); }
}
-TEST(Run_Wasm_BrTable_loop) {
+WASM_EXEC_TEST(BrTable_loop) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
B2(WASM_LOOP(1, WASM_BR_TABLE(WASM_INC_LOCAL_BY(0, 1), 2, BR_TARGET(2),
@@ -864,7 +832,7 @@
CHECK_EQ(98, r.Call(-100));
}
-TEST(Run_Wasm_BrTable_br) {
+WASM_EXEC_TEST(BrTable_br) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
B2(B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 1, BR_TARGET(1), BR_TARGET(0))),
@@ -876,7 +844,7 @@
CHECK_EQ(91, r.Call(3));
}
-TEST(Run_Wasm_BrTable_br2) {
+WASM_EXEC_TEST(BrTable_br2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(B2(B2(B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 3, BR_TARGET(1),
@@ -893,7 +861,7 @@
CHECK_EQ(85, r.Call(5));
}
-TEST(Run_Wasm_BrTable4) {
+WASM_EXEC_TEST(BrTable4) {
for (int i = 0; i < 4; i++) {
for (int t = 0; t < 4; t++) {
uint32_t cases[] = {0, 1, 2, 3};
@@ -920,7 +888,7 @@
}
}
-TEST(Run_Wasm_BrTable4x4) {
+WASM_EXEC_TEST(BrTable4x4) {
for (byte a = 0; a < 4; a++) {
for (byte b = 0; b < 4; b++) {
for (byte c = 0; c < 4; c++) {
@@ -953,7 +921,7 @@
}
}
-TEST(Run_Wasm_BrTable4_fallthru) {
+WASM_EXEC_TEST(BrTable4_fallthru) {
byte code[] = {
B2(B2(B2(B2(B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 3, BR_TARGET(0),
BR_TARGET(1), BR_TARGET(2), BR_TARGET(3))),
@@ -979,7 +947,7 @@
CHECK_EQ(108, r.Call(4, 100));
}
-TEST(Run_Wasm_F32ReinterpretI32) {
+WASM_EXEC_TEST(F32ReinterpretI32) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module);
@@ -994,8 +962,7 @@
}
}
-
-TEST(Run_Wasm_I32ReinterpretF32) {
+WASM_EXEC_TEST(I32ReinterpretF32) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1012,8 +979,7 @@
}
}
-
-TEST(Run_Wasm_ReturnStore) {
+WASM_EXEC_TEST(ReturnStore) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module);
@@ -1028,8 +994,7 @@
}
}
-
-TEST(Run_Wasm_VoidReturn1) {
+WASM_EXEC_TEST(VoidReturn1) {
// We use a wrapper function because WasmRunner<void> does not exist.
// Build the test function.
@@ -1048,8 +1013,7 @@
CHECK_EQ(kExpected, result);
}
-
-TEST(Run_Wasm_VoidReturn2) {
+WASM_EXEC_TEST(VoidReturn2) {
// We use a wrapper function because WasmRunner<void> does not exist.
// Build the test function.
TestSignatures sigs;
@@ -1067,13 +1031,42 @@
CHECK_EQ(kExpected, result);
}
+WASM_EXEC_TEST(Block_empty) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, kExprBlock, kExprEnd, WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
-TEST(Run_Wasm_Block_If_P) {
+WASM_EXEC_TEST(Block_empty_br1) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, B1(WASM_BR(0)), WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(Block_empty_brif1) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, B1(WASM_BR_IF(0, WASM_ZERO)), WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(Block_empty_brif2) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, B1(WASM_BR_IF(0, WASM_GET_LOCAL(1))), WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i, *i + 1)); }
+}
+
+WASM_EXEC_TEST(Block_br2) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, B1(WASM_BRV(0, WASM_GET_LOCAL(0))));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(Block_If_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// { if (p0) return 51; return 52; }
BUILD(r, B2( // --
WASM_IF(WASM_GET_LOCAL(0), // --
- WASM_BRV(0, WASM_I8(51))), // --
+ WASM_BRV(1, WASM_I8(51))), // --
WASM_I8(52))); // --
FOR_INT32_INPUTS(i) {
int32_t expected = *i ? 51 : 52;
@@ -1081,8 +1074,31 @@
}
}
+WASM_EXEC_TEST(Loop_empty) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, kExprLoop, kExprEnd, WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
-TEST(Run_Wasm_Block_BrIf_P) {
+WASM_EXEC_TEST(Loop_empty_br1) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, WASM_LOOP(1, WASM_BR(1)), WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(Loop_empty_brif1) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, WASM_LOOP(1, WASM_BR_IF(1, WASM_ZERO)), WASM_GET_LOCAL(0));
+ FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
+}
+
+WASM_EXEC_TEST(Loop_empty_brif2) {
+ WasmRunner<uint32_t> r(MachineType::Uint32(), MachineType::Uint32());
+ BUILD(r, WASM_LOOP(1, WASM_BR_IF(1, WASM_GET_LOCAL(1))), WASM_GET_LOCAL(0));
+ FOR_UINT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i, *i + 1)); }
+}
+
+WASM_EXEC_TEST(Block_BrIf_P) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV_IF(0, WASM_I8(51), WASM_GET_LOCAL(0)), WASM_I8(52)));
FOR_INT32_INPUTS(i) {
@@ -1091,8 +1107,7 @@
}
}
-
-TEST(Run_Wasm_Block_IfElse_P_assign) {
+WASM_EXEC_TEST(Block_IfElse_P_assign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { if (p0) p0 = 71; else p0 = 72; return p0; }
BUILD(r, B2( // --
@@ -1106,8 +1121,7 @@
}
}
-
-TEST(Run_Wasm_Block_IfElse_P_return) {
+WASM_EXEC_TEST(Block_IfElse_P_return) {
WasmRunner<int32_t> r(MachineType::Int32());
// if (p0) return 81; else return 82;
BUILD(r, // --
@@ -1120,8 +1134,7 @@
}
}
-
-TEST(Run_Wasm_Block_If_P_assign) {
+WASM_EXEC_TEST(Block_If_P_assign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { if (p0) p0 = 61; p0; }
BUILD(r, WASM_BLOCK(
@@ -1133,16 +1146,14 @@
}
}
-
-TEST(Run_Wasm_DanglingAssign) {
+WASM_EXEC_TEST(DanglingAssign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { return 0; p0 = 0; }
BUILD(r, B2(RET_I8(99), WASM_SET_LOCAL(0, WASM_ZERO)));
CHECK_EQ(99, r.Call(1));
}
-
-TEST(Run_Wasm_ExprIf_P) {
+WASM_EXEC_TEST(ExprIf_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 ? 11 : 22;
BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
@@ -1154,8 +1165,7 @@
}
}
-
-TEST(Run_Wasm_ExprIf_P_fallthru) {
+WASM_EXEC_TEST(ExprIf_P_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 ? 11 : 22;
BUILD(r, WASM_IF_ELSE(WASM_GET_LOCAL(0), // --
@@ -1167,14 +1177,13 @@
}
}
-
-TEST(Run_Wasm_CountDown) {
+WASM_EXEC_TEST(CountDown) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
WASM_BLOCK(
2, WASM_LOOP(
1, WASM_IF(WASM_GET_LOCAL(0),
- WASM_BRV(0, WASM_SET_LOCAL(
+ WASM_BRV(1, WASM_SET_LOCAL(
0, WASM_I32_SUB(WASM_GET_LOCAL(0),
WASM_I8(1)))))),
WASM_GET_LOCAL(0)));
@@ -1183,12 +1192,11 @@
CHECK_EQ(0, r.Call(100));
}
-
-TEST(Run_Wasm_CountDown_fallthru) {
+WASM_EXEC_TEST(CountDown_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
WASM_BLOCK(
- 2, WASM_LOOP(3, WASM_IF(WASM_NOT(WASM_GET_LOCAL(0)), WASM_BREAK(0)),
+ 2, WASM_LOOP(3, WASM_IF(WASM_NOT(WASM_GET_LOCAL(0)), WASM_BREAK(1)),
WASM_SET_LOCAL(
0, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_I8(1))),
WASM_CONTINUE(0)),
@@ -1198,8 +1206,7 @@
CHECK_EQ(0, r.Call(100));
}
-
-TEST(Run_Wasm_WhileCountDown) {
+WASM_EXEC_TEST(WhileCountDown) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_BLOCK(
2, WASM_WHILE(WASM_GET_LOCAL(0),
@@ -1211,10 +1218,9 @@
CHECK_EQ(0, r.Call(100));
}
-
-TEST(Run_Wasm_Loop_if_break1) {
+WASM_EXEC_TEST(Loop_if_break1) {
WasmRunner<int32_t> r(MachineType::Int32());
- BUILD(r, B2(WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(0)),
+ BUILD(r, B2(WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(1)),
WASM_SET_LOCAL(0, WASM_I8(99))),
WASM_GET_LOCAL(0)));
CHECK_EQ(99, r.Call(0));
@@ -1223,8 +1229,7 @@
CHECK_EQ(-29, r.Call(-29));
}
-
-TEST(Run_Wasm_Loop_if_break2) {
+WASM_EXEC_TEST(Loop_if_break2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_LOOP(2, WASM_BR_IF(1, WASM_GET_LOCAL(0)),
WASM_SET_LOCAL(0, WASM_I8(99))),
@@ -1235,8 +1240,7 @@
CHECK_EQ(-29, r.Call(-29));
}
-
-TEST(Run_Wasm_Loop_if_break_fallthru) {
+WASM_EXEC_TEST(Loop_if_break_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B1(WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(1)),
WASM_SET_LOCAL(0, WASM_I8(93)))),
@@ -1247,8 +1251,25 @@
CHECK_EQ(-22, r.Call(-22));
}
+WASM_EXEC_TEST(IfBreak1) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_SEQ(WASM_BR(0), WASM_UNREACHABLE)),
+ WASM_I8(91));
+ CHECK_EQ(91, r.Call(0));
+ CHECK_EQ(91, r.Call(1));
+ CHECK_EQ(91, r.Call(-8734));
+}
-TEST(Run_Wasm_LoadMemI32) {
+WASM_EXEC_TEST(IfBreak2) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_SEQ(WASM_BR(0), RET_I8(77))),
+ WASM_I8(81));
+ CHECK_EQ(81, r.Call(0));
+ CHECK_EQ(81, r.Call(1));
+ CHECK_EQ(81, r.Call(-8734));
+}
+
+WASM_EXEC_TEST(LoadMemI32) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1266,8 +1287,7 @@
CHECK_EQ(77777777, r.Call(0));
}
-
-TEST(Run_Wasm_LoadMemI32_oob) {
+WASM_EXEC_TEST(LoadMemI32_oob) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
WasmRunner<int32_t> r(&module, MachineType::Uint32());
@@ -1286,30 +1306,7 @@
}
}
-
-TEST(Run_Wasm_LoadMemI32_oob_asm) {
- TestingModule module;
- module.origin = kAsmJsOrigin;
- int32_t* memory = module.AddMemoryElems<int32_t>(8);
- WasmRunner<int32_t> r(&module, MachineType::Uint32());
- module.RandomizeMemory(1112);
-
- BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
-
- memory[0] = 999999;
- CHECK_EQ(999999, r.Call(0u));
- // TODO(titzer): offset 29-31 should also be OOB.
- for (uint32_t offset = 32; offset < 40; offset++) {
- CHECK_EQ(0, r.Call(offset));
- }
-
- for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) {
- CHECK_EQ(0, r.Call(offset));
- }
-}
-
-
-TEST(Run_Wasm_LoadMem_offset_oob) {
+WASM_EXEC_TEST(LoadMem_offset_oob) {
TestingModule module;
module.AddMemoryElems<int32_t>(8);
@@ -1335,8 +1332,7 @@
}
}
-
-TEST(Run_Wasm_LoadMemI32_offset) {
+WASM_EXEC_TEST(LoadMemI32_offset) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(4);
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1361,10 +1357,9 @@
CHECK_EQ(44444444, r.Call(8));
}
-
#if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
-TEST(Run_Wasm_LoadMemI32_const_oob_misaligned) {
+WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
const int kMemSize = 12;
// TODO(titzer): Fix misaligned accesses on MIPS and re-enable.
for (int offset = 0; offset < kMemSize + 5; offset++) {
@@ -1389,8 +1384,7 @@
#endif
-
-TEST(Run_Wasm_LoadMemI32_const_oob) {
+WASM_EXEC_TEST(LoadMemI32_const_oob) {
const int kMemSize = 24;
for (int offset = 0; offset < kMemSize + 5; offset += 4) {
for (int index = 0; index < kMemSize + 5; index += 4) {
@@ -1412,8 +1406,7 @@
}
}
-
-TEST(Run_Wasm_StoreMemI32_offset) {
+WASM_EXEC_TEST(StoreMemI32_offset) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(4);
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1436,8 +1429,7 @@
}
}
-
-TEST(Run_Wasm_StoreMem_offset_oob) {
+WASM_EXEC_TEST(StoreMem_offset_oob) {
TestingModule module;
byte* memory = module.AddMemoryElems<byte>(32);
@@ -1473,8 +1465,7 @@
}
}
-
-TEST(Run_Wasm_LoadMemI32_P) {
+WASM_EXEC_TEST(LoadMemI32_P) {
const int kNumElems = 8;
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(kNumElems);
@@ -1488,8 +1479,7 @@
}
}
-
-TEST(Run_Wasm_MemI32_Sum) {
+WASM_EXEC_TEST(MemI32_Sum) {
const int kNumElems = 20;
TestingModule module;
uint32_t* memory = module.AddMemoryElems<uint32_t>(kNumElems);
@@ -1521,24 +1511,22 @@
}
}
-
-TEST(Run_Wasm_CheckMachIntsZero) {
+WASM_EXEC_TEST(CheckMachIntsZero) {
const int kNumElems = 55;
TestingModule module;
module.AddMemoryElems<uint32_t>(kNumElems);
WasmRunner<uint32_t> r(&module, MachineType::Int32());
- BUILD(r, kExprBlock, 2, kExprLoop, 1, kExprIf, kExprGetLocal, 0, kExprBr, 0,
- kExprIfElse, kExprI32LoadMem, ZERO_ALIGNMENT, ZERO_OFFSET,
- kExprGetLocal, 0, kExprBr, 2, kExprI8Const, 255, kExprSetLocal, 0,
- kExprI32Sub, kExprGetLocal, 0, kExprI8Const, 4, kExprI8Const, 0);
+ BUILD(r, kExprLoop, kExprGetLocal, 0, kExprIf, kExprGetLocal, 0,
+ kExprI32LoadMem, 0, 0, kExprIf, kExprI8Const, 255, kExprReturn, ARITY_1,
+ kExprEnd, kExprGetLocal, 0, kExprI8Const, 4, kExprI32Sub, kExprSetLocal,
+ 0, kExprBr, ARITY_1, DEPTH_0, kExprEnd, kExprEnd, kExprI8Const, 0);
module.BlankMemory();
CHECK_EQ(0, r.Call((kNumElems - 1) * 4));
}
-
-TEST(Run_Wasm_MemF32_Sum) {
+WASM_EXEC_TEST(MemF32_Sum) {
const int kSize = 5;
TestingModule module;
module.AddMemoryElems<float>(kSize);
@@ -1571,7 +1559,6 @@
CHECK_EQ(71256.0f, buffer[0]);
}
-
template <typename T>
T GenerateAndRunFold(WasmOpcode binop, T* buffer, size_t size,
LocalType astType, MachineType memType) {
@@ -1602,8 +1589,7 @@
return module.raw_mem_at<double>(0);
}
-
-TEST(Run_Wasm_MemF64_Mul) {
+WASM_EXEC_TEST(MemF64_Mul) {
const size_t kSize = 6;
double buffer[kSize] = {1, 2, 2, 2, 2, 2};
double result = GenerateAndRunFold<double>(kExprF64Mul, buffer, kSize,
@@ -1611,14 +1597,12 @@
CHECK_EQ(32, result);
}
-
TEST(Build_Wasm_Infinite_Loop) {
WasmRunner<int32_t> r(MachineType::Int32());
// Only build the graph and compile, don't run.
BUILD(r, WASM_INFINITE_LOOP);
}
-
TEST(Build_Wasm_Infinite_Loop_effect) {
TestingModule module;
module.AddMemoryElems<int8_t>(16);
@@ -1628,55 +1612,47 @@
BUILD(r, WASM_LOOP(1, WASM_LOAD_MEM(MachineType::Int32(), WASM_ZERO)));
}
-
-TEST(Run_Wasm_Unreachable0a) {
+WASM_EXEC_TEST(Unreachable0a) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_I8(9)), RET(WASM_GET_LOCAL(0))));
CHECK_EQ(9, r.Call(0));
CHECK_EQ(9, r.Call(1));
}
-
-TEST(Run_Wasm_Unreachable0b) {
+WASM_EXEC_TEST(Unreachable0b) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_I8(7)), WASM_UNREACHABLE));
CHECK_EQ(7, r.Call(0));
CHECK_EQ(7, r.Call(1));
}
-
TEST(Build_Wasm_Unreachable1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_Unreachable2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_Unreachable3) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_UnreachableIf1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_IF(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
}
-
TEST(Build_Wasm_UnreachableIf2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE,
WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_UNREACHABLE));
}
-
-TEST(Run_Wasm_Unreachable_Load) {
+WASM_EXEC_TEST(Unreachable_Load) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_GET_LOCAL(0)),
WASM_LOAD_MEM(MachineType::Int8(), WASM_GET_LOCAL(0))));
@@ -1684,25 +1660,22 @@
CHECK_EQ(21, r.Call(21));
}
-
-TEST(Run_Wasm_Infinite_Loop_not_taken1) {
+WASM_EXEC_TEST(Infinite_Loop_not_taken1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_INFINITE_LOOP), WASM_I8(45)));
// Run the code, but don't go into the infinite loop.
CHECK_EQ(45, r.Call(0));
}
-
-TEST(Run_Wasm_Infinite_Loop_not_taken2) {
+WASM_EXEC_TEST(Infinite_Loop_not_taken2) {
WasmRunner<int32_t> r(MachineType::Int32());
- BUILD(r, B1(WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(45)),
+ BUILD(r, B1(WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(45)),
WASM_INFINITE_LOOP)));
// Run the code, but don't go into the infinite loop.
CHECK_EQ(45, r.Call(1));
}
-
-TEST(Run_Wasm_Infinite_Loop_not_taken2_brif) {
+WASM_EXEC_TEST(Infinite_Loop_not_taken2_brif) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
B2(WASM_BRV_IF(0, WASM_I8(45), WASM_GET_LOCAL(0)), WASM_INFINITE_LOOP));
@@ -1710,10 +1683,7 @@
CHECK_EQ(45, r.Call(1));
}
-
static void TestBuildGraphForSimpleExpression(WasmOpcode opcode) {
- if (!WasmOpcodes::IsSupported(opcode)) return;
-
Isolate* isolate = CcTest::InitIsolateOnce();
Zone zone(isolate->allocator());
HandleScope scope(isolate);
@@ -1726,20 +1696,18 @@
FunctionSig* sig = WasmOpcodes::Signature(opcode);
if (sig->parameter_count() == 1) {
- byte code[] = {WASM_NO_LOCALS, static_cast<byte>(opcode), kExprGetLocal, 0};
- TestBuildingGraph(&zone, &jsgraph, nullptr, sig, code,
+ byte code[] = {WASM_NO_LOCALS, kExprGetLocal, 0, static_cast<byte>(opcode)};
+ TestBuildingGraph(&zone, &jsgraph, nullptr, sig, nullptr, code,
code + arraysize(code));
} else {
CHECK_EQ(2, sig->parameter_count());
- byte code[] = {WASM_NO_LOCALS, static_cast<byte>(opcode),
- kExprGetLocal, 0,
- kExprGetLocal, 1};
- TestBuildingGraph(&zone, &jsgraph, nullptr, sig, code,
+ byte code[] = {WASM_NO_LOCALS, kExprGetLocal, 0, kExprGetLocal, 1,
+ static_cast<byte>(opcode)};
+ TestBuildingGraph(&zone, &jsgraph, nullptr, sig, nullptr, code,
code + arraysize(code));
}
}
-
TEST(Build_Wasm_SimpleExprs) {
// Test that the decoder can build a graph for all supported simple expressions.
#define GRAPH_BUILD_TEST(name, opcode, sig) \
@@ -1750,8 +1718,7 @@
#undef GRAPH_BUILD_TEST
}
-
-TEST(Run_Wasm_Int32LoadInt8_signext) {
+WASM_EXEC_TEST(Int32LoadInt8_signext) {
TestingModule module;
const int kNumElems = 16;
int8_t* memory = module.AddMemoryElems<int8_t>(kNumElems);
@@ -1765,8 +1732,7 @@
}
}
-
-TEST(Run_Wasm_Int32LoadInt8_zeroext) {
+WASM_EXEC_TEST(Int32LoadInt8_zeroext) {
TestingModule module;
const int kNumElems = 16;
byte* memory = module.AddMemory(kNumElems);
@@ -1780,8 +1746,7 @@
}
}
-
-TEST(Run_Wasm_Int32LoadInt16_signext) {
+WASM_EXEC_TEST(Int32LoadInt16_signext) {
TestingModule module;
const int kNumBytes = 16;
byte* memory = module.AddMemory(kNumBytes);
@@ -1796,8 +1761,7 @@
}
}
-
-TEST(Run_Wasm_Int32LoadInt16_zeroext) {
+WASM_EXEC_TEST(Int32LoadInt16_zeroext) {
TestingModule module;
const int kNumBytes = 16;
byte* memory = module.AddMemory(kNumBytes);
@@ -1812,8 +1776,7 @@
}
}
-
-TEST(Run_WasmInt32Global) {
+WASM_EXEC_TEST(Int32Global) {
TestingModule module;
int32_t* global = module.AddGlobal<int32_t>(MachineType::Int32());
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1829,8 +1792,7 @@
}
}
-
-TEST(Run_WasmInt32Globals_DontAlias) {
+WASM_EXEC_TEST(Int32Globals_DontAlias) {
const int kNumGlobals = 3;
TestingModule module;
int32_t* globals[] = {module.AddGlobal<int32_t>(MachineType::Int32()),
@@ -1858,8 +1820,7 @@
}
}
-
-TEST(Run_WasmFloat32Global) {
+WASM_EXEC_TEST(Float32Global) {
TestingModule module;
float* global = module.AddGlobal<float>(MachineType::Float32());
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1877,8 +1838,7 @@
}
}
-
-TEST(Run_WasmFloat64Global) {
+WASM_EXEC_TEST(Float64Global) {
TestingModule module;
double* global = module.AddGlobal<double>(MachineType::Float64());
WasmRunner<int32_t> r(&module, MachineType::Int32());
@@ -1896,8 +1856,7 @@
}
}
-
-TEST(Run_WasmMixedGlobals) {
+WASM_EXEC_TEST(MixedGlobals) {
TestingModule module;
int32_t* unused = module.AddGlobal<int32_t>(MachineType::Int32());
byte* memory = module.AddMemory(32);
@@ -1951,8 +1910,7 @@
USE(unused);
}
-
-TEST(Run_WasmCallEmpty) {
+WASM_EXEC_TEST(CallEmpty) {
const int32_t kExpected = -414444;
// Build the target function.
TestSignatures sigs;
@@ -1969,8 +1927,7 @@
CHECK_EQ(kExpected, result);
}
-
-TEST(Run_WasmCallF32StackParameter) {
+WASM_EXEC_TEST(CallF32StackParameter) {
// Build the target function.
LocalType param_types[20];
for (int i = 0; i < 20; i++) param_types[i] = kAstF32;
@@ -1982,8 +1939,8 @@
// Build the calling function.
WasmRunner<float> r(&module);
- BUILD(r, WASM_CALL_FUNCTION(
- index, WASM_F32(1.0f), WASM_F32(2.0f), WASM_F32(4.0f),
+ BUILD(r, WASM_CALL_FUNCTIONN(
+ 19, index, WASM_F32(1.0f), WASM_F32(2.0f), WASM_F32(4.0f),
WASM_F32(8.0f), WASM_F32(16.0f), WASM_F32(32.0f),
WASM_F32(64.0f), WASM_F32(128.0f), WASM_F32(256.0f),
WASM_F32(1.5f), WASM_F32(2.5f), WASM_F32(4.5f), WASM_F32(8.5f),
@@ -1994,8 +1951,7 @@
CHECK_EQ(256.5f, result);
}
-
-TEST(Run_WasmCallF64StackParameter) {
+WASM_EXEC_TEST(CallF64StackParameter) {
// Build the target function.
LocalType param_types[20];
for (int i = 0; i < 20; i++) param_types[i] = kAstF64;
@@ -2007,19 +1963,19 @@
// Build the calling function.
WasmRunner<double> r(&module);
- BUILD(r, WASM_CALL_FUNCTION(index, WASM_F64(1.0), WASM_F64(2.0),
- WASM_F64(4.0), WASM_F64(8.0), WASM_F64(16.0),
- WASM_F64(32.0), WASM_F64(64.0), WASM_F64(128.0),
- WASM_F64(256.0), WASM_F64(1.5), WASM_F64(2.5),
- WASM_F64(4.5), WASM_F64(8.5), WASM_F64(16.5),
- WASM_F64(32.5), WASM_F64(64.5), WASM_F64(128.5),
- WASM_F64(256.5), WASM_F64(512.5)));
+ BUILD(r, WASM_CALL_FUNCTIONN(19, index, WASM_F64(1.0), WASM_F64(2.0),
+ WASM_F64(4.0), WASM_F64(8.0), WASM_F64(16.0),
+ WASM_F64(32.0), WASM_F64(64.0), WASM_F64(128.0),
+ WASM_F64(256.0), WASM_F64(1.5), WASM_F64(2.5),
+ WASM_F64(4.5), WASM_F64(8.5), WASM_F64(16.5),
+ WASM_F64(32.5), WASM_F64(64.5), WASM_F64(128.5),
+ WASM_F64(256.5), WASM_F64(512.5)));
float result = r.Call();
CHECK_EQ(256.5, result);
}
-TEST(Run_WasmCallVoid) {
+WASM_EXEC_TEST(CallVoid) {
const byte kMemOffset = 8;
const int32_t kElemNum = kMemOffset / sizeof(int32_t);
const int32_t kExpected = -414444;
@@ -2043,8 +1999,7 @@
CHECK_EQ(kExpected, module.raw_mem_start<int32_t>()[kElemNum]);
}
-
-TEST(Run_WasmCall_Int32Add) {
+WASM_EXEC_TEST(Call_Int32Add) {
// Build the target function.
TestSignatures sigs;
TestingModule module;
@@ -2054,7 +2009,7 @@
// Build the caller function.
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32());
- BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ BUILD(r, WASM_CALL_FUNCTION2(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
FOR_INT32_INPUTS(i) {
FOR_INT32_INPUTS(j) {
@@ -2065,7 +2020,7 @@
}
}
-TEST(Run_WasmCall_Float32Sub) {
+WASM_EXEC_TEST(Call_Float32Sub) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t(sigs.f_ff(), &module);
@@ -2076,15 +2031,14 @@
// Builder the caller function.
WasmRunner<float> r(&module, MachineType::Float32(), MachineType::Float32());
- BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
+ BUILD(r, WASM_CALL_FUNCTION2(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
FOR_FLOAT32_INPUTS(i) {
FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(*i - *j, r.Call(*i, *j)); }
}
}
-
-TEST(Run_WasmCall_Float64Sub) {
+WASM_EXEC_TEST(Call_Float64Sub) {
TestingModule module;
double* memory = module.AddMemoryElems<double>(16);
WasmRunner<int32_t> r(&module);
@@ -2118,7 +2072,6 @@
for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
} while (false)
-
static void Run_WasmMixedCall_N(int start) {
const int kExpected = 6333;
const int kElemSize = 8;
@@ -2165,23 +2118,30 @@
// Build the calling function.
// =========================================================================
WasmRunner<int32_t> r(&module);
-
std::vector<byte> code;
- ADD_CODE(code,
- static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(result, true)),
- ZERO_ALIGNMENT, ZERO_OFFSET);
- ADD_CODE(code, WASM_ZERO);
- ADD_CODE(code, kExprCallFunction, static_cast<byte>(index));
+ // Load the offset for the store.
+ ADD_CODE(code, WASM_ZERO);
+
+ // Load the arguments.
for (int i = 0; i < num_params; i++) {
int offset = (i + 1) * kElemSize;
ADD_CODE(code, WASM_LOAD_MEM(memtypes[i], WASM_I8(offset)));
}
+ // Call the selector function.
+ ADD_CODE(code, kExprCallFunction, static_cast<byte>(num_params),
+ static_cast<byte>(index));
+
+ // Store the result in memory.
+ ADD_CODE(code,
+ static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(result, true)),
+ ZERO_ALIGNMENT, ZERO_OFFSET);
+
+ // Return the expected value.
ADD_CODE(code, WASM_I32V_2(kExpected));
- size_t end = code.size();
- code.push_back(0);
- r.Build(&code[0], &code[end]);
+
+ r.Build(&code[0], &code[0] + code.size());
// Run the code.
for (int t = 0; t < 10; t++) {
@@ -2199,13 +2159,12 @@
}
}
+WASM_EXEC_TEST(MixedCall_0) { Run_WasmMixedCall_N(0); }
+WASM_EXEC_TEST(MixedCall_1) { Run_WasmMixedCall_N(1); }
+WASM_EXEC_TEST(MixedCall_2) { Run_WasmMixedCall_N(2); }
+WASM_EXEC_TEST(MixedCall_3) { Run_WasmMixedCall_N(3); }
-TEST(Run_WasmMixedCall_0) { Run_WasmMixedCall_N(0); }
-TEST(Run_WasmMixedCall_1) { Run_WasmMixedCall_N(1); }
-TEST(Run_WasmMixedCall_2) { Run_WasmMixedCall_N(2); }
-TEST(Run_WasmMixedCall_3) { Run_WasmMixedCall_N(3); }
-
-TEST(Run_Wasm_AddCall) {
+WASM_EXEC_TEST(AddCall) {
TestSignatures sigs;
TestingModule module;
WasmFunctionCompiler t1(sigs.i_ii(), &module);
@@ -2216,21 +2175,21 @@
byte local = r.AllocateLocal(kAstI32);
BUILD(r, B2(WASM_SET_LOCAL(local, WASM_I8(99)),
WASM_I32_ADD(
- WASM_CALL_FUNCTION(t1.function_index_, WASM_GET_LOCAL(0),
- WASM_GET_LOCAL(0)),
- WASM_CALL_FUNCTION(t1.function_index_, WASM_GET_LOCAL(1),
- WASM_GET_LOCAL(local)))));
+ WASM_CALL_FUNCTION2(t1.function_index_, WASM_GET_LOCAL(0),
+ WASM_GET_LOCAL(0)),
+ WASM_CALL_FUNCTION2(t1.function_index_, WASM_GET_LOCAL(1),
+ WASM_GET_LOCAL(local)))));
CHECK_EQ(198, r.Call(0));
CHECK_EQ(200, r.Call(1));
CHECK_EQ(100, r.Call(-49));
}
-TEST(Run_Wasm_CountDown_expr) {
+WASM_EXEC_TEST(CountDown_expr) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_LOOP(
3, WASM_IF(WASM_NOT(WASM_GET_LOCAL(0)),
- WASM_BREAKV(0, WASM_GET_LOCAL(0))),
+ WASM_BREAKV(1, WASM_GET_LOCAL(0))),
WASM_SET_LOCAL(0, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_I8(1))),
WASM_CONTINUE(0)));
CHECK_EQ(0, r.Call(1));
@@ -2238,51 +2197,46 @@
CHECK_EQ(0, r.Call(100));
}
-
-TEST(Run_Wasm_ExprBlock2a) {
+WASM_EXEC_TEST(ExprBlock2a) {
WasmRunner<int32_t> r(MachineType::Int32());
- BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(1))), WASM_I8(1)));
+ BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(1))), WASM_I8(1)));
CHECK_EQ(1, r.Call(0));
CHECK_EQ(1, r.Call(1));
}
-
-TEST(Run_Wasm_ExprBlock2b) {
+WASM_EXEC_TEST(ExprBlock2b) {
WasmRunner<int32_t> r(MachineType::Int32());
- BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(1))), WASM_I8(2)));
+ BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(1))), WASM_I8(2)));
CHECK_EQ(2, r.Call(0));
CHECK_EQ(1, r.Call(1));
}
-
-TEST(Run_Wasm_ExprBlock2c) {
+WASM_EXEC_TEST(ExprBlock2c) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV_IF(0, WASM_I8(1), WASM_GET_LOCAL(0)), WASM_I8(1)));
CHECK_EQ(1, r.Call(0));
CHECK_EQ(1, r.Call(1));
}
-
-TEST(Run_Wasm_ExprBlock2d) {
+WASM_EXEC_TEST(ExprBlock2d) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV_IF(0, WASM_I8(1), WASM_GET_LOCAL(0)), WASM_I8(2)));
CHECK_EQ(2, r.Call(0));
CHECK_EQ(1, r.Call(1));
}
-
-TEST(Run_Wasm_ExprBlock_ManualSwitch) {
+WASM_EXEC_TEST(ExprBlock_ManualSwitch) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_BLOCK(6, WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(1)),
- WASM_BRV(0, WASM_I8(11))),
+ WASM_BRV(1, WASM_I8(11))),
WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(2)),
- WASM_BRV(0, WASM_I8(12))),
+ WASM_BRV(1, WASM_I8(12))),
WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(3)),
- WASM_BRV(0, WASM_I8(13))),
+ WASM_BRV(1, WASM_I8(13))),
WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(4)),
- WASM_BRV(0, WASM_I8(14))),
+ WASM_BRV(1, WASM_I8(14))),
WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(5)),
- WASM_BRV(0, WASM_I8(15))),
+ WASM_BRV(1, WASM_I8(15))),
WASM_I8(99)));
CHECK_EQ(99, r.Call(0));
CHECK_EQ(11, r.Call(1));
@@ -2293,8 +2247,7 @@
CHECK_EQ(99, r.Call(6));
}
-
-TEST(Run_Wasm_ExprBlock_ManualSwitch_brif) {
+WASM_EXEC_TEST(ExprBlock_ManualSwitch_brif) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
WASM_BLOCK(6, WASM_BRV_IF(0, WASM_I8(11),
@@ -2317,8 +2270,7 @@
CHECK_EQ(99, r.Call(6));
}
-
-TEST(Run_Wasm_nested_ifs) {
+WASM_EXEC_TEST(nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_IF_ELSE(
@@ -2326,36 +2278,32 @@
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_I8(11), WASM_I8(12)),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_I8(13), WASM_I8(14))));
-
CHECK_EQ(11, r.Call(1, 1));
CHECK_EQ(12, r.Call(1, 0));
CHECK_EQ(13, r.Call(0, 1));
CHECK_EQ(14, r.Call(0, 0));
}
-
-TEST(Run_Wasm_ExprBlock_if) {
+WASM_EXEC_TEST(ExprBlock_if) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B1(WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_BRV(0, WASM_I8(11)),
- WASM_BRV(0, WASM_I8(14)))));
+ WASM_BRV(1, WASM_I8(14)))));
CHECK_EQ(11, r.Call(1));
CHECK_EQ(14, r.Call(0));
}
-
-TEST(Run_Wasm_ExprBlock_nested_ifs) {
+WASM_EXEC_TEST(ExprBlock_nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_BLOCK(
1, WASM_IF_ELSE(
WASM_GET_LOCAL(0),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_BRV(0, WASM_I8(11)),
- WASM_BRV(0, WASM_I8(12))),
+ WASM_BRV(1, WASM_I8(12))),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_BRV(0, WASM_I8(13)),
- WASM_BRV(0, WASM_I8(14))))));
-
+ WASM_BRV(1, WASM_I8(14))))));
CHECK_EQ(11, r.Call(1, 1));
CHECK_EQ(12, r.Call(1, 0));
@@ -2363,18 +2311,16 @@
CHECK_EQ(14, r.Call(0, 0));
}
-
-TEST(Run_Wasm_ExprLoop_nested_ifs) {
+WASM_EXEC_TEST(ExprLoop_nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_LOOP(
1, WASM_IF_ELSE(
WASM_GET_LOCAL(0),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_BRV(1, WASM_I8(11)),
- WASM_BRV(1, WASM_I8(12))),
+ WASM_BRV(3, WASM_I8(12))),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_BRV(1, WASM_I8(13)),
- WASM_BRV(1, WASM_I8(14))))));
-
+ WASM_BRV(3, WASM_I8(14))))));
CHECK_EQ(11, r.Call(1, 1));
CHECK_EQ(12, r.Call(1, 0));
@@ -2382,8 +2328,7 @@
CHECK_EQ(14, r.Call(0, 0));
}
-
-TEST(Run_Wasm_SimpleCallIndirect) {
+WASM_EXEC_TEST(SimpleCallIndirect) {
TestSignatures sigs;
TestingModule module;
@@ -2407,15 +2352,14 @@
// Builder the caller function.
WasmRunner<int32_t> r(&module, MachineType::Int32());
- BUILD(r, WASM_CALL_INDIRECT(1, WASM_GET_LOCAL(0), WASM_I8(66), WASM_I8(22)));
+ BUILD(r, WASM_CALL_INDIRECT2(1, WASM_GET_LOCAL(0), WASM_I8(66), WASM_I8(22)));
CHECK_EQ(88, r.Call(0));
CHECK_EQ(44, r.Call(1));
CHECK_TRAP(r.Call(2));
}
-
-TEST(Run_Wasm_MultipleCallIndirect) {
+WASM_EXEC_TEST(MultipleCallIndirect) {
TestSignatures sigs;
TestingModule module;
@@ -2440,11 +2384,11 @@
// Builder the caller function.
WasmRunner<int32_t> r(&module, MachineType::Int32(), MachineType::Int32(),
MachineType::Int32());
- BUILD(r,
- WASM_I32_ADD(WASM_CALL_INDIRECT(1, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
- WASM_GET_LOCAL(2)),
- WASM_CALL_INDIRECT(1, WASM_GET_LOCAL(1), WASM_GET_LOCAL(2),
- WASM_GET_LOCAL(0))));
+ BUILD(r, WASM_I32_ADD(
+ WASM_CALL_INDIRECT2(1, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+ WASM_GET_LOCAL(2)),
+ WASM_CALL_INDIRECT2(1, WASM_GET_LOCAL(1), WASM_GET_LOCAL(2),
+ WASM_GET_LOCAL(0))));
CHECK_EQ(5, r.Call(0, 1, 2));
CHECK_EQ(19, r.Call(0, 1, 9));
@@ -2457,7 +2401,7 @@
CHECK_TRAP(r.Call(2, 1, 0));
}
-TEST(Run_Wasm_CallIndirect_NoTable) {
+WASM_EXEC_TEST(CallIndirect_NoTable) {
TestSignatures sigs;
TestingModule module;
@@ -2472,70 +2416,70 @@
// Builder the caller function.
WasmRunner<int32_t> r(&module, MachineType::Int32());
- BUILD(r, WASM_CALL_INDIRECT(1, WASM_GET_LOCAL(0), WASM_I8(66), WASM_I8(22)));
+ BUILD(r, WASM_CALL_INDIRECT2(1, WASM_GET_LOCAL(0), WASM_I8(66), WASM_I8(22)));
CHECK_TRAP(r.Call(0));
CHECK_TRAP(r.Call(1));
CHECK_TRAP(r.Call(2));
}
-TEST(Run_Wasm_F32Floor) {
+WASM_EXEC_TEST(F32Floor) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, WASM_F32_FLOOR(WASM_GET_LOCAL(0)));
FOR_FLOAT32_INPUTS(i) { CHECK_FLOAT_EQ(floorf(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F32Ceil) {
+WASM_EXEC_TEST(F32Ceil) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, WASM_F32_CEIL(WASM_GET_LOCAL(0)));
FOR_FLOAT32_INPUTS(i) { CHECK_FLOAT_EQ(ceilf(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F32Trunc) {
+WASM_EXEC_TEST(F32Trunc) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, WASM_F32_TRUNC(WASM_GET_LOCAL(0)));
FOR_FLOAT32_INPUTS(i) { CHECK_FLOAT_EQ(truncf(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F32NearestInt) {
+WASM_EXEC_TEST(F32NearestInt) {
WasmRunner<float> r(MachineType::Float32());
BUILD(r, WASM_F32_NEARESTINT(WASM_GET_LOCAL(0)));
FOR_FLOAT32_INPUTS(i) { CHECK_FLOAT_EQ(nearbyintf(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F64Floor) {
+WASM_EXEC_TEST(F64Floor) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_FLOOR(WASM_GET_LOCAL(0)));
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(floor(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F64Ceil) {
+WASM_EXEC_TEST(F64Ceil) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_CEIL(WASM_GET_LOCAL(0)));
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ceil(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F64Trunc) {
+WASM_EXEC_TEST(F64Trunc) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_TRUNC(WASM_GET_LOCAL(0)));
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(trunc(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F64NearestInt) {
+WASM_EXEC_TEST(F64NearestInt) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_NEARESTINT(WASM_GET_LOCAL(0)));
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(nearbyint(*i), r.Call(*i)); }
}
-TEST(Run_Wasm_F32Min) {
+WASM_EXEC_TEST(F32Min) {
WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
BUILD(r, WASM_F32_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2558,8 +2502,7 @@
}
}
-
-TEST(Run_Wasm_F64Min) {
+WASM_EXEC_TEST(F64Min) {
WasmRunner<double> r(MachineType::Float64(), MachineType::Float64());
BUILD(r, WASM_F64_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2582,8 +2525,7 @@
}
}
-
-TEST(Run_Wasm_F32Max) {
+WASM_EXEC_TEST(F32Max) {
WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
BUILD(r, WASM_F32_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2606,8 +2548,7 @@
}
}
-
-TEST(Run_Wasm_F64Max) {
+WASM_EXEC_TEST(F64Max) {
WasmRunner<double> r(MachineType::Float64(), MachineType::Float64());
BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2630,11 +2571,10 @@
}
}
-// TODO(ahaas): Fix on arm and mips and reenable.
-#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \
- !V8_TARGET_ARCH_MIPS64
+// TODO(ahaas): Fix on mips and reenable.
+#if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
-TEST(Run_Wasm_F32Min_Snan) {
+WASM_EXEC_TEST(F32Min_Snan) {
// Test that the instruction does not return a signalling NaN.
{
WasmRunner<float> r;
@@ -2650,7 +2590,7 @@
}
}
-TEST(Run_Wasm_F32Max_Snan) {
+WASM_EXEC_TEST(F32Max_Snan) {
// Test that the instruction does not return a signalling NaN.
{
WasmRunner<float> r;
@@ -2666,7 +2606,7 @@
}
}
-TEST(Run_Wasm_F64Min_Snan) {
+WASM_EXEC_TEST(F64Min_Snan) {
// Test that the instruction does not return a signalling NaN.
{
WasmRunner<double> r;
@@ -2682,7 +2622,7 @@
}
}
-TEST(Run_Wasm_F64Max_Snan) {
+WASM_EXEC_TEST(F64Max_Snan) {
// Test that the instruction does not return a signalling NaN.
{
WasmRunner<double> r;
@@ -2700,7 +2640,7 @@
#endif
-TEST(Run_Wasm_I32SConvertF32) {
+WASM_EXEC_TEST(I32SConvertF32) {
WasmRunner<int32_t> r(MachineType::Float32());
BUILD(r, WASM_I32_SCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -2714,8 +2654,7 @@
}
}
-
-TEST(Run_Wasm_I32SConvertF64) {
+WASM_EXEC_TEST(I32SConvertF64) {
WasmRunner<int32_t> r(MachineType::Float64());
BUILD(r, WASM_I32_SCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -2729,8 +2668,7 @@
}
}
-
-TEST(Run_Wasm_I32UConvertF32) {
+WASM_EXEC_TEST(I32UConvertF32) {
WasmRunner<uint32_t> r(MachineType::Float32());
BUILD(r, WASM_I32_UCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -2743,8 +2681,7 @@
}
}
-
-TEST(Run_Wasm_I32UConvertF64) {
+WASM_EXEC_TEST(I32UConvertF64) {
WasmRunner<uint32_t> r(MachineType::Float64());
BUILD(r, WASM_I32_UCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -2757,7 +2694,7 @@
}
}
-TEST(Run_Wasm_F64CopySign) {
+WASM_EXEC_TEST(F64CopySign) {
WasmRunner<double> r(MachineType::Float64(), MachineType::Float64());
BUILD(r, WASM_F64_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2766,8 +2703,7 @@
}
}
-
-TEST(Run_Wasm_F32CopySign) {
+WASM_EXEC_TEST(F32CopySign) {
WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2794,32 +2730,28 @@
WasmFunctionCompiler t(sig, &module);
std::vector<byte> code;
- ADD_CODE(code, kExprCallIndirect, 1);
ADD_CODE(code, kExprI8Const, 0);
for (byte p = 0; p < num_params; p++) {
ADD_CODE(code, kExprGetLocal, p);
}
+ ADD_CODE(code, kExprCallIndirect, static_cast<byte>(num_params), 1);
t.Build(&code[0], &code[0] + code.size());
t.Compile();
}
}
-
TEST(Compile_Wasm_CallIndirect_Many_i32) { CompileCallIndirectMany(kAstI32); }
-
#if WASM_64
TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); }
#endif
-
TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); }
-
TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); }
-TEST(Run_WASM_Int32RemS_dead) {
+WASM_EXEC_TEST(Int32RemS_dead) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)), WASM_ZERO);
const int32_t kMin = std::numeric_limits<int32_t>::min();
diff --git a/test/cctest/wasm/test-wasm-function-name-table.cc b/test/cctest/wasm/test-wasm-function-name-table.cc
new file mode 100644
index 0000000..2f1e251
--- /dev/null
+++ b/test/cctest/wasm/test-wasm-function-name-table.cc
@@ -0,0 +1,110 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/wasm/wasm-function-name-table.h"
+#include "src/wasm/wasm-module.h"
+
+#include "test/cctest/cctest.h"
+
+using namespace v8::internal;
+using namespace v8::internal::wasm;
+
+namespace {
+
+#define CHECK_STREQ(exp, found) \
+ do { \
+ Vector<const char> exp_ = (exp); \
+ Vector<const char> found_ = (found); \
+ if (V8_UNLIKELY(exp_.length() != found_.length() || \
+ memcmp(exp_.start(), found_.start(), exp_.length()))) { \
+ V8_Fatal(__FILE__, __LINE__, \
+ "Check failed: (%s) != (%s) ('%.*s' vs '%.*s').", #exp, #found, \
+ exp_.length(), exp_.start(), found_.length(), found_.start()); \
+ } \
+ } while (0)
+
+void testFunctionNameTable(Vector<Vector<const char>> names) {
+ Isolate *isolate = CcTest::InitIsolateOnce();
+ HandleAndZoneScope scope;
+
+ WasmModule module;
+ std::vector<char> all_names;
+
+ uint32_t func_index = 0;
+ for (Vector<const char> name : names) {
+ size_t name_offset = all_names.size();
+ all_names.insert(all_names.end(), name.start(),
+ name.start() + name.length());
+ // Make every second function name null-terminated.
+ if (func_index % 2) all_names.push_back('\0');
+ module.functions.push_back(
+ {nullptr, 0, 0, static_cast<uint32_t>(name_offset),
+ static_cast<uint32_t>(name.length()), 0, 0, false});
+ ++func_index;
+ }
+
+ module.module_start = reinterpret_cast<byte *>(all_names.data());
+ module.module_end = module.module_start + all_names.size();
+
+ Handle<Object> wasm_function_name_table =
+ BuildFunctionNamesTable(isolate, &module);
+ CHECK(wasm_function_name_table->IsByteArray());
+
+ func_index = 0;
+ for (Vector<const char> name : names) {
+ Handle<Object> string_obj = GetWasmFunctionNameFromTable(
+ Handle<ByteArray>::cast(wasm_function_name_table), func_index);
+ CHECK(!string_obj.is_null());
+ CHECK(string_obj->IsString());
+ Handle<String> string = Handle<String>::cast(string_obj);
+ CHECK(string->IsUtf8EqualTo(name));
+ ++func_index;
+ }
+}
+
+void testFunctionNameTable(Vector<const char *> names) {
+ std::vector<Vector<const char>> names_vec;
+ for (const char *name : names) names_vec.push_back(CStrVector(name));
+ testFunctionNameTable(Vector<Vector<const char>>(
+ names_vec.data(), static_cast<int>(names_vec.size())));
+}
+
+} // namespace
+
+TEST(NoFunctions) { testFunctionNameTable(Vector<Vector<const char>>()); }
+
+TEST(OneFunctions) {
+ const char *names[] = {"foo"};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(ThreeFunctions) {
+ const char *names[] = {"foo", "bar", "baz"};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(OneUnnamedFunction) {
+ const char *names[] = {""};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(UnnamedFirstFunction) {
+ const char *names[] = {"", "bar", "baz"};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(UnnamedLastFunction) {
+ const char *names[] = {"bar", "baz", ""};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(ThreeUnnamedFunctions) {
+ const char *names[] = {"", "", ""};
+ testFunctionNameTable(ArrayVector(names));
+}
+
+TEST(UTF8Names) {
+ const char *names[] = {"↱fun↰", "↺", "alpha:α beta:β"};
+ testFunctionNameTable(ArrayVector(names));
+}
diff --git a/test/cctest/wasm/test-wasm-stack.cc b/test/cctest/wasm/test-wasm-stack.cc
new file mode 100644
index 0000000..b6cd674
--- /dev/null
+++ b/test/cctest/wasm/test-wasm-stack.cc
@@ -0,0 +1,166 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/wasm/wasm-macro-gen.h"
+
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/value-helper.h"
+#include "test/cctest/wasm/test-signatures.h"
+#include "test/cctest/wasm/wasm-run-utils.h"
+
+using namespace v8::base;
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+using namespace v8::internal::wasm;
+
+using v8::Local;
+using v8::Utils;
+
+namespace {
+
+#define CHECK_CSTREQ(exp, found) \
+ do { \
+ const char* exp_ = (exp); \
+ const char* found_ = (found); \
+ DCHECK_NOT_NULL(exp); \
+ if (V8_UNLIKELY(found_ == nullptr || strcmp(exp_, found_) != 0)) { \
+ V8_Fatal(__FILE__, __LINE__, \
+ "Check failed: (%s) != (%s) ('%s' vs '%s').", #exp, #found, \
+ exp_, found_ ? found_ : "<null>"); \
+ } \
+ } while (0)
+
+void PrintStackTrace(v8::Local<v8::StackTrace> stack) {
+ printf("Stack Trace (length %d):\n", stack->GetFrameCount());
+ for (int i = 0, e = stack->GetFrameCount(); i != e; ++i) {
+ v8::Local<v8::StackFrame> frame = stack->GetFrame(i);
+ v8::Local<v8::String> script = frame->GetScriptName();
+ v8::Local<v8::String> func = frame->GetFunctionName();
+ printf("[%d] (%s) %s:%d:%d\n", i,
+ script.IsEmpty() ? "<null>" : *v8::String::Utf8Value(script),
+ func.IsEmpty() ? "<null>" : *v8::String::Utf8Value(func),
+ frame->GetLineNumber(), frame->GetColumn());
+ }
+}
+
+struct ExceptionInfo {
+ const char* func_name;
+ int line_nr;
+ int column;
+};
+
+template <int N>
+void CheckExceptionInfos(Isolate* isolate, Handle<Object> exc,
+ const ExceptionInfo (&excInfos)[N]) {
+ // Check that it's indeed an Error object.
+ CHECK(Object::IsErrorObject(isolate, exc));
+
+ // Extract stack frame from the exception.
+ Local<v8::Value> localExc = Utils::ToLocal(exc);
+ v8::Local<v8::StackTrace> stack = v8::Exception::GetStackTrace(localExc);
+ PrintStackTrace(stack);
+ CHECK(!stack.IsEmpty());
+ CHECK_EQ(N, stack->GetFrameCount());
+
+ for (int frameNr = 0; frameNr < N; ++frameNr) {
+ v8::Local<v8::StackFrame> frame = stack->GetFrame(frameNr);
+ v8::String::Utf8Value funName(frame->GetFunctionName());
+ CHECK_CSTREQ(excInfos[frameNr].func_name, *funName);
+ CHECK_EQ(excInfos[frameNr].line_nr, frame->GetLineNumber());
+ CHECK_EQ(excInfos[frameNr].column, frame->GetColumn());
+ }
+}
+
+} // namespace
+
+// Call from JS to WASM to JS and throw an Error from JS.
+TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) {
+ TestSignatures sigs;
+ TestingModule module;
+
+ // Initialize WasmFunctionCompiler first, since it sets up the HandleScope.
+ WasmFunctionCompiler comp1(sigs.v_v(), &module);
+
+ uint32_t js_throwing_index = module.AddJsFunction(
+ sigs.v_v(),
+ "(function js() {\n function a() {\n throw new Error(); };\n a(); })");
+
+ // Add a nop such that we don't always get position 1.
+ BUILD(comp1, WASM_NOP, WASM_CALL_FUNCTION0(js_throwing_index));
+ uint32_t wasm_index = comp1.CompileAndAdd();
+
+ WasmFunctionCompiler comp2(sigs.v_v(), &module);
+ BUILD(comp2, WASM_CALL_FUNCTION0(wasm_index));
+ uint32_t wasm_index_2 = comp2.CompileAndAdd();
+
+ Handle<JSFunction> js_wasm_wrapper = module.WrapCode(wasm_index_2);
+
+ Handle<JSFunction> js_trampoline = Handle<JSFunction>::cast(
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
+ CompileRun("(function callFn(fn) { fn(); })"))));
+
+ Isolate* isolate = js_wasm_wrapper->GetIsolate();
+ isolate->SetCaptureStackTraceForUncaughtExceptions(true, 10,
+ v8::StackTrace::kOverview);
+ Handle<Object> global(isolate->context()->global_object(), isolate);
+ MaybeHandle<Object> maybe_exc;
+ Handle<Object> args[] = {js_wasm_wrapper};
+ MaybeHandle<Object> returnObjMaybe =
+ Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc);
+ CHECK(returnObjMaybe.is_null());
+
+ // Line number is 1-based, with 0 == kNoLineNumberInfo.
+ ExceptionInfo expected_exceptions[] = {
+ {"a", 3, 8}, // -
+ {"js", 4, 2}, // -
+ {"<WASM>", static_cast<int>(wasm_index), 2}, // -
+ {"<WASM>", static_cast<int>(wasm_index_2), 1}, // -
+ {"callFn", 1, 24} // -
+ };
+ CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(),
+ expected_exceptions);
+}
+
+// Trigger a trap in WASM, stack should be JS -> WASM -> WASM.
+TEST(CollectDetailedWasmStack_WasmError) {
+ TestSignatures sigs;
+ TestingModule module;
+
+ WasmFunctionCompiler comp1(sigs.i_v(), &module,
+ ArrayVector("exec_unreachable"));
+ // Set the execution context, such that a runtime error can be thrown.
+ comp1.SetModuleContext();
+ BUILD(comp1, WASM_UNREACHABLE);
+ uint32_t wasm_index = comp1.CompileAndAdd();
+
+ WasmFunctionCompiler comp2(sigs.i_v(), &module,
+ ArrayVector("call_exec_unreachable"));
+ BUILD(comp2, WASM_CALL_FUNCTION0(wasm_index));
+ uint32_t wasm_index_2 = comp2.CompileAndAdd();
+
+ Handle<JSFunction> js_wasm_wrapper = module.WrapCode(wasm_index_2);
+
+ Handle<JSFunction> js_trampoline = Handle<JSFunction>::cast(
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
+ CompileRun("(function callFn(fn) { fn(); })"))));
+
+ Isolate* isolate = js_wasm_wrapper->GetIsolate();
+ isolate->SetCaptureStackTraceForUncaughtExceptions(true, 10,
+ v8::StackTrace::kOverview);
+ Handle<Object> global(isolate->context()->global_object(), isolate);
+ MaybeHandle<Object> maybe_exc;
+ Handle<Object> args[] = {js_wasm_wrapper};
+ MaybeHandle<Object> maybe_return_obj =
+ Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc);
+ CHECK(maybe_return_obj.is_null());
+
+ // Line number is 1-based, with 0 == kNoLineNumberInfo.
+ ExceptionInfo expected_exceptions[] = {
+ {"<WASM>", static_cast<int>(wasm_index), 1}, // -
+ {"<WASM>", static_cast<int>(wasm_index_2), 1}, // -
+ {"callFn", 1, 24} //-
+ };
+ CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(),
+ expected_exceptions);
+}
diff --git a/test/cctest/wasm/test-wasm-trap-position.cc b/test/cctest/wasm/test-wasm-trap-position.cc
new file mode 100644
index 0000000..13f2929
--- /dev/null
+++ b/test/cctest/wasm/test-wasm-trap-position.cc
@@ -0,0 +1,140 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/wasm/wasm-macro-gen.h"
+
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/value-helper.h"
+#include "test/cctest/wasm/test-signatures.h"
+#include "test/cctest/wasm/wasm-run-utils.h"
+
+using namespace v8::base;
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+using namespace v8::internal::wasm;
+
+using v8::Local;
+using v8::Utils;
+
+namespace {
+
+#define CHECK_CSTREQ(exp, found) \
+ do { \
+ const char* exp_ = (exp); \
+ const char* found_ = (found); \
+ DCHECK_NOT_NULL(exp); \
+ if (V8_UNLIKELY(found_ == nullptr || strcmp(exp_, found_) != 0)) { \
+ V8_Fatal(__FILE__, __LINE__, \
+ "Check failed: (%s) != (%s) ('%s' vs '%s').", #exp, #found, \
+ exp_, found_ ? found_ : "<null>"); \
+ } \
+ } while (0)
+
+struct ExceptionInfo {
+ const char* func_name;
+ int line_nr;
+ int column;
+};
+
+template <int N>
+void CheckExceptionInfos(Isolate* isolate, Handle<Object> exc,
+ const ExceptionInfo (&excInfos)[N]) {
+ // Check that it's indeed an Error object.
+ CHECK(Object::IsErrorObject(isolate, exc));
+
+ // Extract stack frame from the exception.
+ Local<v8::Value> localExc = Utils::ToLocal(exc);
+ v8::Local<v8::StackTrace> stack = v8::Exception::GetStackTrace(localExc);
+ CHECK(!stack.IsEmpty());
+ CHECK_EQ(N, stack->GetFrameCount());
+
+ for (int frameNr = 0; frameNr < N; ++frameNr) {
+ v8::Local<v8::StackFrame> frame = stack->GetFrame(frameNr);
+ v8::String::Utf8Value funName(frame->GetFunctionName());
+ CHECK_CSTREQ(excInfos[frameNr].func_name, *funName);
+ CHECK_EQ(excInfos[frameNr].line_nr, frame->GetLineNumber());
+ CHECK_EQ(excInfos[frameNr].column, frame->GetColumn());
+ }
+}
+
+} // namespace
+
+// Trigger a trap for executing unreachable.
+TEST(Unreachable) {
+ TestSignatures sigs;
+ TestingModule module;
+
+ WasmFunctionCompiler comp1(sigs.v_v(), &module,
+ ArrayVector("exec_unreachable"));
+ // Set the execution context, such that a runtime error can be thrown.
+ comp1.SetModuleContext();
+ BUILD(comp1, WASM_UNREACHABLE);
+ uint32_t wasm_index = comp1.CompileAndAdd();
+
+ Handle<JSFunction> js_wasm_wrapper = module.WrapCode(wasm_index);
+
+ Handle<JSFunction> js_trampoline = Handle<JSFunction>::cast(
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
+ CompileRun("(function callFn(fn) { fn(); })"))));
+
+ Isolate* isolate = js_wasm_wrapper->GetIsolate();
+ isolate->SetCaptureStackTraceForUncaughtExceptions(true, 10,
+ v8::StackTrace::kOverview);
+ Handle<Object> global(isolate->context()->global_object(), isolate);
+ MaybeHandle<Object> maybe_exc;
+ Handle<Object> args[] = {js_wasm_wrapper};
+ MaybeHandle<Object> returnObjMaybe =
+ Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc);
+ CHECK(returnObjMaybe.is_null());
+
+ ExceptionInfo expected_exceptions[] = {
+ {"<WASM>", static_cast<int>(wasm_index), 1}, // --
+ {"callFn", 1, 24} // --
+ };
+ CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(),
+ expected_exceptions);
+}
+
+// Trigger a trap for loading from out-of-bounds.
+TEST(IllegalLoad) {
+ TestSignatures sigs;
+ TestingModule module;
+
+ WasmFunctionCompiler comp1(sigs.v_v(), &module, ArrayVector("mem_oob"));
+ // Set the execution context, such that a runtime error can be thrown.
+ comp1.SetModuleContext();
+ BUILD(comp1, WASM_IF(WASM_ONE,
+ WASM_LOAD_MEM(MachineType::Int32(), WASM_I32V_1(-3))));
+ uint32_t wasm_index = comp1.CompileAndAdd();
+
+ WasmFunctionCompiler comp2(sigs.v_v(), &module, ArrayVector("call_mem_oob"));
+ // Insert a NOP such that the position of the call is not one.
+ BUILD(comp2, WASM_NOP, WASM_CALL_FUNCTION0(wasm_index));
+ uint32_t wasm_index_2 = comp2.CompileAndAdd();
+
+ Handle<JSFunction> js_wasm_wrapper = module.WrapCode(wasm_index_2);
+
+ Handle<JSFunction> js_trampoline = Handle<JSFunction>::cast(
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
+ CompileRun("(function callFn(fn) { fn(); })"))));
+
+ Isolate* isolate = js_wasm_wrapper->GetIsolate();
+ isolate->SetCaptureStackTraceForUncaughtExceptions(true, 10,
+ v8::StackTrace::kOverview);
+ Handle<Object> global(isolate->context()->global_object(), isolate);
+ MaybeHandle<Object> maybe_exc;
+ Handle<Object> args[] = {js_wasm_wrapper};
+ MaybeHandle<Object> returnObjMaybe =
+ Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc);
+ CHECK(returnObjMaybe.is_null());
+
+ // Line number is 1-based, with 0 == kNoLineNumberInfo.
+ ExceptionInfo expected_exceptions[] = {
+ {"<WASM>", static_cast<int>(wasm_index), 6}, // --
+ {"<WASM>", static_cast<int>(wasm_index_2), 2}, // --
+ {"callFn", 1, 24} // --
+ };
+ CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(),
+ expected_exceptions);
+}
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index 1e85f46..a92c9ff 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -17,9 +17,11 @@
#include "src/compiler/node.h"
#include "src/compiler/pipeline.h"
#include "src/compiler/wasm-compiler.h"
+#include "src/compiler/zone-pool.h"
#include "src/wasm/ast-decoder.h"
#include "src/wasm/wasm-js.h"
+#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-opcodes.h"
@@ -159,20 +161,43 @@
rng.NextBytes(raw, end - raw);
}
- int AddFunction(FunctionSig* sig, Handle<Code> code) {
+ uint32_t AddFunction(FunctionSig* sig, Handle<Code> code) {
if (module->functions.size() == 0) {
// TODO(titzer): Reserving space here to avoid the underlying WasmFunction
// structs from moving.
module->functions.reserve(kMaxFunctions);
}
uint32_t index = static_cast<uint32_t>(module->functions.size());
- module->functions.push_back(
- {sig, index, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, false});
+ module->functions.push_back({sig, index, 0, 0, 0, 0, 0, false});
instance->function_code.push_back(code);
DCHECK_LT(index, kMaxFunctions); // limited for testing.
return index;
}
+ uint32_t AddJsFunction(FunctionSig* sig, const char* source) {
+ Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
+ *v8::Local<v8::Function>::Cast(CompileRun(source))));
+ uint32_t index = AddFunction(sig, Handle<Code>::null());
+ Isolate* isolate = module->shared_isolate;
+ WasmName module_name = ArrayVector("test");
+ WasmName function_name;
+ Handle<Code> code = CompileWasmToJSWrapper(isolate, this, jsfunc, sig,
+ module_name, function_name);
+ instance->function_code[index] = code;
+ return index;
+ }
+
+ Handle<JSFunction> WrapCode(uint32_t index) {
+ Isolate* isolate = module->shared_isolate;
+ // Wrap the code so it can be called as a JS function.
+ Handle<String> name = isolate->factory()->NewStringFromStaticChars("main");
+ Handle<JSObject> module_object = Handle<JSObject>(0, isolate);
+ Handle<Code> code = instance->function_code[index];
+ WasmJs::InstallWasmFunctionMap(isolate, isolate->native_context());
+ return compiler::CompileJSToWasmWrapper(isolate, this, name, code,
+ module_object, index);
+ }
+
void SetFunctionCode(uint32_t index, Handle<Code> code) {
instance->function_code[index] = code;
}
@@ -218,9 +243,10 @@
};
inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
- FunctionSig* sig, const byte* start,
- const byte* end) {
- compiler::WasmGraphBuilder builder(zone, jsgraph, sig);
+ FunctionSig* sig,
+ SourcePositionTable* source_position_table,
+ const byte* start, const byte* end) {
+ compiler::WasmGraphBuilder builder(zone, jsgraph, sig, source_position_table);
TreeResult result =
BuildTFGraph(zone->allocator(), &builder, module, sig, start, end);
if (result.failed()) {
@@ -356,7 +382,7 @@
r.LowerGraph();
}
- CompilationInfo info("testing", isolate, graph()->zone());
+ CompilationInfo info(ArrayVector("testing"), isolate, graph()->zone());
code_ =
Pipeline::GenerateCodeForTesting(&info, descriptor, graph(), nullptr);
CHECK(!code_.is_null());
@@ -386,13 +412,18 @@
class WasmFunctionCompiler : public HandleAndZoneScope,
private GraphAndBuilders {
public:
- explicit WasmFunctionCompiler(FunctionSig* sig, TestingModule* module)
+ explicit WasmFunctionCompiler(
+ FunctionSig* sig, TestingModule* module,
+ Vector<const char> debug_name = ArrayVector("<WASM UNNAMED>"))
: GraphAndBuilders(main_zone()),
jsgraph(this->isolate(), this->graph(), this->common(), nullptr,
nullptr, this->machine()),
sig(sig),
descriptor_(nullptr),
- testing_module_(module) {
+ testing_module_(module),
+ debug_name_(debug_name),
+ local_decls(main_zone(), sig),
+ source_position_table_(this->graph()) {
if (module) {
// Get a new function from the testing module.
function_ = nullptr;
@@ -414,9 +445,11 @@
// The call descriptor is initialized when the function is compiled.
CallDescriptor* descriptor_;
TestingModule* testing_module_;
+ Vector<const char> debug_name_;
WasmFunction* function_;
int function_index_;
LocalDeclEncoder local_decls;
+ SourcePositionTable source_position_table_;
Isolate* isolate() { return main_isolate(); }
Graph* graph() const { return main_graph_; }
@@ -433,12 +466,13 @@
void Build(const byte* start, const byte* end) {
// Build the TurboFan graph.
local_decls.Prepend(&start, &end);
- TestBuildingGraph(main_zone(), &jsgraph, testing_module_, sig, start, end);
+ TestBuildingGraph(main_zone(), &jsgraph, testing_module_, sig,
+ &source_position_table_, start, end);
delete[] start;
}
byte AllocateLocal(LocalType type) {
- uint32_t index = local_decls.AddLocals(1, type, sig);
+ uint32_t index = local_decls.AddLocals(1, type);
byte result = static_cast<byte>(index);
DCHECK_EQ(index, result);
return result;
@@ -450,17 +484,34 @@
if (kPointerSize == 4) {
desc = testing_module_->GetI32WasmCallDescriptor(this->zone(), desc);
}
- CompilationInfo info("wasm compile", this->isolate(), this->zone());
- Handle<Code> result =
- Pipeline::GenerateCodeForTesting(&info, desc, this->graph());
+ CompilationInfo info(debug_name_, this->isolate(), this->zone(),
+ Code::ComputeFlags(Code::WASM_FUNCTION));
+ v8::base::SmartPointer<CompilationJob> job(Pipeline::NewWasmCompilationJob(
+ &info, graph(), desc, &source_position_table_));
+ if (job->OptimizeGraph() != CompilationJob::SUCCEEDED ||
+ job->GenerateCode() != CompilationJob::SUCCEEDED)
+ return Handle<Code>::null();
+
+ Handle<Code> code = info.code();
+
+ // Length is always 2, since usually <wasm_obj, func_index> is stored in the
+ // deopt data. Here, we only store the function index.
+ DCHECK(code->deoptimization_data() == nullptr ||
+ code->deoptimization_data()->length() == 0);
+ Handle<FixedArray> deopt_data =
+ isolate()->factory()->NewFixedArray(2, TENURED);
+ deopt_data->set(1, Smi::FromInt(function_index_));
+ deopt_data->set_length(2);
+ code->set_deoptimization_data(*deopt_data);
+
#ifdef ENABLE_DISASSEMBLER
- if (!result.is_null() && FLAG_print_opt_code) {
+ if (FLAG_print_opt_code) {
OFStream os(stdout);
- result->Disassemble("wasm code", os);
+ code->Disassemble("wasm code", os);
}
#endif
- return result;
+ return code;
}
uint32_t CompileAndAdd(uint16_t sig_index = 0) {
@@ -475,6 +526,16 @@
if (function_) return function_;
return &testing_module_->module->functions[function_index_];
}
+
+ // Set the context, such that e.g. runtime functions can be called.
+ void SetModuleContext() {
+ if (!testing_module_->instance->context.is_null()) {
+ CHECK(testing_module_->instance->context.is_identical_to(
+ main_isolate()->native_context()));
+ return;
+ }
+ testing_module_->instance->context = main_isolate()->native_context();
+ }
};
// A helper class to build graphs from Wasm bytecode, generate machine
@@ -597,6 +658,15 @@
}
};
+// A macro to define tests that run in different engine configurations.
+// Currently only supports compiled tests, but a future
+// RunWasmInterpreted_##name version will allow each test to also run in the
+// interpreter.
+#define WASM_EXEC_TEST(name) \
+ void RunWasm_##name(); \
+ TEST(RunWasmCompiled_##name) { RunWasm_##name(); } \
+ void RunWasm_##name()
+
} // namespace
#endif
diff --git a/test/default.gyp b/test/default.gyp
index efc0406..dd1d9e2 100644
--- a/test/default.gyp
+++ b/test/default.gyp
@@ -19,8 +19,8 @@
'unittests/unittests.gyp:unittests_run',
],
'includes': [
- '../build/features.gypi',
- '../build/isolate.gypi',
+ '../gypfiles/features.gypi',
+ '../gypfiles/isolate.gypi',
],
'sources': [
'default.isolate',
diff --git a/test/fuzzer/fuzzer-support.cc b/test/fuzzer/fuzzer-support.cc
index cf3ee8c..5df0bd8 100644
--- a/test/fuzzer/fuzzer-support.cc
+++ b/test/fuzzer/fuzzer-support.cc
@@ -10,6 +10,8 @@
#include "include/libplatform/libplatform.h"
+#include "src/flags.h"
+
namespace v8_fuzzer {
namespace {
@@ -36,6 +38,7 @@
};
FuzzerSupport::FuzzerSupport(int* argc, char*** argv) {
+ v8::internal::FLAG_expose_gc = true;
v8::V8::SetFlagsFromCommandLine(argc, *argv, true);
v8::V8::InitializeICU();
v8::V8::InitializeExternalStartupData((*argv)[0]);
@@ -65,6 +68,7 @@
context_.Reset();
}
+ isolate_->LowMemoryNotification();
isolate_->Dispose();
isolate_ = nullptr;
diff --git a/test/fuzzer/fuzzer.gyp b/test/fuzzer/fuzzer.gyp
index 6e15a90..b125ec2 100644
--- a/test/fuzzer/fuzzer.gyp
+++ b/test/fuzzer/fuzzer.gyp
@@ -6,7 +6,7 @@
'variables': {
'v8_code': 1,
},
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
+ 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'json_fuzzer',
@@ -142,7 +142,7 @@
'target_name': 'fuzzer_support',
'type': 'static_library',
'dependencies': [
- '../../tools/gyp/v8.gyp:v8_libplatform',
+ '../../src/v8.gyp:v8_libplatform',
],
'include_dirs': [
'../..',
@@ -155,9 +155,9 @@
['component=="shared_library"', {
# fuzzers can't be built against a shared library, so we need to
# depend on the underlying static target in that case.
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
+ 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
}, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
+ 'dependencies': ['../../src/v8.gyp:v8'],
}],
],
},
@@ -174,7 +174,7 @@
'regexp_fuzzer',
],
'includes': [
- '../../build/isolate.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'fuzzer.isolate',
diff --git a/test/fuzzer/json.cc b/test/fuzzer/json.cc
index f20e9b9..121939b 100644
--- a/test/fuzzer/json.cc
+++ b/test/fuzzer/json.cc
@@ -26,6 +26,8 @@
return 0;
}
- v8::JSON::Parse(isolate, source).IsEmpty();
+ v8::JSON::Parse(support->GetContext(), source).IsEmpty();
+ isolate->RequestGarbageCollectionForTesting(
+ v8::Isolate::kFullGarbageCollection);
return 0;
}
diff --git a/test/fuzzer/parser.cc b/test/fuzzer/parser.cc
index be70b43..4035ade 100644
--- a/test/fuzzer/parser.cc
+++ b/test/fuzzer/parser.cc
@@ -38,5 +38,7 @@
info.set_global();
v8::internal::Parser parser(&info);
parser.Parse(&info);
+ isolate->RequestGarbageCollectionForTesting(
+ v8::Isolate::kFullGarbageCollection);
return 0;
}
diff --git a/test/fuzzer/regexp.cc b/test/fuzzer/regexp.cc
index eb51da8..64c03ae 100644
--- a/test/fuzzer/regexp.cc
+++ b/test/fuzzer/regexp.cc
@@ -71,5 +71,7 @@
Test(isolate, regexp, source, results_array);
}
+ isolate->RequestGarbageCollectionForTesting(
+ v8::Isolate::kFullGarbageCollection);
return 0;
}
diff --git a/test/ignition.gyp b/test/ignition.gyp
index 6aebec9..55f94d5 100644
--- a/test/ignition.gyp
+++ b/test/ignition.gyp
@@ -14,8 +14,8 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
],
'includes': [
- '../build/features.gypi',
- '../build/isolate.gypi',
+ '../gypfiles/features.gypi',
+ '../gypfiles/isolate.gypi',
],
'sources': [
'ignition.isolate',
diff --git a/test/intl/assert.js b/test/intl/assert.js
index 3180e6f..e176152 100644
--- a/test/intl/assert.js
+++ b/test/intl/assert.js
@@ -87,14 +87,13 @@
return deepObjectEquals(a, b);
}
-
/**
- * Throws an exception, and prints the values in case of error.
+ * Throws an exception containing the user_message (if any) and the values.
*/
-function fail(expected, found) {
+function fail(expected, found, user_message = '') {
// TODO(cira): Replace String with PrettyPrint for objects and arrays.
- var message = 'Failure: expected <' + String(expected) + '>, found <' +
- String(found) + '>.';
+ var message = 'Failure' + (user_message ? ' (' + user_message + ')' : '') +
+ ': expected <' + String(expected) + '>, found <' + String(found) + '>.';
throw new Error(message);
}
@@ -102,9 +101,9 @@
/**
* Throws if two variables have different types or values.
*/
-function assertEquals(expected, found) {
+function assertEquals(expected, found, user_message = '') {
if (!deepEquals(expected, found)) {
- fail(expected, found);
+ fail(expected, found, user_message);
}
}
@@ -112,49 +111,49 @@
/**
* Throws if value is false.
*/
-function assertTrue(value) {
- assertEquals(true, value)
+function assertTrue(value, user_message = '') {
+ assertEquals(true, value, user_message);
}
/**
* Throws if value is true.
*/
-function assertFalse(value) {
- assertEquals(false, value);
+function assertFalse(value, user_message = '') {
+ assertEquals(false, value, user_message);
}
/**
- * Returns true if code throws specified exception.
+ * Runs code() and asserts that it throws the specified exception.
*/
function assertThrows(code, type_opt, cause_opt) {
- var threwException = true;
try {
if (typeof code == 'function') {
code();
} else {
eval(code);
}
- threwException = false;
} catch (e) {
if (typeof type_opt == 'function') {
assertInstanceof(e, type_opt);
}
if (arguments.length >= 3) {
- assertEquals(e.type, cause_opt);
+ assertEquals(cause_opt, e.type, 'thrown exception type mismatch');
}
// Success.
return;
}
- throw new Error("Did not throw exception");
+ var expected = arguments.length >= 3 ? cause_opt :
+ typeof type_opt == 'function' ? type_opt : 'any exception';
+ fail(expected, 'no exception', 'expected thrown exception');
}
/**
- * Throws an exception if code throws.
+ * Runs code() and asserts that it does now throw any exception.
*/
-function assertDoesNotThrow(code, name_opt) {
+function assertDoesNotThrow(code, user_message = '') {
try {
if (typeof code == 'function') {
code();
@@ -162,7 +161,7 @@
eval(code);
}
} catch (e) {
- fail("threw an exception: ", e.message || e, name_opt);
+ fail("no expection", "exception: " + String(e), user_message);
}
}
diff --git a/test/intl/date-format/parse-MMMdy.js b/test/intl/date-format/parse-MMMdy.js
index b23a3cd..f713b36 100644
--- a/test/intl/date-format/parse-MMMdy.js
+++ b/test/intl/date-format/parse-MMMdy.js
@@ -28,6 +28,8 @@
// Testing v8Parse method for date and time pattern.
// Month is represented as a short name.
+// Flags: --intl-extra
+
var dtf = new Intl.DateTimeFormat(['en'],
{year: 'numeric', month: 'short',
day: 'numeric',
diff --git a/test/intl/date-format/parse-invalid-input.js b/test/intl/date-format/parse-invalid-input.js
index ab0b889..47a9547 100644
--- a/test/intl/date-format/parse-invalid-input.js
+++ b/test/intl/date-format/parse-invalid-input.js
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --intl-extra
+
// Invalid input is handled properly.
var dtf = new Intl.DateTimeFormat(['en']);
diff --git a/test/intl/date-format/parse-mdy.js b/test/intl/date-format/parse-mdy.js
index 7b1a79a..a248a08 100644
--- a/test/intl/date-format/parse-mdy.js
+++ b/test/intl/date-format/parse-mdy.js
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --intl-extra
+
// Testing v8Parse method for date only.
function checkDate(date) {
diff --git a/test/intl/extra-flag.js b/test/intl/extra-flag.js
new file mode 100644
index 0000000..3d434a3
--- /dev/null
+++ b/test/intl/extra-flag.js
@@ -0,0 +1,23 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --intl-extra
+
+// Turning on the creates the non-standard properties
+
+var dtf = new Intl.DateTimeFormat(['en']);
+assertTrue('v8Parse' in dtf);
+assertTrue('resolved' in dtf);
+assertTrue(!!dtf.resolved && 'pattern' in dtf.resolved);
+
+var nf = new Intl.NumberFormat(['en']);
+assertTrue('v8Parse' in nf);
+assertTrue('resolved' in nf);
+assertTrue(!!nf.resolved && 'pattern' in nf.resolved);
+
+var col = new Intl.Collator(['en']);
+assertTrue('resolved' in col);
+
+var br = new Intl.v8BreakIterator(['en']);
+assertTrue('resolved' in br);
diff --git a/test/intl/general/case-mapping.js b/test/intl/general/case-mapping.js
new file mode 100644
index 0000000..a73622b
--- /dev/null
+++ b/test/intl/general/case-mapping.js
@@ -0,0 +1,138 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --icu_case_mapping
+
+// Some edge cases that unibrow got wrong
+
+assertEquals("𐐘", "𐑀".toUpperCase());
+assertEquals("𐑀", "𐐘".toLowerCase());
+assertEquals("σ", "Σ".toLowerCase());
+
+// Some different paths in the ICU case conversion fastpath
+
+assertEquals("σς", "\u03A3\u03A3".toLowerCase());
+// Expand sharp s in latin1 fastpath
+assertEquals("ASSB", "A\u00DFB".toUpperCase());
+assertEquals("AB", "Ab".toUpperCase());
+// Find first upper case in fastpath
+assertEquals("ab", "aB".toLowerCase());
+assertEquals("AÜ", "aü".toUpperCase());
+assertEquals("AÜ", "AÜ".toUpperCase());
+assertEquals("aü", "aü".toLowerCase());
+assertEquals("aü", "AÜ".toLowerCase());
+assertEquals("aü", "AÜ".toLowerCase());
+
+// Starts with fastpath, but switches to full Unicode path
+// U+00FF is uppercased to U+0178.
+assertEquals("AŸ", "aÿ".toUpperCase());
+// U+00B5 (µ) is uppercased to U+039C (Μ)
+assertEquals("AΜ", "aµ".toUpperCase());
+
+// Buffer size increase
+assertEquals("CSSBẶ", "cßbặ".toUpperCase());
+assertEquals("FIFLFFIFFL", "\uFB01\uFB02\uFB03\uFB04".toUpperCase());
+// OneByte input with buffer size increase: non-fast path
+assertEquals("ABCSS", "abCß".toLocaleUpperCase("tr"));
+
+// More comprehensive tests for "tr", "az" and "lt" are in
+// test262/intl402/Strings/*
+
+// Buffer size decrease with a single locale or locale list.
+// In Turkic (tr, az), U+0307 preceeded by Capital Letter I is dropped.
+assertEquals("abci", "aBcI\u0307".toLocaleLowerCase("tr"));
+assertEquals("abci", "aBcI\u0307".toLocaleLowerCase("az"));
+assertEquals("abci", "aBcI\u0307".toLocaleLowerCase(["tr", "en"]));
+
+// Cons string
+assertEquals("abcijkl", ("aBcI" + "\u0307jkl").toLocaleLowerCase("tr"));
+assertEquals("abcijkl",
+ ("aB" + "cI" + "\u0307j" + "kl").toLocaleLowerCase("tr"));
+assertEquals("abci\u0307jkl", ("aBcI" + "\u0307jkl").toLocaleLowerCase("en"));
+assertEquals("abci\u0307jkl",
+ ("aB" + "cI" + "\u0307j" + "kl").toLocaleLowerCase("en"));
+assertEquals("abci\u0307jkl", ("aBcI" + "\u0307jkl").toLowerCase());
+assertEquals("abci\u0307jkl",
+ ("aB" + "cI" + "\u0307j" + "kl").toLowerCase());
+
+// "tr" and "az" should behave identically.
+assertEquals("aBcI\u0307".toLocaleLowerCase("tr"),
+ "aBcI\u0307".toLocaleLowerCase("az"));
+// What matters is the first locale in the locale list.
+assertEquals("aBcI\u0307".toLocaleLowerCase(["tr", "en", "fr"]),
+ "aBcI\u0307".toLocaleLowerCase("tr"));
+assertEquals("aBcI\u0307".toLocaleLowerCase(["en", "tr", "az"]),
+ "aBcI\u0307".toLocaleLowerCase("en"));
+assertEquals("aBcI\u0307".toLocaleLowerCase(["en", "tr", "az"]),
+ "aBcI\u0307".toLowerCase());
+
+// An empty locale list is the same as the default locale. Try these tests
+// under Turkish and Greek locale.
+assertEquals("aBcI\u0307".toLocaleLowerCase([]),
+ "aBcI\u0307".toLocaleLowerCase());
+assertEquals("aBcI\u0307".toLocaleLowerCase([]),
+ "aBcI\u0307".toLocaleLowerCase(Intl.GetDefaultLocale));
+assertEquals("άόύώ".toLocaleUpperCase([]), "άόύώ".toLocaleUpperCase());
+assertEquals("άόύώ".toLocaleUpperCase([]),
+ "άόύώ".toLocaleUpperCase(Intl.GetDefaultLocale));
+
+
+// English/root locale keeps U+0307 (combining dot above).
+assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("en"));
+assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase(["en", "tr"]));
+assertEquals("abci\u0307", "aBcI\u0307".toLowerCase());
+
+// Greek uppercasing: not covered by intl402/String/*, yet. Tonos (U+0301) and
+// other diacritic marks are dropped. This rule is based on the current CLDR's
+// el-Upper transformation, but Greek uppercasing rules are more sophisticated
+// than this. See http://bugs.icu-project.org/trac/ticket/10582 and
+// http://unicode.org/cldr/trac/ticket/7905 .
+assertEquals("Α", "α\u0301".toLocaleUpperCase("el"));
+assertEquals("Α", "α\u0301".toLocaleUpperCase("el-GR"));
+assertEquals("Α", "α\u0301".toLocaleUpperCase("el-Grek"));
+assertEquals("Α", "α\u0301".toLocaleUpperCase("el-Grek-GR"));
+assertEquals("Α", "ά".toLocaleUpperCase("el"));
+assertEquals("ΑΟΥΩ", "άόύώ".toLocaleUpperCase("el"));
+assertEquals("ΑΟΥΩ", "α\u0301ο\u0301υ\u0301ω\u0301".toLocaleUpperCase("el"));
+assertEquals("ΑΟΥΩ", "άόύώ".toLocaleUpperCase("el"));
+assertEquals("ΟΕ", "Ό\u1f15".toLocaleUpperCase("el"));
+assertEquals("ΟΕ", "Ο\u0301ε\u0314\u0301".toLocaleUpperCase("el"));
+
+// Input and output are identical.
+assertEquals("αβγδε", "αβγδε".toLocaleLowerCase("el"));
+assertEquals("ΑΒΓΔΕ", "ΑΒΓΔΕ".toLocaleUpperCase("el"));
+assertEquals("ΑΒΓΔΕАБ𝐀𝐁", "ΑΒΓΔΕАБ𝐀𝐁".toLocaleUpperCase("el"));
+assertEquals("ABCDEÂÓḴ123", "ABCDEÂÓḴ123".toLocaleUpperCase("el"));
+// ASCII-only or Latin-1 only: 1-byte
+assertEquals("ABCDE123", "ABCDE123".toLocaleUpperCase("el"));
+assertEquals("ABCDEÂÓ123", "ABCDEÂÓ123".toLocaleUpperCase("el"));
+
+// To make sure that the input string is not overwritten in place.
+var strings = ["abCdef", "αβγδε", "άόύώ", "аб"];
+for (var s of strings) {
+ var backupAsArray = s.split("");
+ var uppered = s.toLocaleUpperCase("el");
+ assertEquals(s, backupAsArray.join(""));
+}
+
+// In other locales, U+0301 is preserved.
+assertEquals("Α\u0301Ο\u0301Υ\u0301Ω\u0301",
+ "α\u0301ο\u0301υ\u0301ω\u0301".toLocaleUpperCase("en"));
+assertEquals("Α\u0301Ο\u0301Υ\u0301Ω\u0301",
+ "α\u0301ο\u0301υ\u0301ω\u0301".toUpperCase());
+
+// Plane 1; Deseret and Warang Citi Script.
+assertEquals("\u{10400}\u{118A0}", "\u{10428}\u{118C0}".toUpperCase());
+assertEquals("\u{10428}\u{118C0}", "\u{10400}\u{118A0}".toLowerCase());
+// Mathematical Bold {Capital, Small} Letter A do not change.
+assertEquals("\u{1D400}\u{1D41A}", "\u{1D400}\u{1D41A}".toUpperCase());
+assertEquals("\u{1D400}\u{1D41A}", "\u{1D400}\u{1D41A}".toLowerCase());
+// Plane 1; New characters in Unicode 8.0
+assertEquals("\u{10C80}", "\u{10CC0}".toUpperCase());
+assertEquals("\u{10CC0}", "\u{10C80}".toLowerCase());
+assertEquals("\u{10C80}", "\u{10CC0}".toLocaleUpperCase());
+assertEquals("\u{10CC0}", "\u{10C80}".toLocaleLowerCase());
+assertEquals("\u{10C80}", "\u{10CC0}".toLocaleUpperCase(["tr"]));
+assertEquals("\u{10C80}", "\u{10CC0}".toLocaleUpperCase(["tr"]));
+assertEquals("\u{10CC0}", "\u{10C80}".toLocaleLowerCase());
diff --git a/test/intl/intl.gyp b/test/intl/intl.gyp
index 8fa7f06..f2e107f 100644
--- a/test/intl/intl.gyp
+++ b/test/intl/intl.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'intl.isolate',
diff --git a/test/intl/intl.status b/test/intl/intl.status
index e890085..02ee26b 100644
--- a/test/intl/intl.status
+++ b/test/intl/intl.status
@@ -37,21 +37,9 @@
'number-format/parse-percent': [FAIL],
}], # ALWAYS
-##############################################################################
-['system == linux', {
- # BUG(v8:2899).
- 'collator/default-locale': [PASS, FAIL],
-}], # 'system == linux'
-
-##############################################################################
-['system == macos', {
- # BUG(v8:4459).
- 'collator/default-locale': [FAIL],
-}], # 'system == macos'
-
-##############################################################################
-['arch == arm or arch == arm64', {
- # BUG(v8:4459).
- 'collator/default-locale': [PASS, FAIL],
-}], # 'arch == arm or arch == arm64'
+['arch == arm64 and mode == debug and simulator_run == True', {
+ # Ignition.
+ 'date-format/timezone': [PASS, ['no_snap and mode == debug', NO_IGNITION]],
+ 'number-format/check-digit-ranges': [PASS, ['no_snap and mode == debug', NO_IGNITION]],
+}], # 'arch == arm64 and mode == debug and simulator_run == True'
]
diff --git a/test/intl/no-extra-flag.js b/test/intl/no-extra-flag.js
new file mode 100644
index 0000000..6735f84
--- /dev/null
+++ b/test/intl/no-extra-flag.js
@@ -0,0 +1,23 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --no-intl-extra
+
+// Turning off the flag removes the non-standard properties
+
+var dtf = new Intl.DateTimeFormat(['en']);
+assertFalse('v8Parse' in dtf);
+assertFalse('resolved' in dtf);
+assertFalse(!!dtf.resolved && 'pattern' in dtf.resolved);
+
+var nf = new Intl.NumberFormat(['en']);
+assertFalse('v8Parse' in nf);
+assertFalse('resolved' in nf);
+assertFalse(!!nf.resolved && 'pattern' in nf.resolved);
+
+var col = new Intl.Collator(['en']);
+assertFalse('resolved' in col);
+
+var br = new Intl.v8BreakIterator(['en']);
+assertFalse('resolved' in br);
diff --git a/test/intl/number-format/format-is-bound.js b/test/intl/number-format/format-is-bound.js
index d93ee00..edb6a4b 100644
--- a/test/intl/number-format/format-is-bound.js
+++ b/test/intl/number-format/format-is-bound.js
@@ -28,6 +28,8 @@
// Create default NumberFormat.
var nf = new Intl.NumberFormat();
+var beforeCount = Object.getOwnPropertyNames(nf).length;
+
// Array we want to iterate, actual numbers are not important.
var numberArray = [1, 2, 3];
@@ -39,4 +41,4 @@
nf.format(12345);
// Reading the format doesn't add any additional property keys
-assertEquals(1, Object.getOwnPropertyNames(nf).length);
+assertEquals(beforeCount, Object.getOwnPropertyNames(nf).length);
diff --git a/test/intl/number-format/parse-currency.js b/test/intl/number-format/parse-currency.js
index c87ffea..a57128e 100644
--- a/test/intl/number-format/parse-currency.js
+++ b/test/intl/number-format/parse-currency.js
@@ -28,6 +28,8 @@
// Currency parsing is not yet supported. We need ICU49 or higher to get
// it working.
+// Flags: --intl-extra
+
var nf = new Intl.NumberFormat(['en'], {style: 'currency', currency: 'USD'});
assertEquals(undefined, nf.v8Parse('USD 123.43'));
diff --git a/test/intl/number-format/parse-invalid-input.js b/test/intl/number-format/parse-invalid-input.js
index 8c84d0b..251b52a 100644
--- a/test/intl/number-format/parse-invalid-input.js
+++ b/test/intl/number-format/parse-invalid-input.js
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --intl-extra
+
// Invalid input is handled properly.
var nf = new Intl.NumberFormat(['en']);
diff --git a/test/intl/regress-4870.js b/test/intl/regress-4870.js
new file mode 100644
index 0000000..72c095e
--- /dev/null
+++ b/test/intl/regress-4870.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(() =>
+ Object.getOwnPropertyDescriptor(Intl.Collator.prototype, 'compare')
+ .get.call(new Intl.DateTimeFormat())('a', 'b'),
+ TypeError);
diff --git a/test/intl/testcfg.py b/test/intl/testcfg.py
index 6e4b4f1..c7f17bb 100644
--- a/test/intl/testcfg.py
+++ b/test/intl/testcfg.py
@@ -26,10 +26,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
+import re
from testrunner.local import testsuite
from testrunner.objects import testcase
+FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
class IntlTestSuite(testsuite.TestSuite):
@@ -55,7 +57,11 @@
return tests
def GetFlagsForTestCase(self, testcase, context):
+ source = self.GetSourceForTest(testcase)
flags = ["--allow-natives-syntax"] + context.mode_flags
+ flags_match = re.findall(FLAGS_PATTERN, source)
+ for match in flags_match:
+ flags += match.strip().split()
files = []
files.append(os.path.join(self.root, "assert.js"))
@@ -71,6 +77,10 @@
return testcase.flags + flags
+ def GetSourceForTest(self, testcase):
+ filename = os.path.join(self.root, testcase.path + self.suffix())
+ with open(filename) as f:
+ return f.read()
def GetSuite(name, root):
return IntlTestSuite(name, root)
diff --git a/test/js-perf-test/JSTests.json b/test/js-perf-test/JSTests.json
index dc3cb75..f8ab369 100644
--- a/test/js-perf-test/JSTests.json
+++ b/test/js-perf-test/JSTests.json
@@ -163,6 +163,29 @@
{"name": "for (i < array.length)"},
{"name": "for (i < length)"}
]
+ },
+ {
+ "name": "PropertyQueries",
+ "path": ["PropertyQueries"],
+ "main": "run.js",
+ "resources": ["property-queries.js"],
+ "results_regexp": "^%s\\-PropertyQueries\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "in--INTERN-prop"},
+ {"name": "in--DEINTERN-prop"},
+ {"name": "in--NE-INTERN-prop"},
+ {"name": "in--NE-DEINTERN-prop"},
+ {"name": "in--el"},
+ {"name": "in--el-str"},
+ {"name": "in--NE-el"},
+ {"name": "Object.hasOwnProperty--INTERN-prop"},
+ {"name": "Object.hasOwnProperty--DEINTERN-prop"},
+ {"name": "Object.hasOwnProperty--NE-INTERN-prop"},
+ {"name": "Object.hasOwnProperty--NE-DEINTERN-prop"},
+ {"name": "Object.hasOwnProperty--el"},
+ {"name": "Object.hasOwnProperty--el-str"},
+ {"name": "Object.hasOwnProperty--NE-el"}
+ ]
}
]
}
diff --git a/test/js-perf-test/PropertyQueries/PropertyQueries.json b/test/js-perf-test/PropertyQueries/PropertyQueries.json
new file mode 100644
index 0000000..49b953d
--- /dev/null
+++ b/test/js-perf-test/PropertyQueries/PropertyQueries.json
@@ -0,0 +1,38 @@
+{
+ "name": "PropertyQueriesTests",
+ "run_count": 5,
+ "run_count_android_arm": 3,
+ "run_count_android_arm64": 3,
+ "timeout": 120,
+ "units": "score",
+ "total": true,
+ "resources": ["base.js"],
+ "tests": [
+ {
+ "name": "PropertyQueries",
+ "path": ["."],
+ "main": "run.js",
+ "flags": [""],
+ "resources": [
+ "property-queries.js"
+ ],
+ "results_regexp": "^%s\\-PropertyQueries\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "in--INTERN-prop"},
+ {"name": "in--DEINTERN-prop"},
+ {"name": "in--NE-INTERN-prop"},
+ {"name": "in--NE-DEINTERN-prop"},
+ {"name": "in--el"},
+ {"name": "in--el-str"},
+ {"name": "in--NE-el"},
+ {"name": "Object.hasOwnProperty--INTERN-prop"},
+ {"name": "Object.hasOwnProperty--DEINTERN-prop"},
+ {"name": "Object.hasOwnProperty--NE-INTERN-prop"},
+ {"name": "Object.hasOwnProperty--NE-DEINTERN-prop"},
+ {"name": "Object.hasOwnProperty--el"},
+ {"name": "Object.hasOwnProperty--el-str"},
+ {"name": "Object.hasOwnProperty--NE-el"}
+ ]
+ }
+ ]
+}
diff --git a/test/js-perf-test/PropertyQueries/property-queries.js b/test/js-perf-test/PropertyQueries/property-queries.js
new file mode 100644
index 0000000..f763d26
--- /dev/null
+++ b/test/js-perf-test/PropertyQueries/property-queries.js
@@ -0,0 +1,274 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function ObjectWithKeys(count, keyOffset = 0, keyGen) {
+ var body = "";
+ for (var i = 0; i < count; i++) {
+ var key = keyGen(i + keyOffset);
+ if (typeof key === "string") {
+ body += `this.${key} = 0\n`;
+ } else {
+ body += `this[${key}] = 0\n`;
+ }
+ }
+ var f = new Function(body);
+ return new f();
+}
+
+function ObjectWithProperties(count, keyOffset) {
+ return ObjectWithKeys(count, keyOffset, (key) => "key" + key );
+}
+
+function ObjectWithElements(count, keyOffset) {
+ return ObjectWithKeys(count, keyOffset, (key) => key );
+}
+
+function ObjectWithMixedKeys(count, keyOffset) {
+ return ObjectWithKeys(count, keyOffset, (key) => {
+ if (key % 2 == 0) return (key / 2);
+ return "key" + ((key - 1) / 2);
+ });
+}
+
+// Create an object with #depth prototypes each having #keys properties
+// generated by given keyGen.
+function ObjectWithProtoKeys(depth, keys, cacheable,
+ keyGen = ObjectWithProperties) {
+ var o = keyGen(keys);
+ var current = o;
+ var keyOffset = 0;
+ for (var i = 0; i < depth; i++) {
+ keyOffset += keys;
+ current.__proto__ = keyGen(keys, keyOffset);
+ current = current.__proto__;
+ }
+ if (cacheable === false) {
+ // Add an empty proxy at the prototype chain to make caching properties
+ // impossible.
+ current.__proto__ = new Proxy({}, {});
+ }
+ return o;
+}
+
+
+function HoleyIntArray(size) {
+ var array = new Array(size);
+ for (var i = 0; i < size; i += 3) {
+ array[i] = i;
+ }
+ return array
+}
+
+function IntArray(size) {
+ var array = new Array(size);
+ for (var i = 0; i < size; i++) {
+ array[i] = i;
+ }
+ return array;
+}
+
+// Switch object's properties and elements to dictionary mode.
+function MakeDictionaryMode(obj) {
+ obj.foo = 0;
+ delete obj.foo;
+ obj[1e9] = 0;
+ return obj;
+}
+
+function Internalize(s) {
+ return Object.keys({[s]:0})[0];
+}
+
+function Deinternalize(s) {
+ return [...s].join("");
+}
+
+// ============================================================================
+
+const QUERY_INTERNALIZED_PROP = "INTERN-prop";
+const QUERY_DEINTERNALIZED_PROP = "DEINTERN-prop";
+const QUERY_NON_EXISTING_INTERNALIZED_PROP = "NE-INTERN-prop";
+const QUERY_NON_EXISTING_DEINTERNALIZED_PROP = "NE-DEINTERN-prop";
+const QUERY_ELEMENT = "el";
+const QUERY_ELEMENT_AS_STRING = "el-str";
+const QUERY_NON_EXISTING_ELEMENT = "NE-el";
+
+const OBJ_MODE_FAST = "fast";
+const OBJ_MODE_SLOW = "slow";
+
+var TestQueries = [
+ QUERY_INTERNALIZED_PROP,
+ QUERY_DEINTERNALIZED_PROP,
+ QUERY_NON_EXISTING_INTERNALIZED_PROP,
+ QUERY_NON_EXISTING_DEINTERNALIZED_PROP,
+ QUERY_ELEMENT,
+ QUERY_ELEMENT_AS_STRING,
+ QUERY_NON_EXISTING_ELEMENT,
+];
+
+const QUERIES_PER_OBJECT_NUMBER = 10;
+
+// Leave only every "count"th keys.
+function FilterKeys(keys, count) {
+ var len = keys.length;
+ if (len < count) throw new Error("Keys array is too short: " + len);
+ var step = len / count;
+ if (step == 0) throw new Error("Bad count specified: " + count);
+ return keys.filter((element, index) => index % step == 0);
+}
+
+
+function MakeKeyQueries(keys, query_kind) {
+ var properties = keys.filter((element) => isNaN(Number(element)));
+ var elements = keys.filter((element) => !isNaN(Number(element)));
+
+ properties = FilterKeys(properties, QUERIES_PER_OBJECT_NUMBER);
+ elements = FilterKeys(elements, QUERIES_PER_OBJECT_NUMBER);
+
+ switch (query_kind) {
+ case QUERY_INTERNALIZED_PROP:
+ return properties;
+
+ case QUERY_DEINTERNALIZED_PROP:
+ return properties.map(Deinternalize);
+
+ case QUERY_NON_EXISTING_INTERNALIZED_PROP:
+ case QUERY_NON_EXISTING_DEINTERNALIZED_PROP:
+ var non_existing = [];
+ for (var i = 0; i < QUERIES_PER_OBJECT_NUMBER; i++) {
+ non_existing.push("non-existing" + i);
+ }
+ if (query_kind == QUERY_NON_EXISTING_INTERNALIZED_PROP) {
+ return non_existing.map(Internalize);
+ } else {
+ return non_existing.map(Deinternalize);
+ }
+
+ case QUERY_ELEMENT:
+ return elements.map(Number);
+
+ case QUERY_ELEMENT_AS_STRING:
+ return elements.map(String);
+
+ case QUERY_NON_EXISTING_ELEMENT:
+ var non_existing = [];
+ for (var i = 0; i < QUERIES_PER_OBJECT_NUMBER; i++) {
+ non_existing.push(1200 + 100*i);
+ }
+ return non_existing;
+
+ default:
+ throw new Error("Bad query_kind: " + query_kind);
+ }
+}
+
+
+var TestData = [];
+
+[true, false].forEach((cachable) => {
+ [OBJ_MODE_FAST, OBJ_MODE_SLOW].forEach((obj_mode) => {
+ var proto_mode = cachable ? "" : "-with-slow-proto";
+ var name = `${obj_mode}-obj${proto_mode}`;
+ var objects = [];
+ [10, 50, 100, 200, 500].forEach((prop_count) => {
+ // Create object with prop_count properties and prop_count elements.
+ obj = ObjectWithProtoKeys(5, prop_count * 2, cachable,
+ ObjectWithMixedKeys);
+ if (obj_mode == OBJ_MODE_SLOW) {
+ obj = MakeDictionaryMode(obj);
+ }
+ objects.push(obj);
+ });
+ TestData.push({name, objects});
+ });
+});
+
+
+// ============================================================================
+
+function CreateTestFunction(template, object, keys) {
+ // Force a new function for each test-object to avoid side-effects due to ICs.
+ var text = "// random comment " + Math.random() + "\n" +
+ template(object, keys);
+ var func = new Function("object", "keys", text);
+ return () => func(object, keys);
+}
+
+function CombineTestFunctions(tests) {
+ return () => {
+ for (var i = 0; i < tests.length; i++ ) {
+ tests[i]();
+ }
+ };
+}
+
+var TestFunctions = [
+ {
+ name: "in",
+ // Query all keys.
+ keys: (object) => Object.keys(object),
+ template: (object, keys) => {
+ var lines = [
+ `var result = true;`,
+ `for (var i = 0; i < keys.length; i++) {`,
+ ` var key = keys[i];`,
+ ` result = (key in object) && result;`,
+ `}`,
+ `return result;`,
+ ];
+ return lines.join("\n");
+ },
+ },
+ {
+ name: "Object.hasOwnProperty",
+ // Query only own keys.
+ keys: (object) => Object.getOwnPropertyNames(object),
+ template: (object, keys) => {
+ var lines = [
+ `var result = true;`,
+ `for (var i = 0; i < keys.length; i++) {`,
+ ` var key = keys[i];`,
+ ` result = object.hasOwnProperty(key) && result;`,
+ `}`,
+ `return result;`,
+ ];
+ return lines.join("\n");
+ },
+ },
+];
+
+
+// ============================================================================
+// Create the benchmark suites. We create a suite for each pair of the test
+// functions above and query kind. Each suite contains benchmarks for each
+// object type.
+var Benchmarks = [];
+
+for (var test_function_desc of TestFunctions) {
+ var test_function_name = test_function_desc.name;
+
+ for (var query_kind of TestQueries) {
+ var benchmarks = [];
+ var suit_name = test_function_name + "--" + query_kind;
+ for (var test_data of TestData) {
+ var name = suit_name + "--" + test_data.name;
+
+ var tests = [];
+ for (var object of test_data.objects) {
+ var keys = test_function_desc.keys(object);
+ keys = MakeKeyQueries(keys, query_kind);
+
+ var test = CreateTestFunction(test_function_desc.template, object,
+ keys);
+ tests.push(test);
+ }
+ var run_function = CombineTestFunctions(tests);
+ var benchmark = new Benchmark(name, false, false, 0, run_function);
+ benchmarks.push(benchmark);
+ }
+ Benchmarks.push(new BenchmarkSuite(suit_name, [100], benchmarks));
+ }
+}
+
+// ============================================================================
diff --git a/test/js-perf-test/PropertyQueries/run.js b/test/js-perf-test/PropertyQueries/run.js
new file mode 100644
index 0000000..d98c366
--- /dev/null
+++ b/test/js-perf-test/PropertyQueries/run.js
@@ -0,0 +1,23 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('../base.js');
+load('property-queries.js');
+
+var success = true;
+
+function PrintResult(name, result) {
+ print(name + '-PropertyQueries(Score): ' + result);
+}
+
+function PrintError(name, error) {
+ PrintResult(name, error);
+ success = false;
+}
+
+BenchmarkSuite.config.doWarmup = undefined;
+BenchmarkSuite.config.doDeterministic = undefined;
+
+BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
+ NotifyError: PrintError });
diff --git a/test/message/const-decl-no-init-sloppy.js b/test/message/const-decl-no-init-sloppy.js
deleted file mode 100644
index a122eae..0000000
--- a/test/message/const-decl-no-init-sloppy.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --harmony-sloppy
-
-function f() {
- const a;
-}
diff --git a/test/message/let-lexical-name-in-array-prohibited.js b/test/message/let-lexical-name-in-array-prohibited.js
index a6cba6f..e5e37e1 100644
--- a/test/message/let-lexical-name-in-array-prohibited.js
+++ b/test/message/let-lexical-name-in-array-prohibited.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy --harmony-sloppy-let
+//
let [let];
diff --git a/test/message/let-lexical-name-in-object-prohibited.js b/test/message/let-lexical-name-in-object-prohibited.js
index 0a12762..4e26c62 100644
--- a/test/message/let-lexical-name-in-object-prohibited.js
+++ b/test/message/let-lexical-name-in-object-prohibited.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy --harmony-sloppy-let
+//
let {let};
diff --git a/test/message/let-lexical-name-prohibited.js b/test/message/let-lexical-name-prohibited.js
index ed72fae..b001be8 100644
--- a/test/message/let-lexical-name-prohibited.js
+++ b/test/message/let-lexical-name-prohibited.js
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy --harmony-sloppy-let
+//
let let;
diff --git a/test/message/message.gyp b/test/message/message.gyp
index dac6d9f..fc1ae32 100644
--- a/test/message/message.gyp
+++ b/test/message/message.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'message.isolate',
diff --git a/test/message/no-legacy-const-2.js b/test/message/no-legacy-const-2.js
deleted file mode 100644
index 5dc63b3..0000000
--- a/test/message/no-legacy-const-2.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
-// Flags: --no-harmony-sloppy-function
-
-const = 42;
diff --git a/test/message/no-legacy-const-2.out b/test/message/no-legacy-const-2.out
deleted file mode 100644
index 5385250..0000000
--- a/test/message/no-legacy-const-2.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: Unexpected token const
-const = 42;
-^^^^^
-
-SyntaxError: Unexpected token const
diff --git a/test/message/no-legacy-const-3.js b/test/message/no-legacy-const-3.js
deleted file mode 100644
index 43dd9c9..0000000
--- a/test/message/no-legacy-const-3.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
-// Flags: --no-harmony-sloppy-function
-
-const
diff --git a/test/message/no-legacy-const-3.out b/test/message/no-legacy-const-3.out
deleted file mode 100644
index 7539bbc..0000000
--- a/test/message/no-legacy-const-3.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: Unexpected token const
-const
-^^^^^
-
-SyntaxError: Unexpected token const
diff --git a/test/message/no-legacy-const.js b/test/message/no-legacy-const.js
deleted file mode 100644
index 9eebee5..0000000
--- a/test/message/no-legacy-const.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
-// Flags: --no-harmony-sloppy-function
-
-const x = 42;
diff --git a/test/message/no-legacy-const.out b/test/message/no-legacy-const.out
deleted file mode 100644
index 33bb038..0000000
--- a/test/message/no-legacy-const.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: Unexpected token const
-const x = 42;
-^^^^^
-
-SyntaxError: Unexpected token const
diff --git a/test/message/syntactic-tail-call-in-binop-lhs.js b/test/message/syntactic-tail-call-in-binop-lhs.js
new file mode 100644
index 0000000..58d4c95
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-binop-lhs.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return continue f() - a ;
+}
diff --git a/test/message/syntactic-tail-call-in-binop-lhs.out b/test/message/syntactic-tail-call-in-binop-lhs.out
new file mode 100644
index 0000000..14670cd
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-binop-lhs.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return continue f() - a ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-binop-rhs.js b/test/message/syntactic-tail-call-in-binop-rhs.js
new file mode 100644
index 0000000..a586cc8
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-binop-rhs.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return b + continue f() ;
+}
diff --git a/test/message/syntactic-tail-call-in-binop-rhs.out b/test/message/syntactic-tail-call-in-binop-rhs.out
new file mode 100644
index 0000000..207c526
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-binop-rhs.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return b + continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-comma.js b/test/message/syntactic-tail-call-in-comma.js
new file mode 100644
index 0000000..402a4a8
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-comma.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return 1, 2, 3, continue f() , 4 ;
+}
diff --git a/test/message/syntactic-tail-call-in-comma.out b/test/message/syntactic-tail-call-in-comma.out
new file mode 100644
index 0000000..c4ecc28
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-comma.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return 1, 2, 3, continue f() , 4 ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-extends.js b/test/message/syntactic-tail-call-in-extends.js
new file mode 100644
index 0000000..86bf77e
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-extends.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function g() {
+ return class A extends continue f() {};
+}
diff --git a/test/message/syntactic-tail-call-in-extends.out b/test/message/syntactic-tail-call-in-extends.out
new file mode 100644
index 0000000..f54155d
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-extends.out
@@ -0,0 +1,4 @@
+*%(basename)s:9: SyntaxError: Tail call expression is not allowed here
+ return class A extends continue f() {};
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-for-in.js b/test/message/syntactic-tail-call-in-for-in.js
new file mode 100644
index 0000000..8ad7aca
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-for-in.js
@@ -0,0 +1,16 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ for (var v in {a:0}) {
+ return continue f() ;
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-for-in.out b/test/message/syntactic-tail-call-in-for-in.out
new file mode 100644
index 0000000..1bf52c4
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-for-in.out
@@ -0,0 +1,4 @@
+*%(basename)s:14: SyntaxError: Tail call expression in for-in/of body
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression in for-in/of body
diff --git a/test/message/syntactic-tail-call-in-for-of.js b/test/message/syntactic-tail-call-in-for-of.js
new file mode 100644
index 0000000..7cd761f
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-for-of.js
@@ -0,0 +1,16 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ for (var v of [1, 2, 3]) {
+ return continue f() ;
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-for-of.out b/test/message/syntactic-tail-call-in-for-of.out
new file mode 100644
index 0000000..1bf52c4
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-for-of.out
@@ -0,0 +1,4 @@
+*%(basename)s:14: SyntaxError: Tail call expression in for-in/of body
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression in for-in/of body
diff --git a/test/message/syntactic-tail-call-in-logical-and.js b/test/message/syntactic-tail-call-in-logical-and.js
new file mode 100644
index 0000000..2c62ddc
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-logical-and.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return continue f() && a ;
+}
diff --git a/test/message/syntactic-tail-call-in-logical-and.out b/test/message/syntactic-tail-call-in-logical-and.out
new file mode 100644
index 0000000..c400f74
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-logical-and.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return continue f() && a ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-logical-or.js b/test/message/syntactic-tail-call-in-logical-or.js
new file mode 100644
index 0000000..6829bc6
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-logical-or.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return continue f() || a ;
+}
diff --git a/test/message/syntactic-tail-call-in-logical-or.out b/test/message/syntactic-tail-call-in-logical-or.out
new file mode 100644
index 0000000..4ced761
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-logical-or.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return continue f() || a ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-subclass.js b/test/message/syntactic-tail-call-in-subclass.js
new file mode 100644
index 0000000..ab78840
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-subclass.js
@@ -0,0 +1,15 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function g() {
+ class A {};
+ class B extends A {
+ constructor() {
+ return continue f() ;
+ }
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-subclass.out b/test/message/syntactic-tail-call-in-subclass.out
new file mode 100644
index 0000000..fff26cc
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-subclass.out
@@ -0,0 +1,4 @@
+*%(basename)s:12: SyntaxError: Tail call expression is not allowed here
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-in-try-catch-finally.js b/test/message/syntactic-tail-call-in-try-catch-finally.js
new file mode 100644
index 0000000..3aa35a1
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try-catch-finally.js
@@ -0,0 +1,20 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ try {
+ f();
+ } catch(e) {
+ return continue f() ;
+ } finally {
+ f();
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-try-catch-finally.out b/test/message/syntactic-tail-call-in-try-catch-finally.out
new file mode 100644
index 0000000..b488c15
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try-catch-finally.out
@@ -0,0 +1,4 @@
+*%(basename)s:16: SyntaxError: Tail call expression in catch block when finally block is also present
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression in catch block when finally block is also present
diff --git a/test/message/syntactic-tail-call-in-try-try-catch-finally.js b/test/message/syntactic-tail-call-in-try-try-catch-finally.js
new file mode 100644
index 0000000..5b000f1
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try-try-catch-finally.js
@@ -0,0 +1,22 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ try {
+ try {
+ f();
+ } catch(e) {
+ return continue f() ;
+ }
+ } finally {
+ f();
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-try-try-catch-finally.out b/test/message/syntactic-tail-call-in-try-try-catch-finally.out
new file mode 100644
index 0000000..bfc2692
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try-try-catch-finally.out
@@ -0,0 +1,4 @@
+*%(basename)s:17: SyntaxError: Tail call expression in try block
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression in try block
diff --git a/test/message/syntactic-tail-call-in-try.js b/test/message/syntactic-tail-call-in-try.js
new file mode 100644
index 0000000..71662db
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try.js
@@ -0,0 +1,17 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ try {
+ return continue f() ;
+ } catch(e) {
+ }
+}
diff --git a/test/message/syntactic-tail-call-in-try.out b/test/message/syntactic-tail-call-in-try.out
new file mode 100644
index 0000000..ed0b15c
--- /dev/null
+++ b/test/message/syntactic-tail-call-in-try.out
@@ -0,0 +1,4 @@
+*%(basename)s:14: SyntaxError: Tail call expression in try block
+ return continue f() ;
+ ^^^^^^^^^^^^
+SyntaxError: Tail call expression in try block
diff --git a/test/message/syntactic-tail-call-inside-member-expr.js b/test/message/syntactic-tail-call-inside-member-expr.js
new file mode 100644
index 0000000..9b85dd4
--- /dev/null
+++ b/test/message/syntactic-tail-call-inside-member-expr.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return (continue f(1)) (2) ;
+}
diff --git a/test/message/syntactic-tail-call-inside-member-expr.out b/test/message/syntactic-tail-call-inside-member-expr.out
new file mode 100644
index 0000000..10fd54d
--- /dev/null
+++ b/test/message/syntactic-tail-call-inside-member-expr.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ return (continue f(1)) (2) ;
+ ^^^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/message/syntactic-tail-call-of-eval.js b/test/message/syntactic-tail-call-of-eval.js
new file mode 100644
index 0000000..e69aa9c
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-eval.js
@@ -0,0 +1,9 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+
+function g() {
+ return continue eval ("f()") ;
+}
diff --git a/test/message/syntactic-tail-call-of-eval.out b/test/message/syntactic-tail-call-of-eval.out
new file mode 100644
index 0000000..06eeb78
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-eval.out
@@ -0,0 +1,4 @@
+*%(basename)s:8: SyntaxError: Tail call of a direct eval is not allowed
+ return continue eval ("f()") ;
+ ^^^^^^^^^^^^^
+SyntaxError: Tail call of a direct eval is not allowed
diff --git a/test/message/syntactic-tail-call-of-identifier.js b/test/message/syntactic-tail-call-of-identifier.js
new file mode 100644
index 0000000..b3ca31d
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-identifier.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function g(x) {
+ return continue x ;
+}
diff --git a/test/message/syntactic-tail-call-of-identifier.out b/test/message/syntactic-tail-call-of-identifier.out
new file mode 100644
index 0000000..393bbc6
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-identifier.out
@@ -0,0 +1,4 @@
+*%(basename)s:9: SyntaxError: Unexpected expression inside tail call
+ return continue x ;
+ ^
+SyntaxError: Unexpected expression inside tail call
diff --git a/test/message/syntactic-tail-call-of-new.js b/test/message/syntactic-tail-call-of-new.js
new file mode 100644
index 0000000..60adec7
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-new.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+
+function f() {
+ return 1;
+}
+
+function g() {
+ return continue new f() ;
+}
diff --git a/test/message/syntactic-tail-call-of-new.out b/test/message/syntactic-tail-call-of-new.out
new file mode 100644
index 0000000..954e1ca
--- /dev/null
+++ b/test/message/syntactic-tail-call-of-new.out
@@ -0,0 +1,4 @@
+*%(basename)s:12: SyntaxError: Unexpected expression inside tail call
+ return continue new f() ;
+ ^^^^^^^
+SyntaxError: Unexpected expression inside tail call
diff --git a/test/message/syntactic-tail-call-sloppy.js b/test/message/syntactic-tail-call-sloppy.js
new file mode 100644
index 0000000..3973fc6
--- /dev/null
+++ b/test/message/syntactic-tail-call-sloppy.js
@@ -0,0 +1,9 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+
+function g() {
+ return continue f() ;
+}
diff --git a/test/message/syntactic-tail-call-sloppy.out b/test/message/syntactic-tail-call-sloppy.out
new file mode 100644
index 0000000..74d9d53
--- /dev/null
+++ b/test/message/syntactic-tail-call-sloppy.out
@@ -0,0 +1,4 @@
+*%(basename)s:8: SyntaxError: Tail call expressions are not allowed in non-strict mode
+ return continue f() ;
+ ^^^^^^^^^^^^^
+SyntaxError: Tail call expressions are not allowed in non-strict mode
diff --git a/test/message/syntactic-tail-call-without-return.js b/test/message/syntactic-tail-call-without-return.js
new file mode 100644
index 0000000..130f67d
--- /dev/null
+++ b/test/message/syntactic-tail-call-without-return.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-explicit-tailcalls
+"use strict";
+
+function f() {
+ return 1;
+}
+
+function g() {
+ var x = continue f() ;
+}
diff --git a/test/message/syntactic-tail-call-without-return.out b/test/message/syntactic-tail-call-without-return.out
new file mode 100644
index 0000000..0508fc3
--- /dev/null
+++ b/test/message/syntactic-tail-call-without-return.out
@@ -0,0 +1,4 @@
+*%(basename)s:13: SyntaxError: Tail call expression is not allowed here
+ var x = continue f() ;
+ ^^^^^^^^^^^^^
+SyntaxError: Tail call expression is not allowed here
diff --git a/test/mjsunit/arguments.js b/test/mjsunit/arguments.js
index 26eb389..97ec7cc 100644
--- a/test/mjsunit/arguments.js
+++ b/test/mjsunit/arguments.js
@@ -204,3 +204,70 @@
}
assertTrue(%HasSloppyArgumentsElements(a));
})();
+
+(function testDeleteArguments() {
+ function f() { return arguments };
+ var args = f(1, 2);
+ assertEquals(1, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(2, args.length);
+
+ delete args[0];
+ assertEquals(undefined, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(2, args.length);
+
+ delete args[1];
+ assertEquals(undefined, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(2, args.length);
+})();
+
+(function testDeleteFastSloppyArguments() {
+ function f(a) { return arguments };
+ var args = f(1, 2);
+ assertEquals(1, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(2, args.length);
+
+ delete args[0];
+ assertEquals(undefined, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(2, args.length);
+
+ delete args[1];
+ assertEquals(undefined, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(2, args.length);
+})();
+
+(function testDeleteSlowSloppyArguments() {
+ var key = 10000;
+ function f(a) {
+ arguments[key] = key;
+ return arguments
+ };
+ var args = f(1, 2);
+ assertEquals(1, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(key, args[key]);
+ assertEquals(2, args.length);
+
+ delete args[0];
+ assertEquals(undefined, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(key, args[key]);
+ assertEquals(2, args.length);
+
+ delete args[1];
+ assertEquals(undefined, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(key, args[key]);
+ assertEquals(2, args.length);
+
+ delete args[key];
+ assertEquals(undefined, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(undefined, args[key]);
+ assertEquals(2, args.length);
+})();
diff --git a/test/mjsunit/array-push.js b/test/mjsunit/array-push.js
index c87fd12..ece3319 100644
--- a/test/mjsunit/array-push.js
+++ b/test/mjsunit/array-push.js
@@ -146,3 +146,16 @@
f(a, {});
assertEquals(10, a.f());
})();
+
+
+(function testDoubleArrayPush() {
+ var a = [];
+ var max = 1000;
+ for (var i = 0; i < max; i++) {
+ a.push(i + 0.1);
+ }
+ assertEquals(max, a.length);
+ for (var i = 0; i < max; i++) {
+ assertEquals(i+0.1, a[i]);
+ }
+})();
diff --git a/test/mjsunit/array-push7.js b/test/mjsunit/array-push7.js
deleted file mode 100644
index 68c3a2a..0000000
--- a/test/mjsunit/array-push7.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe
-// Flags: --allow-natives-syntax
-
-var v = 0;
-
-function push_wrapper(array, value) {
- array.push(value);
-}
-function pop_wrapper(array) {
- return array.pop();
-}
-
-// Test that Object.observe() notification events are properly sent from
-// Array.push() and Array.pop() both from optimized and un-optimized code.
-var array = [];
-
-function somethingChanged(changes) {
- v++;
-}
-
-Object.observe(array, somethingChanged);
-push_wrapper(array, 1);
-%RunMicrotasks();
-assertEquals(1, array.length);
-assertEquals(1, v);
-push_wrapper(array, 1);
-%RunMicrotasks();
-assertEquals(2, array.length);
-assertEquals(2, v);
-%OptimizeFunctionOnNextCall(push_wrapper);
-push_wrapper(array, 1);
-%RunMicrotasks();
-assertEquals(3, array.length);
-assertEquals(3, v);
-push_wrapper(array, 1);
-%RunMicrotasks();
-assertEquals(4, array.length);
-assertEquals(4, v);
-
-pop_wrapper(array);
-%RunMicrotasks();
-assertEquals(3, array.length);
-assertEquals(5, v);
-pop_wrapper(array);
-%RunMicrotasks();
-assertEquals(2, array.length);
-assertEquals(6, v);
-%OptimizeFunctionOnNextCall(pop_wrapper);
-pop_wrapper(array);
-%RunMicrotasks();
-assertEquals(1, array.length);
-assertEquals(7, v);
-pop_wrapper(array);
-%RunMicrotasks();
-assertEquals(0, array.length);
-assertEquals(8, v);
diff --git a/test/mjsunit/array-slice.js b/test/mjsunit/array-slice.js
index ae0e3bc..b017dd5 100644
--- a/test/mjsunit/array-slice.js
+++ b/test/mjsunit/array-slice.js
@@ -228,6 +228,7 @@
func([]);
func(['a'], 'a');
func(['a', 1], 'a', 1);
+ func(['a', 1, 2, 3, 4, 5], 'a', 1, 2, 3, 4, 5);
func(['a', 1, undefined], 'a', 1, undefined);
func(['a', 1, undefined, void(0)], 'a', 1, undefined, void(0));
})();
diff --git a/test/mjsunit/array-splice.js b/test/mjsunit/array-splice.js
index 744e954..75ff2d1 100644
--- a/test/mjsunit/array-splice.js
+++ b/test/mjsunit/array-splice.js
@@ -300,6 +300,55 @@
}
})();
+// Check the behaviour when approaching maximal values for length.
+(function() {
+ for (var i = 0; i < 7; i++) {
+ try {
+ new Array(Math.pow(2, 32) - 3).splice(-1, 0, 1, 2, 3, 4, 5);
+ throw 'Should have thrown RangeError';
+ } catch (e) {
+ assertTrue(e instanceof RangeError);
+ }
+
+ // Check smi boundary
+ var bigNum = (1 << 30) - 3;
+ var array = new Array(bigNum);
+ array.splice(-1, 0, 1, 2, 3, 4, 5, 6, 7);
+ assertEquals(bigNum + 7, array.length);
+ }
+})();
+
+(function() {
+ for (var i = 0; i < 7; i++) {
+ var a = [7, 8, 9];
+ a.splice(0, 0, 1, 2, 3, 4, 5, 6);
+ assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], a);
+ assertFalse(a.hasOwnProperty(10), "a.hasOwnProperty(10)");
+ assertEquals(undefined, a[10]);
+ }
+})();
+
+(function testSpliceDeleteDouble() {
+ var a = [1.1, 1.2, 1.3, 1.4];
+ a.splice(2, 1)
+ assertEquals([1.1, 1.2, 1.4], a);
+})();
+
+// Past this point the ArrayProtector is invalidated since we modify the
+// Array.prototype.
+
+// Check the case of JS builtin .splice()
+(function() {
+ for (var i = 0; i < 7; i++) {
+ var array = [1, 2, 3, 4];
+ Array.prototype[3] = 'foo'; // To force JS builtin.
+
+ var spliced = array.splice();
+
+ assertEquals([], spliced);
+ assertEquals([1, 2, 3, 4], array);
+ }
+})();
// Now check the case with array of holes and some elements on prototype.
(function() {
@@ -350,7 +399,6 @@
}
})();
-
// Now check the case with array of holes and some elements on prototype.
(function() {
var len = 9;
@@ -397,46 +445,3 @@
"array.hasOwnProperty(Math.pow(2, 32) - 2)");
}
})();
-
-
-// Check the case of JS builtin .splice()
-(function() {
- for (var i = 0; i < 7; i++) {
- var array = [1, 2, 3, 4];
- Array.prototype[3] = 'foo'; // To force JS builtin.
-
- var spliced = array.splice();
-
- assertEquals([], spliced);
- assertEquals([1, 2, 3, 4], array);
- }
-})();
-
-
-// Check the behaviour when approaching maximal values for length.
-(function() {
- for (var i = 0; i < 7; i++) {
- try {
- new Array(Math.pow(2, 32) - 3).splice(-1, 0, 1, 2, 3, 4, 5);
- throw 'Should have thrown RangeError';
- } catch (e) {
- assertTrue(e instanceof RangeError);
- }
-
- // Check smi boundary
- var bigNum = (1 << 30) - 3;
- var array = new Array(bigNum);
- array.splice(-1, 0, 1, 2, 3, 4, 5, 6, 7);
- assertEquals(bigNum + 7, array.length);
- }
-})();
-
-(function() {
- for (var i = 0; i < 7; i++) {
- var a = [7, 8, 9];
- a.splice(0, 0, 1, 2, 3, 4, 5, 6);
- assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], a);
- assertFalse(a.hasOwnProperty(10), "a.hasOwnProperty(10)");
- assertEquals(undefined, a[10]);
- }
-})();
diff --git a/test/mjsunit/compiler/escape-analysis-1.js b/test/mjsunit/compiler/escape-analysis-1.js
index b8c6644..f05040b 100644
--- a/test/mjsunit/compiler/escape-analysis-1.js
+++ b/test/mjsunit/compiler/escape-analysis-1.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-10.js b/test/mjsunit/compiler/escape-analysis-10.js
index c53cf4d..4f06d57 100644
--- a/test/mjsunit/compiler/escape-analysis-10.js
+++ b/test/mjsunit/compiler/escape-analysis-10.js
@@ -26,6 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
+
(function() {
"use strict";
function f() {
diff --git a/test/mjsunit/compiler/escape-analysis-2.js b/test/mjsunit/compiler/escape-analysis-2.js
index d116e9a..49f440e 100644
--- a/test/mjsunit/compiler/escape-analysis-2.js
+++ b/test/mjsunit/compiler/escape-analysis-2.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-3.js b/test/mjsunit/compiler/escape-analysis-3.js
index d1ebc9b..b92d1c3 100644
--- a/test/mjsunit/compiler/escape-analysis-3.js
+++ b/test/mjsunit/compiler/escape-analysis-3.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-4.js b/test/mjsunit/compiler/escape-analysis-4.js
index d9fdccc..ef9f95f 100644
--- a/test/mjsunit/compiler/escape-analysis-4.js
+++ b/test/mjsunit/compiler/escape-analysis-4.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-5.js b/test/mjsunit/compiler/escape-analysis-5.js
index cfaf81d..54b5e82 100644
--- a/test/mjsunit/compiler/escape-analysis-5.js
+++ b/test/mjsunit/compiler/escape-analysis-5.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(h) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-6.js b/test/mjsunit/compiler/escape-analysis-6.js
index 6143cfb..c36e7d9 100644
--- a/test/mjsunit/compiler/escape-analysis-6.js
+++ b/test/mjsunit/compiler/escape-analysis-6.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
"use strict";
diff --git a/test/mjsunit/compiler/escape-analysis-7.js b/test/mjsunit/compiler/escape-analysis-7.js
index 16bc71c..cfa30cb 100644
--- a/test/mjsunit/compiler/escape-analysis-7.js
+++ b/test/mjsunit/compiler/escape-analysis-7.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f() {
this.x=0;
diff --git a/test/mjsunit/compiler/escape-analysis-8.js b/test/mjsunit/compiler/escape-analysis-8.js
index bc5b1d9..d9c6d25 100644
--- a/test/mjsunit/compiler/escape-analysis-8.js
+++ b/test/mjsunit/compiler/escape-analysis-8.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f(a) {
this.x=a;
diff --git a/test/mjsunit/compiler/escape-analysis-9.js b/test/mjsunit/compiler/escape-analysis-9.js
index a19786b..0b8f75c 100644
--- a/test/mjsunit/compiler/escape-analysis-9.js
+++ b/test/mjsunit/compiler/escape-analysis-9.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --turbo-escape
-//
function f() {
return arguments;
diff --git a/test/mjsunit/compiler/optimized-float32array-length.js b/test/mjsunit/compiler/optimized-float32array-length.js
new file mode 100644
index 0000000..eed8922
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-float32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = new Float32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-float64array-length.js b/test/mjsunit/compiler/optimized-float64array-length.js
new file mode 100644
index 0000000..f6a3d77
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-float64array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = new Float64Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-instanceof-1.js b/test/mjsunit/compiler/optimized-instanceof-1.js
new file mode 100644
index 0000000..538b0ef
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-instanceof-1.js
@@ -0,0 +1,17 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-instanceof
+
+function F() {}
+var f = new F
+
+var proto = Object.getPrototypeOf(F);
+Object.setPrototypeOf(F, null);
+F[Symbol.hasInstance] = function(v) { return true };
+Object.setPrototypeOf(F, proto);
+
+function foo(x) { return x instanceof F };
+%OptimizeFunctionOnNextCall(foo);
+assertTrue(foo(1));
diff --git a/test/mjsunit/compiler/optimized-instanceof-2.js b/test/mjsunit/compiler/optimized-instanceof-2.js
new file mode 100644
index 0000000..80bbdcd
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-instanceof-2.js
@@ -0,0 +1,19 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-instanceof
+
+function F() {}
+var f = new F
+
+function foo(x) { return x instanceof F };
+%OptimizeFunctionOnNextCall(foo);
+assertFalse(foo(1));
+
+var proto = Object.getPrototypeOf(F);
+Object.setPrototypeOf(F, null);
+F[Symbol.hasInstance] = function(v) { return true };
+Object.setPrototypeOf(F, proto);
+
+assertTrue(foo(1));
diff --git a/test/mjsunit/compiler/optimized-int32array-length.js b/test/mjsunit/compiler/optimized-int32array-length.js
new file mode 100644
index 0000000..250d523
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-int32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = new Int32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/optimized-uint32array-length.js b/test/mjsunit/compiler/optimized-uint32array-length.js
new file mode 100644
index 0000000..d389370
--- /dev/null
+++ b/test/mjsunit/compiler/optimized-uint32array-length.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = new Uint32Array(1);
+function len(a) { return a.length; }
+assertEquals(1, len(a));
+assertEquals(1, len(a));
+%OptimizeFunctionOnNextCall(len);
+assertEquals(1, len(a));
+assertOptimized(len);
diff --git a/test/mjsunit/compiler/osr-alignment.js b/test/mjsunit/compiler/osr-alignment.js
index 085d6c4..f815e71 100644
--- a/test/mjsunit/compiler/osr-alignment.js
+++ b/test/mjsunit/compiler/osr-alignment.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function f1() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-backedges1.js b/test/mjsunit/compiler/osr-backedges1.js
index d415f4a..18a7e04 100644
--- a/test/mjsunit/compiler/osr-backedges1.js
+++ b/test/mjsunit/compiler/osr-backedges1.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function foo(a) {
var i = a | 0;
diff --git a/test/mjsunit/compiler/osr-block-scope-func.js b/test/mjsunit/compiler/osr-block-scope-func.js
index df4076c..7c41f54 100644
--- a/test/mjsunit/compiler/osr-block-scope-func.js
+++ b/test/mjsunit/compiler/osr-block-scope-func.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
"use strict";
diff --git a/test/mjsunit/compiler/osr-block-scope-id.js b/test/mjsunit/compiler/osr-block-scope-id.js
index 923c72f..bcc7cdd 100644
--- a/test/mjsunit/compiler/osr-block-scope-id.js
+++ b/test/mjsunit/compiler/osr-block-scope-id.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
"use strict";
diff --git a/test/mjsunit/compiler/osr-block-scope.js b/test/mjsunit/compiler/osr-block-scope.js
index 0d78cdc..c60f8af 100644
--- a/test/mjsunit/compiler/osr-block-scope.js
+++ b/test/mjsunit/compiler/osr-block-scope.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
"use strict";
diff --git a/test/mjsunit/compiler/osr-follow.js b/test/mjsunit/compiler/osr-follow.js
index b6a2e8e..46581a8 100644
--- a/test/mjsunit/compiler/osr-follow.js
+++ b/test/mjsunit/compiler/osr-follow.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function foo(a) {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-for-let.js b/test/mjsunit/compiler/osr-for-let.js
index 4b2fa3e..b8cef78 100644
--- a/test/mjsunit/compiler/osr-for-let.js
+++ b/test/mjsunit/compiler/osr-for-let.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
"use strict";
diff --git a/test/mjsunit/compiler/osr-forin-nested.js b/test/mjsunit/compiler/osr-forin-nested.js
index ad55b30..dd81089 100644
--- a/test/mjsunit/compiler/osr-forin-nested.js
+++ b/test/mjsunit/compiler/osr-forin-nested.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --turbo-osr --allow-natives-syntax
+// Flags: --allow-natives-syntax
function test(e, f, v) {
assertEquals(e, f(v));
diff --git a/test/mjsunit/compiler/osr-forin.js b/test/mjsunit/compiler/osr-forin.js
index 8d16782..b45d200 100644
--- a/test/mjsunit/compiler/osr-forin.js
+++ b/test/mjsunit/compiler/osr-forin.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function f(a) {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-forof.js b/test/mjsunit/compiler/osr-forof.js
index 36bff09..ce7b24d 100644
--- a/test/mjsunit/compiler/osr-forof.js
+++ b/test/mjsunit/compiler/osr-forof.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function f(a) {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-function-id.js b/test/mjsunit/compiler/osr-function-id.js
index c506ae8..8761e85 100644
--- a/test/mjsunit/compiler/osr-function-id.js
+++ b/test/mjsunit/compiler/osr-function-id.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function id(f) { return f; }
diff --git a/test/mjsunit/compiler/osr-function-id2.js b/test/mjsunit/compiler/osr-function-id2.js
index 561c62e..e25ec31 100644
--- a/test/mjsunit/compiler/osr-function-id2.js
+++ b/test/mjsunit/compiler/osr-function-id2.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function id(f) { return f; }
diff --git a/test/mjsunit/compiler/osr-function.js b/test/mjsunit/compiler/osr-function.js
index 06d137b..cee7e9d 100644
--- a/test/mjsunit/compiler/osr-function.js
+++ b/test/mjsunit/compiler/osr-function.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function foo() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-infinite.js b/test/mjsunit/compiler/osr-infinite.js
index aa74c87..9d0bb47 100644
--- a/test/mjsunit/compiler/osr-infinite.js
+++ b/test/mjsunit/compiler/osr-infinite.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --allow-natives-syntax --turbo-osr
+// Flags: --use-osr --allow-natives-syntax
var global_counter = 0;
diff --git a/test/mjsunit/compiler/osr-labeled.js b/test/mjsunit/compiler/osr-labeled.js
index 1a97092..1384e9a 100644
--- a/test/mjsunit/compiler/osr-labeled.js
+++ b/test/mjsunit/compiler/osr-labeled.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function foo() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-literals-adapted.js b/test/mjsunit/compiler/osr-literals-adapted.js
index 950d8b0..4d1798c 100644
--- a/test/mjsunit/compiler/osr-literals-adapted.js
+++ b/test/mjsunit/compiler/osr-literals-adapted.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function mod() {
function f0() {
diff --git a/test/mjsunit/compiler/osr-literals.js b/test/mjsunit/compiler/osr-literals.js
index d9f68a0..f2051dc 100644
--- a/test/mjsunit/compiler/osr-literals.js
+++ b/test/mjsunit/compiler/osr-literals.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function mod() {
function f0() {
diff --git a/test/mjsunit/compiler/osr-manual1.js b/test/mjsunit/compiler/osr-manual1.js
index 29a4948..c3db796 100644
--- a/test/mjsunit/compiler/osr-manual1.js
+++ b/test/mjsunit/compiler/osr-manual1.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
var counter = 111;
diff --git a/test/mjsunit/compiler/osr-manual2.js b/test/mjsunit/compiler/osr-manual2.js
index 8aa5d69..de7ec24 100644
--- a/test/mjsunit/compiler/osr-manual2.js
+++ b/test/mjsunit/compiler/osr-manual2.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
var counter = 188;
diff --git a/test/mjsunit/compiler/osr-multiple.js b/test/mjsunit/compiler/osr-multiple.js
index c318645..72fff85 100644
--- a/test/mjsunit/compiler/osr-multiple.js
+++ b/test/mjsunit/compiler/osr-multiple.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function f1(a,b,c) {
var x = 0;
diff --git a/test/mjsunit/compiler/osr-multiple2.js b/test/mjsunit/compiler/osr-multiple2.js
index 9a81bfb..edb627a 100644
--- a/test/mjsunit/compiler/osr-multiple2.js
+++ b/test/mjsunit/compiler/osr-multiple2.js
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --use-osr
-// TODO(titzer): enable --turbo-osr when nested OSR works.
function f1(a,b,c) {
var x = 0;
diff --git a/test/mjsunit/compiler/osr-multiple3.js b/test/mjsunit/compiler/osr-multiple3.js
index 0fb1ac7..fa703ea 100644
--- a/test/mjsunit/compiler/osr-multiple3.js
+++ b/test/mjsunit/compiler/osr-multiple3.js
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --use-osr
-// TODO(titzer): enable --turbo-osr when nested OSR works.
function f1(a,b,c) {
var x = 0;
diff --git a/test/mjsunit/compiler/osr-nested2.js b/test/mjsunit/compiler/osr-nested2.js
index 41bd9b2..efe31f1 100644
--- a/test/mjsunit/compiler/osr-nested2.js
+++ b/test/mjsunit/compiler/osr-nested2.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested2b.js b/test/mjsunit/compiler/osr-nested2b.js
index e64c10c..1808811 100644
--- a/test/mjsunit/compiler/osr-nested2b.js
+++ b/test/mjsunit/compiler/osr-nested2b.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested3.js b/test/mjsunit/compiler/osr-nested3.js
index f5d09ba..d7c144b 100644
--- a/test/mjsunit/compiler/osr-nested3.js
+++ b/test/mjsunit/compiler/osr-nested3.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-nested3b.js b/test/mjsunit/compiler/osr-nested3b.js
index 32ac2a7..a10d328 100644
--- a/test/mjsunit/compiler/osr-nested3b.js
+++ b/test/mjsunit/compiler/osr-nested3b.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
diff --git a/test/mjsunit/compiler/osr-regex-id.js b/test/mjsunit/compiler/osr-regex-id.js
index 7831b14..e0b4dad 100644
--- a/test/mjsunit/compiler/osr-regex-id.js
+++ b/test/mjsunit/compiler/osr-regex-id.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function id(f) { return f; }
diff --git a/test/mjsunit/compiler/osr-sar.js b/test/mjsunit/compiler/osr-sar.js
index cc04adc..02684f0 100644
--- a/test/mjsunit/compiler/osr-sar.js
+++ b/test/mjsunit/compiler/osr-sar.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
function test() {
// Loop to force OSR.
diff --git a/test/mjsunit/compiler/osr-warm.js b/test/mjsunit/compiler/osr-warm.js
index 7c30c07..73e1fd5 100644
--- a/test/mjsunit/compiler/osr-warm.js
+++ b/test/mjsunit/compiler/osr-warm.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --use-osr --turbo-osr
+// Flags: --use-osr
function f1(x) {
while (x > 0) {
diff --git a/test/mjsunit/compiler/osr-while-let.js b/test/mjsunit/compiler/osr-while-let.js
index c19cf6c..11ebc4b 100644
--- a/test/mjsunit/compiler/osr-while-let.js
+++ b/test/mjsunit/compiler/osr-while-let.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr
"use strict";
diff --git a/test/mjsunit/compiler/regress-607493.js b/test/mjsunit/compiler/regress-607493.js
new file mode 100644
index 0000000..540b47e
--- /dev/null
+++ b/test/mjsunit/compiler/regress-607493.js
@@ -0,0 +1,37 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function ForInTryCatchContrinueOsr() {
+ var a = [1];
+
+ function g() {
+ for (var x in a) {
+ try {
+ for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
+ return;
+ } catch(e) {
+ continue;
+ }
+ }
+ }
+
+ g();
+})();
+
+(function ForInContinueNestedOsr() {
+ var a = [1];
+
+ function g() {
+ for (var x in a) {
+ if (x) {
+ for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
+ }
+ continue;
+ }
+ }
+
+ g();
+})();
diff --git a/test/mjsunit/compiler/regress-621147.js b/test/mjsunit/compiler/regress-621147.js
new file mode 100644
index 0000000..0a5a221
--- /dev/null
+++ b/test/mjsunit/compiler/regress-621147.js
@@ -0,0 +1,29 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-filter=test2
+
+function test(n) {
+ return Array(n);
+}
+
+function test2() {
+ return test(2);
+}
+
+function test3(a) {
+ a[0] = 1;
+}
+
+test(0);
+
+var smi_array = [1,2];
+smi_array[2] = 3;
+test3(smi_array);
+
+%OptimizeFunctionOnNextCall(test2);
+
+var broken_array = test2();
+test3(broken_array);
+1+broken_array[0];
diff --git a/test/mjsunit/compiler/try-osr.js b/test/mjsunit/compiler/try-osr.js
index e4eb8dd..c0ef27a 100644
--- a/test/mjsunit/compiler/try-osr.js
+++ b/test/mjsunit/compiler/try-osr.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --turbo-osr
+// Flags: --allow-natives-syntax
function OSRInsideTry(x) {
try {
diff --git a/test/mjsunit/debug-allscopes-on-debugger.js b/test/mjsunit/debug-allscopes-on-debugger.js
index b7a8dff..17668cf 100644
--- a/test/mjsunit/debug-allscopes-on-debugger.js
+++ b/test/mjsunit/debug-allscopes-on-debugger.js
@@ -49,10 +49,11 @@
var i = 0; // Break 1.
i++; // Break 2.
i++; // Break 3.
- return i; // Break 4.
-}()); // Break 5.
+ debugger; // Break 4.
+ return i; // Break 5.
+}()); // Break 6.
-assertNull(exception); // Break 6.
+assertNull(exception); // Break 7.
assertEquals(expected_breaks, break_count);
Debug.setListener(null);
diff --git a/test/mjsunit/debug-backtrace-text.js b/test/mjsunit/debug-backtrace-text.js
index 61648fa..cfc89e6 100644
--- a/test/mjsunit/debug-backtrace-text.js
+++ b/test/mjsunit/debug-backtrace-text.js
@@ -35,7 +35,8 @@
Point.prototype.distanceTo = function(p) {
debugger;
- return Math.sqrt(Math.pow(Math.abs(this.x - p.x), 2) + Math.pow(Math.abs(this.y - p.y), 2))
+ return Math.sqrt(Math.pow(Math.abs(this.x - p.x), 2) +
+ Math.pow(Math.abs(this.y - p.y), 2))
}
p1 = new Point(1,1);
@@ -58,7 +59,7 @@
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
-testConstructor = false; // Flag to control which part of the test is run.
+what = 'constructor'; // Flag to control which part of the test is run.
listenerCalled = false;
exception = false;
@@ -72,30 +73,47 @@
function listener(event, exec_state, event_data, data) {
try {
- if (event == Debug.DebugEvent.Break)
- {
- if (!testConstructor) {
- // The expected backtrace is
- // 0: Call distance on Point where distance is a property on the prototype
- // 1: Call distance on Point where distance is a direct property
- // 2: Call on function an array element 2
- // 3: [anonymous]
- assertEquals("#<Point>.distanceTo(p=#<Point>)", exec_state.frame(0).invocationText());
- assertEquals("#<Point>.distanceTo(p=#<Point>)", exec_state.frame(1).invocationText());
- assertEquals("#<Array>[2](aka distance)(p=#<Point>, q=#<Point>)", exec_state.frame(2).invocationText());
- assertEquals("[anonymous]()", exec_state.frame(3).invocationText());
- listenerCalled = true;
- } else {
- // The expected backtrace is
- // 0: Call Point constructor
- // 1: Call on global function createPoint
- // 2: [anonymous]
- assertEquals("new Point(x=0, y=0)", exec_state.frame(0).invocationText());
- assertEquals("createPoint(x=0, y=0)", exec_state.frame(1).invocationText());
- assertEquals("[anonymous]()", exec_state.frame(2).invocationText());
- listenerCalled = true;
+ if (event == Debug.DebugEvent.Break) {
+ if (what == 'constructor') {
+ // The expected backtrace is
+ // 0: Call distance on Point where distance is a prototype property
+ // 1: Call distance on Point where distance is a direct property
+ // 2: Call on function an array element 2
+ // 3: [anonymous]
+ assertEquals("#<Point>.distanceTo(p=#<Point>)",
+ exec_state.frame(0).invocationText());
+ assertEquals("#<Point>.distanceTo(p=#<Point>)",
+ exec_state.frame(1).invocationText());
+ assertEquals("#<Array>[2](aka distance)(p=#<Point>, q=#<Point>)",
+ exec_state.frame(2).invocationText());
+ assertEquals("[anonymous]()", exec_state.frame(3).invocationText());
+ listenerCalled = true;
+ } else if (what == 'breakpoint') {
+ // The expected backtrace is
+ // 0: Call Point constructor
+ // 1: Call on global function createPoint
+ // 2: [anonymous]
+ assertEquals("new Point(x=0, y=0)",
+ exec_state.frame(0).invocationText());
+ assertEquals("createPoint(x=0, y=0)",
+ exec_state.frame(1).invocationText());
+ assertEquals("[anonymous]()", exec_state.frame(2).invocationText());
+ listenerCalled = true;
+ } else if (what == 'symbol') {
+ // The expected backtrace is
+ // 0: Call Point constructor
+ // 1: Call on symbol method
+ // 2: [anonymous]
+ assertEquals("new Point(x=0, y=0)",
+ exec_state.frame(0).invocationText());
+ assertEquals("#<Object>[Symbol(Das Symbol)](x=0, y=0)",
+ exec_state.frame(1).invocationText());
+ assertEquals("[anonymous]()", exec_state.frame(2).invocationText());
+ listenerCalled = true;
+ } else {
+ assertUnreachable();
+ }
}
- }
} catch (e) {
exception = e
};
@@ -112,11 +130,21 @@
assertFalse(exception, "exception in listener")
// Set a break point and call to invoke the debug event listener.
+what = 'breakpoint';
listenerCalled = false;
-testConstructor = true;
Debug.setBreakPoint(Point, 0, 0);
createPoint(0, 0);
// Make sure that the debug event listener vas invoked (again).
assertTrue(listenerCalled);
assertFalse(exception, "exception in listener")
+
+what = 'symbol';
+listenerCalled = false;
+var S = Symbol('Das Symbol');
+var o = { [S](x, y) { return new Point(x, y); } };
+Debug.setBreakPoint(Point, 0, 0);
+o[S](0, 0);
+
+assertTrue(listenerCalled);
+assertFalse(exception, "exception in listener")
diff --git a/test/mjsunit/debug-eval-scope.js b/test/mjsunit/debug-eval-scope.js
new file mode 100644
index 0000000..2b97bf6
--- /dev/null
+++ b/test/mjsunit/debug-eval-scope.js
@@ -0,0 +1,144 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug --no-always-opt
+
+// Test that the (strict) eval scope is visible to the debugger.
+
+var Debug = debug.Debug;
+var exception = null;
+var delegate = null;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ delegate(exec_state);
+ } catch (e) {
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+
+// Current function is the top-level eval.
+// We can access stack- and context-allocated values in the eval-scope.
+delegate = function(exec_state) {
+ assertEquals([ debug.ScopeType.Eval,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ var scope = exec_state.frame(0).scope(0);
+ assertEquals(1, scope.scopeObject().property("a").value().value());
+ assertEquals(1, exec_state.frame(0).evaluate("a").value());
+ scope.setVariableValue("a", 2);
+ assertEquals(2, exec_state.frame(0).evaluate("a++").value());
+}
+
+eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "debugger; \n" +
+ "assertEquals(3, a);\n");
+
+eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "(x=>a); \n" + // Force context-allocation.
+ "debugger; \n" +
+ "assertEquals(3, a);\n");
+
+// Current function is an inner function.
+// We cannot access stack-allocated values in the eval-scope.
+delegate = function(exec_state) {
+ assertEquals([ debug.ScopeType.Local,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ assertEquals([ debug.ScopeType.Eval,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(1).allScopes().map(s => s.scopeType()));
+ var scope = exec_state.frame(0).scope(0);
+ assertThrows(() => exec_state.frame(0).evaluate("a"), ReferenceError);
+ assertTrue(scope.scopeObject().property("a").isUndefined());
+}
+
+eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "(() => {debugger})()\n");
+
+// Current function is an escaped inner function.
+delegate = function(exec_state) {
+ assertEquals([ debug.ScopeType.Local,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ assertEquals([ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(1).allScopes().map(s => s.scopeType()));
+ var scope = exec_state.frame(0).scope(0);
+ assertThrows(() => exec_state.frame(0).evaluate("a"), ReferenceError);
+ assertTrue(scope.scopeObject().property("a").isUndefined());
+}
+
+var f = eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "() => {debugger}\n");
+f();
+
+// Current function is an inner function.
+// We can access context-allocated values in the eval-scope.
+delegate = function(exec_state) {
+ assertEquals([ debug.ScopeType.Local,
+ debug.ScopeType.Closure,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ assertEquals([ debug.ScopeType.Eval,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(1).allScopes().map(s => s.scopeType()));
+ var scope = exec_state.frame(1).scope(0);
+ assertEquals(1, scope.scopeObject().property("a").value().value());
+ assertEquals(1, exec_state.frame(1).evaluate("a").value());
+ assertEquals(1, exec_state.frame(0).evaluate("a").value());
+ scope.setVariableValue("a", 2);
+ assertEquals(2, exec_state.frame(0).evaluate("a++").value());
+ assertEquals(3, exec_state.frame(1).evaluate("a++").value());
+}
+
+eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "(() => { a; \n" + // Force context-allocation.
+ " debugger; \n" +
+ " assertEquals(4, a);\n" +
+ " })(); \n"
+ );
+
+// Current function is an escaped inner function.
+// We can access context-allocated values in the eval-scope.
+delegate = function(exec_state) {
+ assertEquals([ debug.ScopeType.Local,
+ debug.ScopeType.Closure,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ assertEquals([ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(1).allScopes().map(s => s.scopeType()));
+ var scope = exec_state.frame(0).scope(1);
+ assertEquals(1, scope.scopeObject().property("a").value().value());
+ assertEquals(1, exec_state.frame(0).evaluate("a").value());
+ scope.setVariableValue("a", 2);
+ assertEquals(2, exec_state.frame(0).evaluate("a++").value());
+}
+
+var g = eval("'use strict'; \n" +
+ "var a = 1; \n" +
+ "() => { a; \n" +
+ " debugger; \n" +
+ " assertEquals(3, a);\n" +
+ " } \n");
+g();
+
+Debug.setListener(null);
+assertNull(exception);
diff --git a/test/mjsunit/debug-evaluate-nested.js b/test/mjsunit/debug-evaluate-nested.js
index da11b90..965b5a7 100644
--- a/test/mjsunit/debug-evaluate-nested.js
+++ b/test/mjsunit/debug-evaluate-nested.js
@@ -34,7 +34,7 @@
exec_state.frame(0).evaluate("debugger;");
} else {
checkScopes(exec_state.frame(0).allScopes(),
- [ ScopeType.With, ScopeType.Closure,
+ [ ScopeType.Eval, ScopeType.With, ScopeType.Closure,
ScopeType.Script, ScopeType.Global ]);
}
} catch (e) {
diff --git a/test/mjsunit/debug-function-scopes.js b/test/mjsunit/debug-function-scopes.js
index f63d7b2..5509038 100644
--- a/test/mjsunit/debug-function-scopes.js
+++ b/test/mjsunit/debug-function-scopes.js
@@ -42,14 +42,7 @@
}
}
-// A copy of the scope types from debug/mirrors.js.
-var ScopeType = { Global: 0,
- Local: 1,
- With: 2,
- Closure: 3,
- Catch: 4,
- Block: 5,
- Script: 6};
+var ScopeType = debug.ScopeType;
var f1 = (function F1(x) {
function F2(y) {
diff --git a/test/mjsunit/debug-liveedit-exceptions.js b/test/mjsunit/debug-liveedit-exceptions.js
new file mode 100644
index 0000000..28ec01d
--- /dev/null
+++ b/test/mjsunit/debug-liveedit-exceptions.js
@@ -0,0 +1,67 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+Debug = debug.Debug
+
+function BestEditor() {
+ throw 'Emacs';
+}
+
+var exception = null;
+var results = [];
+var log = []
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Exception) return;
+ try {
+ var source_line = event_data.sourceLineText();
+ print(source_line);
+ log.push(source_line);
+ switch (results.length) {
+ case 0:
+ Replace(BestEditor, "Emacs", "Eclipse");
+ break;
+ case 1:
+ Replace(BestEditor, "Eclipse", "Vim");
+ break;
+ case 2:
+ break;
+ default:
+ assertUnreachable();
+ }
+ } catch (e) {
+ exception = e;
+ }
+};
+
+function Replace(fun, original, patch) {
+ var script = Debug.findScript(fun);
+ if (fun.toString().indexOf(original) < 0) return;
+ var patch_pos = script.source.indexOf(original);
+ var change_log = [];
+ Debug.LiveEdit.TestApi.ApplySingleChunkPatch(script, patch_pos, original.length, patch, change_log);
+}
+
+Debug.setListener(listener);
+Debug.setBreakOnException();
+
+for (var i = 0; i < 3; i++) {
+ try {
+ BestEditor();
+ } catch (e) {
+ results.push(e);
+ }
+}
+Debug.setListener(null);
+
+assertNull(exception);
+assertEquals(["Emacs", "Eclipse", "Vim"], results);
+print(JSON.stringify(log, 1));
+assertEquals([
+ " throw 'Emacs';",
+ " throw 'Eclipse';",
+ " throw 'Vim';",
+], log);
diff --git a/test/mjsunit/debug-liveedit-stepin.js b/test/mjsunit/debug-liveedit-stepin.js
index 601a66f..c6070ce 100644
--- a/test/mjsunit/debug-liveedit-stepin.js
+++ b/test/mjsunit/debug-liveedit-stepin.js
@@ -7,8 +7,7 @@
Debug = debug.Debug
function BestEditor() {
- var best_editor = "Emacs";
- return best_editor;
+ return 'Emacs';
}
var exception = null;
@@ -62,20 +61,15 @@
assertEquals([
"debugger;",
"results.push(BestEditor());",
- " var best_editor = \"Emacs\";",
- " return best_editor;","}",
+ " return 'Emacs';","}",
"results.push(BestEditor());",
"results.push(BestEditor());",
- " var best_editor = \"Emacs\";",
- " return best_editor;",
- " var best_editor = \"Eclipse\";",
- " return best_editor;","}",
+ " return 'Emacs';",
+ " return 'Eclipse';","}",
"results.push(BestEditor());",
"results.push(BestEditor());",
- " var best_editor = \"Eclipse\";",
- " return best_editor;",
- " var best_editor = \"Vim\";",
- " return best_editor;",
+ " return 'Eclipse';",
+ " return 'Vim';",
"}","results.push(BestEditor());",
"Debug.setListener(null);"
], log);
diff --git a/test/mjsunit/debug-scopes.js b/test/mjsunit/debug-scopes.js
index 3659d4e..935de9c 100644
--- a/test/mjsunit/debug-scopes.js
+++ b/test/mjsunit/debug-scopes.js
@@ -183,10 +183,8 @@
if (!scope.scopeObject().property('this').isUndefined()) {
scope_size--;
}
- // Skip property with empty name.
- if (!scope.scopeObject().property('').isUndefined()) {
- scope_size--;
- }
+ // Temporary variables introduced by the parser have not been materialized.
+ assertTrue(scope.scopeObject().property('').isUndefined());
if (count != scope_size) {
print('Names found in scope:');
@@ -1179,11 +1177,10 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
- CheckScopeChainPositions([{start: 52, end: 111}, {start: 42, end: 111}, {start: 22, end: 145}, {}, {}], exec_state);
+ CheckScopeChainPositions([{start: 52, end: 111}, {start: 22, end: 145}, {}, {}], exec_state);
}
eval(code3);
EndTest();
diff --git a/test/mjsunit/debug-stack-check-position.js b/test/mjsunit/debug-stack-check-position.js
new file mode 100644
index 0000000..a5570ce
--- /dev/null
+++ b/test/mjsunit/debug-stack-check-position.js
@@ -0,0 +1,30 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug --allow-natives-syntax
+
+var Debug = debug.Debug;
+var exception = null;
+var loop = true;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ assertTrue(exec_state.frame(0).sourceLineText().indexOf("BREAK") > 0);
+ } catch (e) {
+ exception = e;
+ }
+}
+
+function f() { // BREAK
+ return 1;
+}
+
+Debug.setListener(listener);
+
+%ScheduleBreak(); // Break on function entry.
+f();
+
+Debug.setListener(null);
+assertNull(exception);
diff --git a/test/mjsunit/delete.js b/test/mjsunit/delete.js
index 8d4636a..20fa6bf 100644
--- a/test/mjsunit/delete.js
+++ b/test/mjsunit/delete.js
@@ -178,3 +178,17 @@
}
load_deleted_property_using_IC();
+
+
+(function deleteLargeDoubleArrayAtEnd() {
+ var o = {};
+ var max = 100000;
+ for (var i = 0; i <= max; i++) {
+ o[i] = 1.1;
+ }
+ delete o[max];
+ for (var i = 0; i < max; i++) {
+ assertEquals(1.1, o[i]);
+ }
+ assertEquals(undefined, o[max]);
+})();
diff --git a/test/mjsunit/es6/array-concat.js b/test/mjsunit/es6/array-concat.js
index fe320d6..00edfd6 100644
--- a/test/mjsunit/es6/array-concat.js
+++ b/test/mjsunit/es6/array-concat.js
@@ -1,7 +1,6 @@
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
(function testArrayConcatArity() {
"use strict";
assertEquals(1, Array.prototype.concat.length);
@@ -20,6 +19,15 @@
assertEquals(false, desc.enumerable);
})();
+(function testNonConcatSpreadableArray() {
+ "use strict"
+ var array = [1, 2, 3];
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ array[Symbol.isConcatSpreadable] = false;
+ assertEquals([[1,2,3]], [].concat(array));
+ assertEquals([[1,2,3]], array.concat([]));
+})();
(function testConcatArrayLike() {
"use strict";
diff --git a/test/mjsunit/es6/array-species-neg-zero.js b/test/mjsunit/es6/array-species-neg-zero.js
new file mode 100644
index 0000000..d60b8ba
--- /dev/null
+++ b/test/mjsunit/es6/array-species-neg-zero.js
@@ -0,0 +1,23 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ *
+ * 1. Assert: length is an integer Number ≥ 0.
+ * 2. If length is −0, let length be +0.
+ * [...]
+ */
+
+var x = [];
+var deleteCount;
+
+x.constructor = function() {};
+x.constructor[Symbol.species] = function(param) {
+ deleteCount = param;
+};
+
+x.splice(0, -0);
+
+assertEquals(0, deleteCount);
diff --git a/test/mjsunit/harmony/block-conflicts-sloppy.js b/test/mjsunit/es6/block-conflicts-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-conflicts-sloppy.js
rename to test/mjsunit/es6/block-conflicts-sloppy.js
index 8908ce4..866abee 100644
--- a/test/mjsunit/harmony/block-conflicts-sloppy.js
+++ b/test/mjsunit/es6/block-conflicts-sloppy.js
@@ -4,8 +4,6 @@
// Test for conflicting variable bindings.
-// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
-
function CheckException(e) {
var string = e.toString();
assertTrue(string.indexOf("has already been declared") >= 0 ||
diff --git a/test/mjsunit/harmony/block-const-assign-sloppy.js b/test/mjsunit/es6/block-const-assign-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-const-assign-sloppy.js
rename to test/mjsunit/es6/block-const-assign-sloppy.js
index 5dde82c..99024ef 100644
--- a/test/mjsunit/harmony/block-const-assign-sloppy.js
+++ b/test/mjsunit/es6/block-const-assign-sloppy.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
// Test that we throw early syntax errors in harmony mode
// when using an immutable binding in an assigment or with
// prefix/postfix decrement/increment operators.
diff --git a/test/mjsunit/es6/block-early-errors.js b/test/mjsunit/es6/block-early-errors.js
deleted file mode 100644
index 4af6521..0000000
--- a/test/mjsunit/es6/block-early-errors.js
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --no-harmony-sloppy-let
-
-function CheckException(e) {
- var string = e.toString();
- assertInstanceof(e, SyntaxError);
-}
-
-function Check(str) {
- try {
- eval("(function () { " + str + " })");
- assertUnreachable();
- } catch (e) {
- CheckException(e);
- }
- try {
- eval("(function () { { " + str + " } })");
- assertUnreachable();
- } catch (e) {
- CheckException(e);
- }
-}
-
-// Check for early syntax errors when using let
-// declarations outside of strict mode.
-Check("let x;");
-Check("let x = 1;");
-Check("let x, y;");
diff --git a/test/mjsunit/harmony/block-eval-var-over-let.js b/test/mjsunit/es6/block-eval-var-over-let.js
similarity index 96%
rename from test/mjsunit/harmony/block-eval-var-over-let.js
rename to test/mjsunit/es6/block-eval-var-over-let.js
index 98091b4..febc83f 100644
--- a/test/mjsunit/harmony/block-eval-var-over-let.js
+++ b/test/mjsunit/es6/block-eval-var-over-let.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
-
// Var-let conflict in a function throws, even if the var is in an eval
// Throws at the top level of a function
diff --git a/test/mjsunit/harmony/block-for-sloppy.js b/test/mjsunit/es6/block-for-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-for-sloppy.js
rename to test/mjsunit/es6/block-for-sloppy.js
index 261c46a..4f0f63f 100644
--- a/test/mjsunit/harmony/block-for-sloppy.js
+++ b/test/mjsunit/es6/block-for-sloppy.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
function props(x) {
var array = [];
for (let p in x) array.push(p);
diff --git a/test/mjsunit/harmony/block-leave-sloppy.js b/test/mjsunit/es6/block-leave-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-leave-sloppy.js
rename to test/mjsunit/es6/block-leave-sloppy.js
index 0023fa0..1313026 100644
--- a/test/mjsunit/harmony/block-leave-sloppy.js
+++ b/test/mjsunit/es6/block-leave-sloppy.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
// We want to test the context chain shape. In each of the tests cases
// below, the outer with is to force a runtime lookup of the identifier 'x'
// to actually verify that the inner context has been discarded. A static
diff --git a/test/mjsunit/es6/block-let-contextual-sloppy.js b/test/mjsunit/es6/block-let-contextual-sloppy.js
index ac7bca1..8282d77 100644
--- a/test/mjsunit/es6/block-let-contextual-sloppy.js
+++ b/test/mjsunit/es6/block-let-contextual-sloppy.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
// let is usable as a variable with var, but not let or ES6 const
(function (){
diff --git a/test/mjsunit/harmony/block-let-crankshaft-sloppy.js b/test/mjsunit/es6/block-let-crankshaft-sloppy.js
similarity index 99%
rename from test/mjsunit/harmony/block-let-crankshaft-sloppy.js
rename to test/mjsunit/es6/block-let-crankshaft-sloppy.js
index 4f29c05..b5e81f7 100644
--- a/test/mjsunit/harmony/block-let-crankshaft-sloppy.js
+++ b/test/mjsunit/es6/block-let-crankshaft-sloppy.js
@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
-// Flags: --harmony-sloppy --harmony-sloppy-let
// Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
diff --git a/test/mjsunit/harmony/block-let-declaration-sloppy.js b/test/mjsunit/es6/block-let-declaration-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-let-declaration-sloppy.js
rename to test/mjsunit/es6/block-let-declaration-sloppy.js
index af95553..ea0e39b 100644
--- a/test/mjsunit/harmony/block-let-declaration-sloppy.js
+++ b/test/mjsunit/es6/block-let-declaration-sloppy.js
@@ -27,8 +27,6 @@
// Test let declarations in various settings.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
// Global
let x;
let y = 2;
diff --git a/test/mjsunit/harmony/block-let-semantics-sloppy.js b/test/mjsunit/es6/block-let-semantics-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-let-semantics-sloppy.js
rename to test/mjsunit/es6/block-let-semantics-sloppy.js
index a55ff8f..4102ec8 100644
--- a/test/mjsunit/harmony/block-let-semantics-sloppy.js
+++ b/test/mjsunit/es6/block-let-semantics-sloppy.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
-
// Test temporal dead zone semantics of let bound variables in
// function and block scopes.
diff --git a/test/mjsunit/es6/block-non-strict-errors.js b/test/mjsunit/es6/block-non-strict-errors.js
deleted file mode 100644
index db7f558..0000000
--- a/test/mjsunit/es6/block-non-strict-errors.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --no-harmony-sloppy-let --no-harmony-sloppy-function
-// Flags: --no-harmony-sloppy
-
-function CheckError(source) {
- var exception = null;
- try {
- eval(source);
- } catch (e) {
- exception = e;
- }
- assertNotNull(exception);
- assertEquals(
- "Block-scoped declarations (let, const, function, class) not yet supported outside strict mode",
- exception.message);
-}
-
-
-function CheckOk(source) {
- eval(source);
-}
-
-CheckError("let x = 1;");
-CheckError("{ let x = 1; }");
-CheckError("function f() { let x = 1; }");
-CheckError("for (let x = 1; x < 1; x++) {}");
-CheckError("for (let x of []) {}");
-CheckError("for (let x in []) {}");
-CheckError("class C {}");
-CheckError("class C extends Array {}");
-CheckError("(class {});");
-CheckError("(class extends Array {});");
-CheckError("(class C {});");
-CheckError("(class C exends Array {});");
-
-CheckOk("let = 1;");
-CheckOk("{ let = 1; }");
-CheckOk("function f() { let = 1; }");
-CheckOk("for (let = 1; let < 1; let++) {}");
diff --git a/test/mjsunit/es6/block-scope-class.js b/test/mjsunit/es6/block-scope-class.js
index 351feaa..7bbd49d 100644
--- a/test/mjsunit/es6/block-scope-class.js
+++ b/test/mjsunit/es6/block-scope-class.js
@@ -4,8 +4,6 @@
// Test for conflicting variable bindings.
-// Flags: --harmony-sloppy --harmony-sloppy-function
-
function AssertEqualsStrictAndSloppy(value, code) {
assertEquals(value, eval("(function() {" + code + "})()"));
assertEquals(value, eval("(function() { 'use strict'; " + code + "})()"));
diff --git a/test/mjsunit/harmony/block-scoping-sloppy.js b/test/mjsunit/es6/block-scoping-sloppy.js
similarity index 98%
rename from test/mjsunit/harmony/block-scoping-sloppy.js
rename to test/mjsunit/es6/block-scoping-sloppy.js
index 1785901..f5c5a63 100644
--- a/test/mjsunit/harmony/block-scoping-sloppy.js
+++ b/test/mjsunit/es6/block-scoping-sloppy.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
+// Flags: --allow-natives-syntax
// Test functionality of block scopes.
// Hoisting of var declarations.
diff --git a/test/mjsunit/harmony/block-scoping-top-level-sloppy.js b/test/mjsunit/es6/block-scoping-top-level-sloppy.js
similarity index 91%
rename from test/mjsunit/harmony/block-scoping-top-level-sloppy.js
rename to test/mjsunit/es6/block-scoping-top-level-sloppy.js
index 6f6a8fe..2a3b903 100644
--- a/test/mjsunit/harmony/block-scoping-top-level-sloppy.js
+++ b/test/mjsunit/es6/block-scoping-top-level-sloppy.js
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --min-preparse-length=0
-// Flags: --harmony-sloppy --harmony-sloppy-let
let xxx = 1;
let f = undefined;
diff --git a/test/mjsunit/harmony/block-sloppy-function.js b/test/mjsunit/es6/block-sloppy-function.js
similarity index 98%
rename from test/mjsunit/harmony/block-sloppy-function.js
rename to test/mjsunit/es6/block-sloppy-function.js
index 2bea147..41063b4 100644
--- a/test/mjsunit/harmony/block-sloppy-function.js
+++ b/test/mjsunit/es6/block-sloppy-function.js
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-// Flags: --harmony-sloppy-function
-
// Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode.
// http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics
diff --git a/test/mjsunit/es6/class-computed-property-names-super.js b/test/mjsunit/es6/class-computed-property-names-super.js
index cb9f251..b5a2ac9 100644
--- a/test/mjsunit/es6/class-computed-property-names-super.js
+++ b/test/mjsunit/es6/class-computed-property-names-super.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
// Flags: --allow-natives-syntax
diff --git a/test/mjsunit/es6/class-property-name-eval-arguments.js b/test/mjsunit/es6/class-property-name-eval-arguments.js
index 72ff60f..bbd05cc 100644
--- a/test/mjsunit/es6/class-property-name-eval-arguments.js
+++ b/test/mjsunit/es6/class-property-name-eval-arguments.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
-
(function Method() {
class C {
diff --git a/test/mjsunit/es6/classes-derived-return-type.js b/test/mjsunit/es6/classes-derived-return-type.js
index 8283bcb..3f81a34 100644
--- a/test/mjsunit/es6/classes-derived-return-type.js
+++ b/test/mjsunit/es6/classes-derived-return-type.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
-
class Base {}
diff --git a/test/mjsunit/es6/classes.js b/test/mjsunit/es6/classes.js
index 4dabda8..fb77dbb 100644
--- a/test/mjsunit/es6/classes.js
+++ b/test/mjsunit/es6/classes.js
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-function-name --allow-natives-syntax
-// Flags: --harmony-do-expressions
+// Flags: --allow-natives-syntax --harmony-do-expressions
(function TestBasics() {
var C = class C {}
diff --git a/test/mjsunit/es6/completion.js b/test/mjsunit/es6/completion.js
index 7559514..988e970 100644
--- a/test/mjsunit/es6/completion.js
+++ b/test/mjsunit/es6/completion.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy-let
-
function assertUndef(x) {
assertEquals(undefined, x);
diff --git a/test/mjsunit/es6/debug-blockscopes.js b/test/mjsunit/es6/debug-blockscopes.js
index 193ad70..bf04a0a 100644
--- a/test/mjsunit/es6/debug-blockscopes.js
+++ b/test/mjsunit/es6/debug-blockscopes.js
@@ -52,6 +52,7 @@
listener_delegate(exec_state);
}
} catch (e) {
+ print(e, e.stack);
exception = e;
}
}
@@ -147,10 +148,8 @@
if (!scope.scopeObject().property('arguments').isUndefined()) {
scope_size--;
}
- // Skip property with empty name.
- if (!scope.scopeObject().property('').isUndefined()) {
- scope_size--;
- }
+ // Temporary variables introduced by the parser have not been materialized.
+ assertTrue(scope.scopeObject().property('').isUndefined());
if (count != scope_size) {
print('Names found in scope:');
@@ -380,16 +379,12 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x:'y'}, 0, exec_state);
// The function scope contains a temporary iteration variable, but it is
// hidden to the debugger.
- // TODO(adamk): This variable is only used to provide a TDZ for the enumerable
- // expression and should not be visible to the debugger.
- CheckScopeContent({x:undefined}, 1, exec_state);
};
for_loop_1();
EndTest();
@@ -409,7 +404,6 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
@@ -417,9 +411,6 @@
CheckScopeContent({x:'y'}, 1, exec_state);
// The function scope contains a temporary iteration variable, hidden to the
// debugger.
- // TODO(adamk): This variable is only used to provide a TDZ for the enumerable
- // expression and should not be visible to the debugger.
- CheckScopeContent({x:undefined}, 2, exec_state);
};
for_loop_2();
EndTest();
@@ -436,13 +427,11 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x:3}, 0, exec_state);
- CheckScopeContent({x:3}, 1, exec_state);
- CheckScopeContent({}, 2, exec_state);
+ CheckScopeContent({}, 1, exec_state);
};
for_loop_3();
EndTest();
@@ -461,14 +450,12 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x:5}, 0, exec_state);
CheckScopeContent({x:3}, 1, exec_state);
- CheckScopeContent({x:3}, 2, exec_state);
- CheckScopeContent({}, 3, exec_state);
+ CheckScopeContent({}, 2, exec_state);
};
for_loop_4();
EndTest();
@@ -485,13 +472,11 @@
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
- debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x:3,y:5}, 0, exec_state);
- CheckScopeContent({x:3,y:5}, 1, exec_state);
- CheckScopeContent({}, 2, exec_state);
+ CheckScopeContent({}, 1, exec_state);
};
for_loop_5();
EndTest();
diff --git a/test/mjsunit/es6/debug-evaluate-receiver-before-super.js b/test/mjsunit/es6/debug-evaluate-receiver-before-super.js
new file mode 100644
index 0000000..dc8ce2c
--- /dev/null
+++ b/test/mjsunit/es6/debug-evaluate-receiver-before-super.js
@@ -0,0 +1,39 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+// Test that debug-evaluate doesn't crash when this is used before super() call
+// in constructor.
+
+Debug = debug.Debug
+
+var result;
+
+function listener(event, exec_state, event_data, data)
+{
+ try {
+ if (event == Debug.DebugEvent.Break) {
+ result = exec_state.frame(0).evaluate("this.a").value();
+ }
+ } catch (e) {
+ result = e.message;
+ }
+}
+
+Debug.setListener(listener);
+
+class A { constructor () { this.a = 239; } }
+class B extends A {
+ constructor () {
+ debugger;
+ assertEquals("Cannot read property 'a' of undefined", result);
+ super();
+ debugger;
+ assertEquals(239, result);
+ }
+}
+new B();
+
+Debug.setListener(null);
diff --git a/test/mjsunit/es6/debug-promises/stepin-constructor.js b/test/mjsunit/es6/debug-promises/stepin-constructor.js
index 906969e..6914ae0 100644
--- a/test/mjsunit/es6/debug-promises/stepin-constructor.js
+++ b/test/mjsunit/es6/debug-promises/stepin-constructor.js
@@ -21,9 +21,9 @@
Debug.setListener(listener);
function resolver(resolve, reject) {
- 1;
- 2;
- 3;
+ print(1);
+ print(2);
+ print(3);
resolve();
}
@@ -35,9 +35,9 @@
var expected_breaks = [
"debugger;",
"var p = new Promise(resolver);",
- "1;",
- "2;",
- "3;",
+ "print(1);",
+ "print(2);",
+ "print(3);",
"resolve();",
"}",
"Debug.setListener(null);"
diff --git a/test/mjsunit/es6/debug-scope-default-param-with-eval.js b/test/mjsunit/es6/debug-scope-default-param-with-eval.js
new file mode 100644
index 0000000..d4dc93f
--- /dev/null
+++ b/test/mjsunit/es6/debug-scope-default-param-with-eval.js
@@ -0,0 +1,61 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+// Test that the parameter initialization block scope set up for
+// sloppy eval is visible to the debugger.
+
+var Debug = debug.Debug;
+var exception = null;
+var break_count = 0;
+
+function call_for_break() {
+ return 5;
+}
+
+function test(x = eval("var y = 7; debugger; y") + call_for_break()) {
+ return x;
+}
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ var frame = exec_state.frame(0);
+ var block_scope;
+ if (break_count++ == 0) {
+ // Inside eval.
+ assertEquals([ debug.ScopeType.Eval,
+ debug.ScopeType.Block,
+ debug.ScopeType.Closure,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ frame.allScopes().map(s => s.scopeType()));
+ exec_state.prepareStep(Debug.StepAction.StepOut);
+ block_scope = frame.scope(1);
+ } else {
+ // Outside of eval.
+ assertEquals([ debug.ScopeType.Block,
+ debug.ScopeType.Local,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ frame.allScopes().map(s => s.scopeType()));
+ block_scope = frame.scope(0);
+ }
+ assertTrue(block_scope.scopeObject().propertyNames().includes('y'));
+ assertEquals(7, block_scope.scopeObject().property('y').value().value());
+ } catch (e) {
+ print(e);
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+
+assertEquals(12, test());
+
+Debug.setListener(null);
+
+assertNull(exception);
+assertEquals(2, break_count);
diff --git a/test/mjsunit/es6/debug-stepin-microtasks.js b/test/mjsunit/es6/debug-stepin-microtasks.js
index 6a7c553..e541f0f 100644
--- a/test/mjsunit/es6/debug-stepin-microtasks.js
+++ b/test/mjsunit/es6/debug-stepin-microtasks.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-object-observe
// Flags: --allow-natives-syntax --expose-debug-as debug
Debug = debug.Debug
@@ -46,6 +45,7 @@
.then(Boolean) // Should skip stepping into native.
.then(promise2)
.catch(promise3)
+ .then(promise4)
.catch(function(e) {
%AbortJS("FAIL: uncaught exception " + e);
});
@@ -60,36 +60,16 @@
}
function promise3() {
- installObservers(); // Break 4. StepOver.
- return break_count; // Break 5.
-} // Break 6.
-
-function installObservers() {
- var dummy = {};
- Object.observe(dummy, observer1);
- Object.observe(dummy, Object); // Should skip stepping into native.
- Object.observe(dummy, Boolean); // Should skip stepping into native.
- Object.observe(dummy, observer2);
- dummy.foo = 1;
-}
-
-function observer1() {
- return exception || 3; // Break 7.
-} // Break 8.
-
-function observer2() {
- Promise.resolve().then(promise4); // Break 9. StepOver.
- return break_count + 1; // Break 10.
-} // Break 11.
+ return break_count; // Break 4.
+} // Break 5.
function promise4() {
- finalize(); // Break 12. StepOver.
- return 0; // Break 13.
-} // Break 14. StepOver.
+ finalize(); // Break 6. StepOver.
+ return 0; // Break 7.
+} // Break 8. StepOver.
function finalize() {
- var dummy = {};
- Object.observe(dummy, function() {
+ Promise.resolve().then(function() {
if (expected_breaks !== break_count) {
%AbortJS("FAIL: expected <" + expected_breaks + "> breaks instead of <" +
break_count + ">");
@@ -98,5 +78,4 @@
%AbortJS("FAIL: exception: " + exception);
}
});
- dummy.foo = 1;
}
diff --git a/test/mjsunit/es6/debug-stepin-proxies.js b/test/mjsunit/es6/debug-stepin-proxies.js
index 4e71c79..72c01f0 100644
--- a/test/mjsunit/es6/debug-stepin-proxies.js
+++ b/test/mjsunit/es6/debug-stepin-proxies.js
@@ -54,7 +54,7 @@
assertEquals([
"a0",
- "b17", "h4b20", "i2b20", // [[Has]]
+ "b17", "h4b17", "i2b17", // [[Has]]
"c15", "j4c15", "k2c15", // [[Get]]
"d0", "l4d11", "m2d11", // [[Set]]
"g0"
diff --git a/test/mjsunit/es6/debug-stepnext-for.js b/test/mjsunit/es6/debug-stepnext-for.js
index 9d5641a..d425a46 100644
--- a/test/mjsunit/es6/debug-stepnext-for.js
+++ b/test/mjsunit/es6/debug-stepnext-for.js
@@ -11,6 +11,8 @@
var s = 0;
var a = [1, 2, 3];
+var b = [1, 2, 3, 4];
+var null_value = null;
var i = 0;
function f() {
@@ -18,11 +20,11 @@
debugger; // Break a
var j; // Break b
- for (var i in null) { // Break c
+ for (var i in null_value) { // Break c
s += a[i];
}
- for (j in null) { // Break d
+ for (j in null_value) { // Break d
s += a[j];
}
@@ -46,7 +48,7 @@
s += j; // Break I
}
- for (let i of a) { // Break j
+ for (let i of a) { // Break j
s += i; // Break J
}
@@ -61,6 +63,11 @@
for (let i = 0; i < 3; i++) { // Break m
s += a[i]; // Break M
}
+
+ for (let i of a) {} // Break n
+
+ [1, ...a] // Break o
+
} // Break y
function listener(event, exec_state, event_data, data) {
@@ -103,17 +110,21 @@
// For-in-let: get enumerable, next, body, next, ...
"g16","g11","G4","g11","G4","g11","G4","g11",
// For-of-var: [Symbol.iterator](), next(), body, next(), body, ...
- "h16","h14","h15","H4","h15","H4","h15","H4","h15",
+ "h16","h13","H4","h13","H4","h13","H4","h13",
// For-of: [Symbol.iterator](), next(), body, next(), body, ...
- "i12","i10","i11","I4","i11","I4","i11","I4","i11",
+ "i12","i9","I4","i9","I4","i9","I4","i9",
// For-of-let: [Symbol.iterator](), next(), body, next(), ...
- "j16","j14","j15","J4","j15","J4","j15","J4","j15",
+ "j18","j14","J4","j14","J4","j14","J4","j14",
// For-var: init, condition, body, next, condition, body, ...
"k15","k20","K4","k26","k20","K4","k26","k20","K4","k26","k20",
// For: init, condition, body, next, condition, body, ...
"l7","l16","L4","l22","l16","L4","l22","l16","L4","l22","l16",
// For-let: init, condition, body, next, condition, body, ...
"m15","m20","M4","m26","m20","M4","m26","m20","M4","m26","m20",
+ // For-of, empty: [Symbol.iterator](), next() once
+ "n16", "n13",
+ // Spread: expression statement, spread
+ "o2", "o9",
// Exit.
"y0","z0",
]
diff --git a/test/mjsunit/es6/generators-objects.js b/test/mjsunit/es6/generators-objects.js
index a0c3b80..2d23841 100644
--- a/test/mjsunit/es6/generators-objects.js
+++ b/test/mjsunit/es6/generators-objects.js
@@ -87,3 +87,29 @@
TestNonGenerator(g.prototype);
}
TestGeneratorObjectMethods();
+
+
+function TestPrototype() {
+ function* g() { }
+
+ let g_prototype = g.prototype;
+ assertEquals([], Reflect.ownKeys(g_prototype));
+
+ let generator_prototype = Object.getPrototypeOf(g_prototype);
+ assertSame(generator_prototype, Object.getPrototypeOf(g).prototype);
+
+ // Unchanged .prototype
+ assertSame(g_prototype, Object.getPrototypeOf(g()));
+
+ // Custom object as .prototype
+ {
+ let proto = {};
+ g.prototype = proto;
+ assertSame(proto, Object.getPrototypeOf(g()));
+ }
+
+ // Custom non-object as .prototype
+ g.prototype = null;
+ assertSame(generator_prototype, Object.getPrototypeOf(g()));
+}
+TestPrototype();
diff --git a/test/mjsunit/es6/microtask-delivery.js b/test/mjsunit/es6/microtask-delivery.js
index 01b971d..6b239be 100644
--- a/test/mjsunit/es6/microtask-delivery.js
+++ b/test/mjsunit/es6/microtask-delivery.js
@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-object-observe
// Flags: --allow-natives-syntax
var ordering = [];
@@ -71,22 +70,6 @@
};
}
-function newObserver(id, fn, obj) {
- var observer = {
- value: 1,
- recordCounts: []
- };
-
- Object.observe(observer, function(records) {
- ordering.push('o' + id);
- observer.recordCounts.push(records.length);
- if (fn) fn();
- });
-
- return observer;
-}
-
-
(function PromiseThens() {
reset();
@@ -98,72 +81,3 @@
assertOrdering(['p1', 'p2', 'p1:1', 'p2:1']);
})();
-
-
-(function ObserversBatch() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var p3 = newPromise(3);
-
- var ob1 = newObserver(1);
- var ob2 = newObserver(2, function() {
- ob3.value++;
- p3.resolve();
- ob1.value++;
- });
- var ob3 = newObserver(3);
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2', 'o1', 'o3', 'p3']);
- assertArrayValues([1, 1], ob1.recordCounts);
- assertArrayValues([1], ob2.recordCounts);
- assertArrayValues([1], ob3.recordCounts);
-})();
-
-
-(function ObserversGetAllRecords() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var ob1 = newObserver(1, function() {
- ob2.value++;
- });
- var ob2 = newObserver(2);
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2']);
- assertArrayValues([1], ob1.recordCounts);
- assertArrayValues([2], ob2.recordCounts);
-})();
-
-
-(function NewObserverDeliveryGetsNewMicrotask() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var ob1 = newObserver(1);
- var ob2 = newObserver(2, function() {
- ob1.value++;
- });
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2', 'o1']);
- assertArrayValues([1, 1], ob1.recordCounts);
- assertArrayValues([1], ob2.recordCounts);
-})();
diff --git a/test/mjsunit/es6/mirror-collections.js b/test/mjsunit/es6/mirror-collections.js
index 81a98b8..4232ef9 100644
--- a/test/mjsunit/es6/mirror-collections.js
+++ b/test/mjsunit/es6/mirror-collections.js
@@ -88,16 +88,21 @@
assertSame(o2, values[0]);
assertEquals(undefined, values[1]);
+function initWeakMap(weakMap) {
+ weakMap.set(o1, 11);
+ weakMap.set(new Object(), 22);
+ weakMap.set(o3, 33);
+ weakMap.set(new Object(), 44);
+ var weakMapMirror = debug.MakeMirror(weakMap);
+ testMapMirror(weakMapMirror);
+ weakMap.set(new Object(), 55);
+ assertTrue(weakMapMirror.entries().length <= 5);
+ return weakMapMirror;
+}
+
// Test the mirror object for WeakMaps
var weakMap = new WeakMap();
-weakMap.set(o1, 11);
-weakMap.set(new Object(), 22);
-weakMap.set(o3, 33);
-weakMap.set(new Object(), 44);
-var weakMapMirror = debug.MakeMirror(weakMap);
-testMapMirror(weakMapMirror);
-weakMap.set(new Object(), 55);
-assertTrue(weakMapMirror.entries().length <= 5);
+var weakMapMirror = initWeakMap(weakMap);
gc();
function testWeakMapEntries(weakMapMirror) {
@@ -121,18 +126,23 @@
testWeakMapEntries(weakMapMirror);
+function initWeakSet(weakSet) {
+ weakSet.add(o1);
+ weakSet.add(new Object());
+ weakSet.add(o2);
+ weakSet.add(new Object());
+ weakSet.add(new Object());
+ weakSet.add(o3);
+ weakSet.delete(o2);
+ var weakSetMirror = debug.MakeMirror(weakSet);
+ testSetMirror(weakSetMirror);
+ assertTrue(weakSetMirror.values().length <= 5);
+ return weakSetMirror;
+}
+
// Test the mirror object for WeakSets
var weakSet = new WeakSet();
-weakSet.add(o1);
-weakSet.add(new Object());
-weakSet.add(o2);
-weakSet.add(new Object());
-weakSet.add(new Object());
-weakSet.add(o3);
-weakSet.delete(o2);
-var weakSetMirror = debug.MakeMirror(weakSet);
-testSetMirror(weakSetMirror);
-assertTrue(weakSetMirror.values().length <= 5);
+var weakSetMirror = initWeakSet(weakSet);
gc();
function testWeakSetValues(weakSetMirror) {
diff --git a/test/mjsunit/es6/proxies-for.js b/test/mjsunit/es6/proxies-for.js
index 5b81845..a171227 100644
--- a/test/mjsunit/es6/proxies-for.js
+++ b/test/mjsunit/es6/proxies-for.js
@@ -209,10 +209,15 @@
assertThrowsEquals(() => {keys(proxy)}, "error");
})();
-
-(function () {
- var symbol = Symbol();
- var p = new Proxy({}, {ownKeys() { return ["1", symbol, "2"] }});
- assertEquals(["1","2"], Object.getOwnPropertyNames(p));
- assertEquals([symbol], Object.getOwnPropertySymbols(p));
+(function testNestedProxy() {
+ var handler = {
+ ownKeys() {
+ return ['c'];
+ },
+ getOwnPropertyDescriptor() { return {configurable: true, enumerable: true } }
+ }
+ var proxy = new Proxy({}, handler);
+ var proxy2 = new Proxy(proxy, {});
+ assertEquals(['c'], keys(proxy));
+ assertEquals(['c'], keys(proxy2));
})();
diff --git a/test/mjsunit/es6/proxies-keys.js b/test/mjsunit/es6/proxies-keys.js
index 7344032..65dea6a 100644
--- a/test/mjsunit/es6/proxies-keys.js
+++ b/test/mjsunit/es6/proxies-keys.js
@@ -37,3 +37,14 @@
handler.ownKeys = undefined;
assertEquals(["target"], Object.keys(proxy));
assertEquals(["target"], Object.keys(target));
+
+var proxy2 = new Proxy(proxy, {});
+assertEquals(["target"], Object.keys(proxy2));
+
+
+(function testForSymbols() {
+ var symbol = Symbol();
+ var p = new Proxy({}, {ownKeys() { return ["1", symbol, "2"] }});
+ assertEquals(["1","2"], Object.getOwnPropertyNames(p));
+ assertEquals([symbol], Object.getOwnPropertySymbols(p));
+})();
diff --git a/test/mjsunit/es6/reflect-define-property.js b/test/mjsunit/es6/reflect-define-property.js
index b19c5aa..d62a934 100644
--- a/test/mjsunit/es6/reflect-define-property.js
+++ b/test/mjsunit/es6/reflect-define-property.js
@@ -441,8 +441,7 @@
}
-// Test runtime calls to DefineDataPropertyUnchecked and
-// DefineAccessorPropertyUnchecked - make sure we don't
+// Test runtime calls to DefineAccessorPropertyUnchecked - make sure we don't
// crash.
try {
%DefineAccessorPropertyUnchecked(0, 0, 0, 0, 0);
@@ -451,29 +450,11 @@
}
try {
- %DefineDataPropertyUnchecked(0, 0, 0, 0);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
-try {
- %DefineDataPropertyUnchecked(null, null, null, null);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
-try {
%DefineAccessorPropertyUnchecked(null, null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
-try {
- %DefineDataPropertyUnchecked({}, null, null, null);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
// Defining properties null should fail even when we have
// other allowed values
try {
@@ -482,12 +463,6 @@
assertTrue(/illegal access/.test(e));
}
-try {
- %DefineDataPropertyUnchecked(null, 'foo', 0, 0);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
// Test that all possible differences in step 6 in DefineOwnProperty are
// exercised, i.e., any difference in the given property descriptor and the
// existing properties should not return true, but throw an error if the
diff --git a/test/mjsunit/es6/regress/regress-3750.js b/test/mjsunit/es6/regress/regress-3750.js
deleted file mode 100644
index 10509bf..0000000
--- a/test/mjsunit/es6/regress/regress-3750.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --harmony-object-observe
-
-'use strict';
-class Example { }
-Object.observe(Example.prototype, function(){});
diff --git a/test/mjsunit/harmony/regress/regress-4482.js b/test/mjsunit/es6/regress/regress-4482.js
similarity index 91%
rename from test/mjsunit/harmony/regress/regress-4482.js
rename to test/mjsunit/es6/regress/regress-4482.js
index 2472b46..d813d21 100644
--- a/test/mjsunit/harmony/regress/regress-4482.js
+++ b/test/mjsunit/es6/regress/regress-4482.js
@@ -1,8 +1,6 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// Flags: --harmony-sloppy
assertEquals("function", (function f() { f = 42; return typeof f })());
assertEquals("function",
diff --git a/test/mjsunit/es6/regress/regress-468661.js b/test/mjsunit/es6/regress/regress-468661.js
index 4a42350..4a58a71 100644
--- a/test/mjsunit/es6/regress/regress-468661.js
+++ b/test/mjsunit/es6/regress/regress-468661.js
@@ -9,7 +9,8 @@
var break_count = 0;
var expected_values =
- [ReferenceError, undefined, 0, 0, 0, 0, 1, ReferenceError, ReferenceError];
+ [ReferenceError, undefined, 0, 0, 0, 0, 1,
+ ReferenceError, ReferenceError];
function listener(event, exec_state, event_data, data) {
try {
@@ -39,7 +40,6 @@
assertTrue(v instanceof ReferenceError);
} else {
assertSame(expected_values[break_count], v);
-
}
++break_count;
diff --git a/test/mjsunit/es6/spread-call-new-class.js b/test/mjsunit/es6/spread-call-new-class.js
index 1fdf25b..de88cff 100644
--- a/test/mjsunit/es6/spread-call-new-class.js
+++ b/test/mjsunit/es6/spread-call-new-class.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
-
(function testConstructClassStrict() {
"use strict";
diff --git a/test/mjsunit/es6/spread-call-super-property.js b/test/mjsunit/es6/spread-call-super-property.js
index b298a69..a85ea41 100644
--- a/test/mjsunit/es6/spread-call-super-property.js
+++ b/test/mjsunit/es6/spread-call-super-property.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
-
(function testCallSuperPropertyStrict() {
"use strict";
class BaseClass {
diff --git a/test/mjsunit/es6/super.js b/test/mjsunit/es6/super.js
index a2ba1e8..4c80ce7 100644
--- a/test/mjsunit/es6/super.js
+++ b/test/mjsunit/es6/super.js
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
-// Flags: --harmony-sloppy
(function TestSuperNamedLoads() {
function Base() { }
diff --git a/test/mjsunit/es6/tail-call.js b/test/mjsunit/es6/tail-call.js
index d0d00f4..6ecf04f 100644
--- a/test/mjsunit/es6/tail-call.js
+++ b/test/mjsunit/es6/tail-call.js
@@ -3,6 +3,8 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --harmony-tailcalls
+// Flags: --harmony-do-expressions
+
"use strict";
Error.prepareStackTrace = (error,stack) => {
@@ -259,9 +261,8 @@
}
%NeverOptimizeFunction(g);
- var context = 10;
function f(v) {
- return g(context);
+ return g();
}
%SetForceInlineFlag(f);
@@ -319,10 +320,57 @@
return f([f, g3, test], 13), f([f, test], 153);
}
+ function g4(a) {
+ return f([f, g4, test], false) ||
+ (f([f, g4, test], true) && f([f, test], true));
+ }
+
+ function g5(a) {
+ return f([f, g5, test], true) &&
+ (f([f, g5, test], false) || f([f, test], true));
+ }
+
+ function g6(a) {
+ return f([f, g6, test], 13), f([f, g6, test], 42),
+ f([f, test], 153);
+ }
+
+ function g7(a) {
+ return f([f, g7, test], false) ||
+ (f([f, g7, test], false) ? f([f, test], true)
+ : f([f, test], true));
+ }
+
+ function g8(a) {
+ return f([f, g8, test], false) || f([f, g8, test], true) &&
+ f([f, test], true);
+ }
+
+ function g9(a) {
+ return f([f, g9, test], true) && f([f, g9, test], false) ||
+ f([f, test], true);
+ }
+
+ function g10(a) {
+ return f([f, g10, test], true) && f([f, g10, test], false) ||
+ f([f, g10, test], true) ?
+ f([f, g10, test], true) && f([f, g10, test], false) ||
+ f([f, test], true) :
+ f([f, g10, test], true) && f([f, g10, test], false) ||
+ f([f, test], true);
+ }
+
function test() {
assertEquals(true, g1());
assertEquals(true, g2());
assertEquals(153, g3());
+ assertEquals(true, g4());
+ assertEquals(true, g5());
+ assertEquals(153, g6());
+ assertEquals(true, g7());
+ assertEquals(true, g8());
+ assertEquals(true, g9());
+ assertEquals(true, g10());
}
test();
test();
@@ -534,9 +582,34 @@
return (() => f_153([f_153, test]))();
}
+ function g3(a) {
+ var closure = () => f([f, closure, test], true)
+ ? f_153([f_153, test])
+ : f_153([f_153, test]);
+ return closure();
+ }
+
function test() {
assertEquals(153, g1());
assertEquals(153, g2());
+ assertEquals(153, g3());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from do expressions.
+(function () {
+ function g1(a) {
+ var a = do { return f_153([f_153, test]); 42; };
+ return a;
+ }
+
+ function test() {
+ assertEquals(153, g1());
}
test();
test();
diff --git a/test/mjsunit/es7/object-observe-debug-event.js b/test/mjsunit/es7/object-observe-debug-event.js
deleted file mode 100644
index 06123b8..0000000
--- a/test/mjsunit/es7/object-observe-debug-event.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe
-// Flags: --expose-debug-as debug
-
-Debug = debug.Debug;
-
-var base_id = -1;
-var exception = null;
-var expected = [
- "enqueue #1",
- "willHandle #1",
- "didHandle #1",
-];
-
-function assertLog(msg) {
- print(msg);
- assertTrue(expected.length > 0);
- assertEquals(expected.shift(), msg);
- if (!expected.length) {
- Debug.setListener(null);
- }
-}
-
-function listener(event, exec_state, event_data, data) {
- if (event != Debug.DebugEvent.AsyncTaskEvent) return;
- try {
- if (base_id < 0)
- base_id = event_data.id();
- var id = event_data.id() - base_id + 1;
- assertEquals("Object.observe", event_data.name());
- assertLog(event_data.type() + " #" + id);
- } catch (e) {
- print(e + e.stack)
- exception = e;
- }
-}
-
-Debug.setListener(listener);
-
-var obj = {};
-Object.observe(obj, function(changes) {
- print(change.type + " " + change.name + " " + change.oldValue);
-});
-
-obj.foo = 1;
-obj.zoo = 2;
-obj.foo = 3;
-
-assertNull(exception);
diff --git a/test/mjsunit/es7/object-observe-runtime.js b/test/mjsunit/es7/object-observe-runtime.js
deleted file mode 100644
index 1a07141..0000000
--- a/test/mjsunit/es7/object-observe-runtime.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe
-// Flags: --allow-natives-syntax
-
-// These tests are meant to ensure that that the Object.observe runtime
-// functions are hardened.
-
-var obj = {};
-%SetIsObserved(obj);
-assertThrows(function() {
- %SetIsObserved(obj);
-});
-
-assertThrows(function() {
- %SetIsObserved(this);
-});
diff --git a/test/mjsunit/es7/object-observe.js b/test/mjsunit/es7/object-observe.js
deleted file mode 100644
index a558c51..0000000
--- a/test/mjsunit/es7/object-observe.js
+++ /dev/null
@@ -1,1865 +0,0 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --harmony-object-observe
-// Flags: --allow-natives-syntax
-
-var allObservers = [];
-function reset() {
- allObservers.forEach(function(observer) { observer.reset(); });
-}
-
-function stringifyNoThrow(arg) {
- try {
- return JSON.stringify(arg);
- } catch (e) {
- return '{<circular reference>}';
- }
-}
-
-function createObserver() {
- "use strict"; // So that |this| in callback can be undefined.
-
- var observer = {
- records: undefined,
- callbackCount: 0,
- reset: function() {
- this.records = undefined;
- this.callbackCount = 0;
- },
- assertNotCalled: function() {
- assertEquals(undefined, this.records);
- assertEquals(0, this.callbackCount);
- },
- assertCalled: function() {
- assertEquals(1, this.callbackCount);
- },
- assertRecordCount: function(count) {
- this.assertCalled();
- assertEquals(count, this.records.length);
- },
- assertCallbackRecords: function(recs) {
- this.assertRecordCount(recs.length);
- for (var i = 0; i < recs.length; i++) {
- if ('name' in recs[i]) recs[i].name = String(recs[i].name);
- print(i, stringifyNoThrow(this.records[i]), stringifyNoThrow(recs[i]));
- assertSame(this.records[i].object, recs[i].object);
- assertEquals('string', typeof recs[i].type);
- assertPropertiesEqual(this.records[i], recs[i]);
- }
- }
- };
-
- observer.callback = function(r) {
- assertEquals(undefined, this);
- assertEquals('object', typeof r);
- assertTrue(r instanceof Array)
- observer.records = r;
- observer.callbackCount++;
- };
-
- observer.reset();
- allObservers.push(observer);
- return observer;
-}
-
-var observer = createObserver();
-var observer2 = createObserver();
-
-assertEquals("function", typeof observer.callback);
-assertEquals("function", typeof observer2.callback);
-
-var obj = {};
-
-function frozenFunction() {}
-Object.freeze(frozenFunction);
-var nonFunction = {};
-var changeRecordWithAccessor = { type: 'foo' };
-var recordCreated = false;
-Object.defineProperty(changeRecordWithAccessor, 'name', {
- get: function() {
- recordCreated = true;
- return "bar";
- },
- enumerable: true
-})
-
-
-// Object.observe
-assertThrows(function() { Object.observe("non-object", observer.callback); },
- TypeError);
-assertThrows(function() { Object.observe(this, observer.callback); },
- TypeError);
-assertThrows(function() { Object.observe(obj, nonFunction); }, TypeError);
-assertThrows(function() { Object.observe(obj, frozenFunction); }, TypeError);
-assertEquals(obj, Object.observe(obj, observer.callback, [1]));
-assertEquals(obj, Object.observe(obj, observer.callback, [true]));
-assertEquals(obj, Object.observe(obj, observer.callback, ['foo', null]));
-assertEquals(obj, Object.observe(obj, observer.callback, [undefined]));
-assertEquals(obj, Object.observe(obj, observer.callback,
- ['foo', 'bar', 'baz']));
-assertEquals(obj, Object.observe(obj, observer.callback, []));
-assertEquals(obj, Object.observe(obj, observer.callback, undefined));
-assertEquals(obj, Object.observe(obj, observer.callback));
-
-// Object.unobserve
-assertThrows(function() { Object.unobserve(4, observer.callback); }, TypeError);
-assertThrows(function() { Object.unobserve(this, observer.callback); },
- TypeError);
-assertThrows(function() { Object.unobserve(obj, nonFunction); }, TypeError);
-assertEquals(obj, Object.unobserve(obj, observer.callback));
-
-
-// Object.getNotifier
-var notifier = Object.getNotifier(obj);
-assertSame(notifier, Object.getNotifier(obj));
-assertEquals(null, Object.getNotifier(Object.freeze({})));
-assertThrows(function() { Object.getNotifier(this) }, TypeError);
-assertFalse(notifier.hasOwnProperty('notify'));
-assertEquals([], Object.keys(notifier));
-var notifyDesc = Object.getOwnPropertyDescriptor(notifier.__proto__, 'notify');
-assertTrue(notifyDesc.configurable);
-assertTrue(notifyDesc.writable);
-assertFalse(notifyDesc.enumerable);
-assertThrows(function() { notifier.notify({}); }, TypeError);
-assertThrows(function() { notifier.notify({ type: 4 }); }, TypeError);
-
-assertThrows(function() { notifier.performChange(1, function(){}); }, TypeError);
-assertThrows(function() { notifier.performChange(undefined, function(){}); }, TypeError);
-assertThrows(function() { notifier.performChange('foo', undefined); }, TypeError);
-assertThrows(function() { notifier.performChange('foo', 'bar'); }, TypeError);
-var global = this;
-notifier.performChange('foo', function() {
- assertEquals(global, this);
-});
-
-var notify = notifier.notify;
-assertThrows(function() { notify.call(undefined, { type: 'a' }); }, TypeError);
-assertThrows(function() { notify.call(null, { type: 'a' }); }, TypeError);
-assertThrows(function() { notify.call(5, { type: 'a' }); }, TypeError);
-assertThrows(function() { notify.call('hello', { type: 'a' }); }, TypeError);
-assertThrows(function() { notify.call(false, { type: 'a' }); }, TypeError);
-assertThrows(function() { notify.call({}, { type: 'a' }); }, TypeError);
-assertFalse(recordCreated);
-notifier.notify(changeRecordWithAccessor);
-assertFalse(recordCreated); // not observed yet
-
-
-// Object.deliverChangeRecords
-assertThrows(function() { Object.deliverChangeRecords(nonFunction); }, TypeError);
-
-Object.observe(obj, observer.callback);
-
-
-// notify uses to [[CreateOwnProperty]] to create changeRecord;
-reset();
-var protoExpandoAccessed = false;
-Object.defineProperty(Object.prototype, 'protoExpando',
- {
- configurable: true,
- set: function() { protoExpandoAccessed = true; }
- }
-);
-notifier.notify({ type: 'foo', protoExpando: 'val'});
-assertFalse(protoExpandoAccessed);
-delete Object.prototype.protoExpando;
-Object.deliverChangeRecords(observer.callback);
-
-
-// Multiple records are delivered.
-reset();
-notifier.notify({
- type: 'update',
- name: 'foo',
- expando: 1
-});
-
-notifier.notify({
- object: notifier, // object property is ignored
- type: 'delete',
- name: 'bar',
- expando2: 'str'
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: 'foo', type: 'update', expando: 1 },
- { object: obj, name: 'bar', type: 'delete', expando2: 'str' }
-]);
-
-// Non-string accept values are coerced to strings
-reset();
-Object.observe(obj, observer.callback, [true, 1, null, undefined]);
-notifier = Object.getNotifier(obj);
-notifier.notify({ type: 'true' });
-notifier.notify({ type: 'false' });
-notifier.notify({ type: '1' });
-notifier.notify({ type: '-1' });
-notifier.notify({ type: 'null' });
-notifier.notify({ type: 'nill' });
-notifier.notify({ type: 'undefined' });
-notifier.notify({ type: 'defined' });
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'true' },
- { object: obj, type: '1' },
- { object: obj, type: 'null' },
- { object: obj, type: 'undefined' }
-]);
-
-// No delivery takes place if no records are pending
-reset();
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-
-// Multiple observation has no effect.
-reset();
-Object.observe(obj, observer.callback);
-Object.observe(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCalled();
-
-
-// Observation can be stopped.
-reset();
-Object.unobserve(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-
-// Multiple unobservation has no effect
-reset();
-Object.unobserve(obj, observer.callback);
-Object.unobserve(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-
-// Re-observation works and only includes changeRecords after of call.
-reset();
-Object.getNotifier(obj).notify({
- type: 'update',
-});
-Object.observe(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
-});
-records = undefined;
-Object.deliverChangeRecords(observer.callback);
-observer.assertRecordCount(1);
-
-// Get notifier prior to observing
-reset();
-var obj = {};
-Object.getNotifier(obj);
-Object.observe(obj, observer.callback);
-obj.id = 1;
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'add', name: 'id' },
-]);
-
-// The empty-string property is observable
-reset();
-var obj = {};
-Object.observe(obj, observer.callback);
-obj[''] = '';
-obj[''] = ' ';
-delete obj[''];
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'add', name: '' },
- { object: obj, type: 'update', name: '', oldValue: '' },
- { object: obj, type: 'delete', name: '', oldValue: ' ' },
-]);
-
-// Object.preventExtensions
-reset();
-var obj = { foo: 'bar'};
-Object.observe(obj, observer.callback);
-obj.baz = 'bat';
-Object.preventExtensions(obj);
-
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'add', name: 'baz' },
- { object: obj, type: 'preventExtensions' },
-]);
-
-reset();
-var obj = { foo: 'bar'};
-Object.preventExtensions(obj);
-Object.observe(obj, observer.callback);
-Object.preventExtensions(obj);
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-// Object.freeze
-reset();
-var obj = { a: 'a' };
-Object.defineProperty(obj, 'b', {
- writable: false,
- configurable: true,
- value: 'b'
-});
-Object.defineProperty(obj, 'c', {
- writable: true,
- configurable: false,
- value: 'c'
-});
-Object.defineProperty(obj, 'd', {
- writable: false,
- configurable: false,
- value: 'd'
-});
-Object.observe(obj, observer.callback);
-Object.freeze(obj);
-
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'preventExtensions' },
- { object: obj, type: 'reconfigure', name: 'a' },
- { object: obj, type: 'reconfigure', name: 'b' },
- { object: obj, type: 'reconfigure', name: 'c' },
-]);
-
-reset();
-var obj = { foo: 'bar'};
-Object.freeze(obj);
-Object.observe(obj, observer.callback);
-Object.freeze(obj);
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-// Object.seal
-reset();
-var obj = { a: 'a' };
-Object.defineProperty(obj, 'b', {
- writable: false,
- configurable: true,
- value: 'b'
-});
-Object.defineProperty(obj, 'c', {
- writable: true,
- configurable: false,
- value: 'c'
-});
-Object.defineProperty(obj, 'd', {
- writable: false,
- configurable: false,
- value: 'd'
-});
-Object.observe(obj, observer.callback);
-Object.seal(obj);
-
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'preventExtensions' },
- { object: obj, type: 'reconfigure', name: 'a' },
- { object: obj, type: 'reconfigure', name: 'b' },
-]);
-
-reset();
-var obj = { foo: 'bar'};
-Object.seal(obj);
-Object.observe(obj, observer.callback);
-Object.seal(obj);
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-// Observing a continuous stream of changes, while itermittantly unobserving.
-reset();
-var obj = {};
-Object.observe(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
- val: 1
-});
-
-Object.unobserve(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
- val: 2
-});
-
-Object.observe(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
- val: 3
-});
-
-Object.unobserve(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
- val: 4
-});
-
-Object.observe(obj, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'update',
- val: 5
-});
-
-Object.unobserve(obj, observer.callback);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'update', val: 1 },
- { object: obj, type: 'update', val: 3 },
- { object: obj, type: 'update', val: 5 }
-]);
-
-// Accept
-reset();
-Object.observe(obj, observer.callback, ['somethingElse']);
-Object.getNotifier(obj).notify({
- type: 'add'
-});
-Object.getNotifier(obj).notify({
- type: 'update'
-});
-Object.getNotifier(obj).notify({
- type: 'delete'
-});
-Object.getNotifier(obj).notify({
- type: 'reconfigure'
-});
-Object.getNotifier(obj).notify({
- type: 'setPrototype'
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-reset();
-Object.observe(obj, observer.callback, ['add', 'delete', 'setPrototype']);
-Object.getNotifier(obj).notify({
- type: 'add'
-});
-Object.getNotifier(obj).notify({
- type: 'update'
-});
-Object.getNotifier(obj).notify({
- type: 'delete'
-});
-Object.getNotifier(obj).notify({
- type: 'delete'
-});
-Object.getNotifier(obj).notify({
- type: 'reconfigure'
-});
-Object.getNotifier(obj).notify({
- type: 'setPrototype'
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'add' },
- { object: obj, type: 'delete' },
- { object: obj, type: 'delete' },
- { object: obj, type: 'setPrototype' }
-]);
-
-reset();
-Object.observe(obj, observer.callback, ['update', 'foo']);
-Object.getNotifier(obj).notify({
- type: 'add'
-});
-Object.getNotifier(obj).notify({
- type: 'update'
-});
-Object.getNotifier(obj).notify({
- type: 'delete'
-});
-Object.getNotifier(obj).notify({
- type: 'foo'
-});
-Object.getNotifier(obj).notify({
- type: 'bar'
-});
-Object.getNotifier(obj).notify({
- type: 'foo'
-});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'update' },
- { object: obj, type: 'foo' },
- { object: obj, type: 'foo' }
-]);
-
-reset();
-function Thingy(a, b, c) {
- this.a = a;
- this.b = b;
-}
-
-Thingy.MULTIPLY = 'multiply';
-Thingy.INCREMENT = 'increment';
-Thingy.INCREMENT_AND_MULTIPLY = 'incrementAndMultiply';
-
-Thingy.prototype = {
- increment: function(amount) {
- var notifier = Object.getNotifier(this);
-
- var self = this;
- notifier.performChange(Thingy.INCREMENT, function() {
- self.a += amount;
- self.b += amount;
-
- return {
- incremented: amount
- }; // implicit notify
- });
- },
-
- multiply: function(amount) {
- var notifier = Object.getNotifier(this);
-
- var self = this;
- notifier.performChange(Thingy.MULTIPLY, function() {
- self.a *= amount;
- self.b *= amount;
-
- return {
- multiplied: amount
- }; // implicit notify
- });
- },
-
- incrementAndMultiply: function(incAmount, multAmount) {
- var notifier = Object.getNotifier(this);
-
- var self = this;
- notifier.performChange(Thingy.INCREMENT_AND_MULTIPLY, function() {
- self.increment(incAmount);
- self.multiply(multAmount);
-
- return {
- incremented: incAmount,
- multiplied: multAmount
- }; // implicit notify
- });
- }
-}
-
-Thingy.observe = function(thingy, callback) {
- Object.observe(thingy, callback, [Thingy.INCREMENT,
- Thingy.MULTIPLY,
- Thingy.INCREMENT_AND_MULTIPLY,
- 'update']);
-}
-
-Thingy.unobserve = function(thingy, callback) {
- Object.unobserve(thingy);
-}
-
-var thingy = new Thingy(2, 4);
-
-Object.observe(thingy, observer.callback);
-Thingy.observe(thingy, observer2.callback);
-thingy.increment(3); // { a: 5, b: 7 }
-thingy.b++; // { a: 5, b: 8 }
-thingy.multiply(2); // { a: 10, b: 16 }
-thingy.a++; // { a: 11, b: 16 }
-thingy.incrementAndMultiply(2, 2); // { a: 26, b: 36 }
-
-Object.deliverChangeRecords(observer.callback);
-Object.deliverChangeRecords(observer2.callback);
-observer.assertCallbackRecords([
- { object: thingy, type: 'update', name: 'a', oldValue: 2 },
- { object: thingy, type: 'update', name: 'b', oldValue: 4 },
- { object: thingy, type: 'update', name: 'b', oldValue: 7 },
- { object: thingy, type: 'update', name: 'a', oldValue: 5 },
- { object: thingy, type: 'update', name: 'b', oldValue: 8 },
- { object: thingy, type: 'update', name: 'a', oldValue: 10 },
- { object: thingy, type: 'update', name: 'a', oldValue: 11 },
- { object: thingy, type: 'update', name: 'b', oldValue: 16 },
- { object: thingy, type: 'update', name: 'a', oldValue: 13 },
- { object: thingy, type: 'update', name: 'b', oldValue: 18 },
-]);
-observer2.assertCallbackRecords([
- { object: thingy, type: Thingy.INCREMENT, incremented: 3 },
- { object: thingy, type: 'update', name: 'b', oldValue: 7 },
- { object: thingy, type: Thingy.MULTIPLY, multiplied: 2 },
- { object: thingy, type: 'update', name: 'a', oldValue: 10 },
- {
- object: thingy,
- type: Thingy.INCREMENT_AND_MULTIPLY,
- incremented: 2,
- multiplied: 2
- }
-]);
-
-// ArrayPush cached stub
-reset();
-
-function pushMultiple(arr) {
- arr.push('a');
- arr.push('b');
- arr.push('c');
-}
-
-for (var i = 0; i < 5; i++) {
- var arr = [];
- pushMultiple(arr);
-}
-
-for (var i = 0; i < 5; i++) {
- reset();
- var arr = [];
- Object.observe(arr, observer.callback);
- pushMultiple(arr);
- Object.unobserve(arr, observer.callback);
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: arr, type: 'add', name: '0' },
- { object: arr, type: 'update', name: 'length', oldValue: 0 },
- { object: arr, type: 'add', name: '1' },
- { object: arr, type: 'update', name: 'length', oldValue: 1 },
- { object: arr, type: 'add', name: '2' },
- { object: arr, type: 'update', name: 'length', oldValue: 2 },
- ]);
-}
-
-
-// ArrayPop cached stub
-reset();
-
-function popMultiple(arr) {
- arr.pop();
- arr.pop();
- arr.pop();
-}
-
-for (var i = 0; i < 5; i++) {
- var arr = ['a', 'b', 'c'];
- popMultiple(arr);
-}
-
-for (var i = 0; i < 5; i++) {
- reset();
- var arr = ['a', 'b', 'c'];
- Object.observe(arr, observer.callback);
- popMultiple(arr);
- Object.unobserve(arr, observer.callback);
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: arr, type: 'delete', name: '2', oldValue: 'c' },
- { object: arr, type: 'update', name: 'length', oldValue: 3 },
- { object: arr, type: 'delete', name: '1', oldValue: 'b' },
- { object: arr, type: 'update', name: 'length', oldValue: 2 },
- { object: arr, type: 'delete', name: '0', oldValue: 'a' },
- { object: arr, type: 'update', name: 'length', oldValue: 1 },
- ]);
-}
-
-
-reset();
-function RecursiveThingy() {}
-
-RecursiveThingy.MULTIPLY_FIRST_N = 'multiplyFirstN';
-
-RecursiveThingy.prototype = {
- __proto__: Array.prototype,
-
- multiplyFirstN: function(amount, n) {
- if (!n)
- return;
- var notifier = Object.getNotifier(this);
- var self = this;
- notifier.performChange(RecursiveThingy.MULTIPLY_FIRST_N, function() {
- self[n-1] = self[n-1]*amount;
- self.multiplyFirstN(amount, n-1);
- });
-
- notifier.notify({
- type: RecursiveThingy.MULTIPLY_FIRST_N,
- multiplied: amount,
- n: n
- });
- },
-}
-
-RecursiveThingy.observe = function(thingy, callback) {
- Object.observe(thingy, callback, [RecursiveThingy.MULTIPLY_FIRST_N]);
-}
-
-RecursiveThingy.unobserve = function(thingy, callback) {
- Object.unobserve(thingy);
-}
-
-var thingy = new RecursiveThingy;
-thingy.push(1, 2, 3, 4);
-
-Object.observe(thingy, observer.callback);
-RecursiveThingy.observe(thingy, observer2.callback);
-thingy.multiplyFirstN(2, 3); // [2, 4, 6, 4]
-
-Object.deliverChangeRecords(observer.callback);
-Object.deliverChangeRecords(observer2.callback);
-observer.assertCallbackRecords([
- { object: thingy, type: 'update', name: '2', oldValue: 3 },
- { object: thingy, type: 'update', name: '1', oldValue: 2 },
- { object: thingy, type: 'update', name: '0', oldValue: 1 }
-]);
-observer2.assertCallbackRecords([
- { object: thingy, type: RecursiveThingy.MULTIPLY_FIRST_N, multiplied: 2, n: 3 }
-]);
-
-reset();
-function DeckSuit() {
- this.push('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'A', 'Q', 'K');
-}
-
-DeckSuit.SHUFFLE = 'shuffle';
-
-DeckSuit.prototype = {
- __proto__: Array.prototype,
-
- shuffle: function() {
- var notifier = Object.getNotifier(this);
- var self = this;
- notifier.performChange(DeckSuit.SHUFFLE, function() {
- self.reverse();
- self.sort(function() { return Math.random()* 2 - 1; });
- var cut = self.splice(0, 6);
- Array.prototype.push.apply(self, cut);
- self.reverse();
- self.sort(function() { return Math.random()* 2 - 1; });
- var cut = self.splice(0, 6);
- Array.prototype.push.apply(self, cut);
- self.reverse();
- self.sort(function() { return Math.random()* 2 - 1; });
- });
-
- notifier.notify({
- type: DeckSuit.SHUFFLE
- });
- },
-}
-
-DeckSuit.observe = function(thingy, callback) {
- Object.observe(thingy, callback, [DeckSuit.SHUFFLE]);
-}
-
-DeckSuit.unobserve = function(thingy, callback) {
- Object.unobserve(thingy);
-}
-
-var deck = new DeckSuit;
-
-DeckSuit.observe(deck, observer2.callback);
-deck.shuffle();
-
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: deck, type: DeckSuit.SHUFFLE }
-]);
-
-// Observing multiple objects; records appear in order.
-reset();
-var obj2 = {};
-var obj3 = {}
-Object.observe(obj, observer.callback);
-Object.observe(obj3, observer.callback);
-Object.observe(obj2, observer.callback);
-Object.getNotifier(obj).notify({
- type: 'add',
-});
-Object.getNotifier(obj2).notify({
- type: 'update',
-});
-Object.getNotifier(obj3).notify({
- type: 'delete',
-});
-Object.observe(obj3, observer.callback);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, type: 'add' },
- { object: obj2, type: 'update' },
- { object: obj3, type: 'delete' }
-]);
-
-
-// Recursive observation.
-var obj = {a: 1};
-var callbackCount = 0;
-function recursiveObserver(r) {
- assertEquals(1, r.length);
- ++callbackCount;
- if (r[0].oldValue < 100) ++obj[r[0].name];
-}
-Object.observe(obj, recursiveObserver);
-++obj.a;
-Object.deliverChangeRecords(recursiveObserver);
-assertEquals(100, callbackCount);
-
-var obj1 = {a: 1};
-var obj2 = {a: 1};
-var recordCount = 0;
-function recursiveObserver2(r) {
- recordCount += r.length;
- if (r[0].oldValue < 100) {
- ++obj1.a;
- ++obj2.a;
- }
-}
-Object.observe(obj1, recursiveObserver2);
-Object.observe(obj2, recursiveObserver2);
-++obj1.a;
-Object.deliverChangeRecords(recursiveObserver2);
-assertEquals(199, recordCount);
-
-
-// Observing named properties.
-reset();
-var obj = {a: 1}
-Object.observe(obj, observer.callback);
-obj.a = 2;
-obj["a"] = 3;
-delete obj.a;
-obj.a = 4;
-obj.a = 4; // ignored
-obj.a = 5;
-Object.defineProperty(obj, "a", {value: 6});
-Object.defineProperty(obj, "a", {writable: false});
-obj.a = 7; // ignored
-Object.defineProperty(obj, "a", {value: 8});
-Object.defineProperty(obj, "a", {value: 7, writable: true});
-Object.defineProperty(obj, "a", {get: function() {}});
-Object.defineProperty(obj, "a", {get: frozenFunction});
-Object.defineProperty(obj, "a", {get: frozenFunction}); // ignored
-Object.defineProperty(obj, "a", {get: frozenFunction, set: frozenFunction});
-Object.defineProperty(obj, "a", {set: frozenFunction}); // ignored
-Object.defineProperty(obj, "a", {get: undefined, set: frozenFunction});
-delete obj.a;
-delete obj.a;
-Object.defineProperty(obj, "a", {get: function() {}, configurable: true});
-Object.defineProperty(obj, "a", {value: 9, writable: true});
-obj.a = 10;
-++obj.a;
-obj.a++;
-obj.a *= 3;
-delete obj.a;
-Object.defineProperty(obj, "a", {value: 11, configurable: true});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: "a", type: "update", oldValue: 1 },
- { object: obj, name: "a", type: "update", oldValue: 2 },
- { object: obj, name: "a", type: "delete", oldValue: 3 },
- { object: obj, name: "a", type: "add" },
- { object: obj, name: "a", type: "update", oldValue: 4 },
- { object: obj, name: "a", type: "update", oldValue: 5 },
- { object: obj, name: "a", type: "reconfigure" },
- { object: obj, name: "a", type: "update", oldValue: 6 },
- { object: obj, name: "a", type: "reconfigure", oldValue: 8 },
- { object: obj, name: "a", type: "reconfigure", oldValue: 7 },
- { object: obj, name: "a", type: "reconfigure" },
- { object: obj, name: "a", type: "reconfigure" },
- { object: obj, name: "a", type: "reconfigure" },
- { object: obj, name: "a", type: "delete" },
- { object: obj, name: "a", type: "add" },
- { object: obj, name: "a", type: "reconfigure" },
- { object: obj, name: "a", type: "update", oldValue: 9 },
- { object: obj, name: "a", type: "update", oldValue: 10 },
- { object: obj, name: "a", type: "update", oldValue: 11 },
- { object: obj, name: "a", type: "update", oldValue: 12 },
- { object: obj, name: "a", type: "delete", oldValue: 36 },
- { object: obj, name: "a", type: "add" },
-]);
-
-
-// Observing indexed properties.
-reset();
-var obj = {'1': 1}
-Object.observe(obj, observer.callback);
-obj[1] = 2;
-obj[1] = 3;
-delete obj[1];
-obj[1] = 4;
-obj[1] = 4; // ignored
-obj[1] = 5;
-Object.defineProperty(obj, "1", {value: 6});
-Object.defineProperty(obj, "1", {writable: false});
-obj[1] = 7; // ignored
-Object.defineProperty(obj, "1", {value: 8});
-Object.defineProperty(obj, "1", {value: 7, writable: true});
-Object.defineProperty(obj, "1", {get: function() {}});
-Object.defineProperty(obj, "1", {get: frozenFunction});
-Object.defineProperty(obj, "1", {get: frozenFunction}); // ignored
-Object.defineProperty(obj, "1", {get: frozenFunction, set: frozenFunction});
-Object.defineProperty(obj, "1", {set: frozenFunction}); // ignored
-Object.defineProperty(obj, "1", {get: undefined, set: frozenFunction});
-delete obj[1];
-delete obj[1];
-Object.defineProperty(obj, "1", {get: function() {}, configurable: true});
-Object.defineProperty(obj, "1", {value: 9, writable: true});
-obj[1] = 10;
-++obj[1];
-obj[1]++;
-obj[1] *= 3;
-delete obj[1];
-Object.defineProperty(obj, "1", {value: 11, configurable: true});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: "1", type: "update", oldValue: 1 },
- { object: obj, name: "1", type: "update", oldValue: 2 },
- { object: obj, name: "1", type: "delete", oldValue: 3 },
- { object: obj, name: "1", type: "add" },
- { object: obj, name: "1", type: "update", oldValue: 4 },
- { object: obj, name: "1", type: "update", oldValue: 5 },
- { object: obj, name: "1", type: "reconfigure" },
- { object: obj, name: "1", type: "update", oldValue: 6 },
- { object: obj, name: "1", type: "reconfigure", oldValue: 8 },
- { object: obj, name: "1", type: "reconfigure", oldValue: 7 },
- { object: obj, name: "1", type: "reconfigure" },
- { object: obj, name: "1", type: "reconfigure" },
- { object: obj, name: "1", type: "reconfigure" },
- { object: obj, name: "1", type: "delete" },
- { object: obj, name: "1", type: "add" },
- { object: obj, name: "1", type: "reconfigure" },
- { object: obj, name: "1", type: "update", oldValue: 9 },
- { object: obj, name: "1", type: "update", oldValue: 10 },
- { object: obj, name: "1", type: "update", oldValue: 11 },
- { object: obj, name: "1", type: "update", oldValue: 12 },
- { object: obj, name: "1", type: "delete", oldValue: 36 },
- { object: obj, name: "1", type: "add" },
-]);
-
-
-// Observing symbol properties (not).
-print("*****")
-reset();
-var obj = {}
-var symbol = Symbol("secret");
-Object.observe(obj, observer.callback);
-obj[symbol] = 3;
-delete obj[symbol];
-Object.defineProperty(obj, symbol, {get: function() {}, configurable: true});
-Object.defineProperty(obj, symbol, {value: 6});
-Object.defineProperty(obj, symbol, {writable: false});
-delete obj[symbol];
-Object.defineProperty(obj, symbol, {value: 7});
-++obj[symbol];
-obj[symbol]++;
-obj[symbol] *= 3;
-delete obj[symbol];
-obj.__defineSetter__(symbol, function() {});
-obj.__defineGetter__(symbol, function() {});
-Object.deliverChangeRecords(observer.callback);
-observer.assertNotCalled();
-
-
-// Test all kinds of objects generically.
-function TestObserveConfigurable(obj, prop) {
- reset();
- Object.observe(obj, observer.callback);
- Object.unobserve(obj, observer.callback);
- obj[prop] = 1;
- Object.observe(obj, observer.callback);
- obj[prop] = 2;
- obj[prop] = 3;
- delete obj[prop];
- obj[prop] = 4;
- obj[prop] = 4; // ignored
- obj[prop] = 5;
- Object.defineProperty(obj, prop, {value: 6});
- Object.defineProperty(obj, prop, {writable: false});
- obj[prop] = 7; // ignored
- Object.defineProperty(obj, prop, {value: 8});
- Object.defineProperty(obj, prop, {value: 7, writable: true});
- Object.defineProperty(obj, prop, {get: function() {}});
- Object.defineProperty(obj, prop, {get: frozenFunction});
- Object.defineProperty(obj, prop, {get: frozenFunction}); // ignored
- Object.defineProperty(obj, prop, {get: frozenFunction, set: frozenFunction});
- Object.defineProperty(obj, prop, {set: frozenFunction}); // ignored
- Object.defineProperty(obj, prop, {get: undefined, set: frozenFunction});
- obj.__defineSetter__(prop, frozenFunction); // ignored
- obj.__defineSetter__(prop, function() {});
- obj.__defineGetter__(prop, function() {});
- delete obj[prop];
- delete obj[prop]; // ignored
- obj.__defineGetter__(prop, function() {});
- delete obj[prop];
- Object.defineProperty(obj, prop, {get: function() {}, configurable: true});
- Object.defineProperty(obj, prop, {value: 9, writable: true});
- obj[prop] = 10;
- ++obj[prop];
- obj[prop]++;
- obj[prop] *= 3;
- delete obj[prop];
- Object.defineProperty(obj, prop, {value: 11, configurable: true});
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: obj, name: prop, type: "update", oldValue: 1 },
- { object: obj, name: prop, type: "update", oldValue: 2 },
- { object: obj, name: prop, type: "delete", oldValue: 3 },
- { object: obj, name: prop, type: "add" },
- { object: obj, name: prop, type: "update", oldValue: 4 },
- { object: obj, name: prop, type: "update", oldValue: 5 },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "update", oldValue: 6 },
- { object: obj, name: prop, type: "reconfigure", oldValue: 8 },
- { object: obj, name: prop, type: "reconfigure", oldValue: 7 },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "delete" },
- { object: obj, name: prop, type: "add" },
- { object: obj, name: prop, type: "delete" },
- { object: obj, name: prop, type: "add" },
- { object: obj, name: prop, type: "reconfigure" },
- { object: obj, name: prop, type: "update", oldValue: 9 },
- { object: obj, name: prop, type: "update", oldValue: 10 },
- { object: obj, name: prop, type: "update", oldValue: 11 },
- { object: obj, name: prop, type: "update", oldValue: 12 },
- { object: obj, name: prop, type: "delete", oldValue: 36 },
- { object: obj, name: prop, type: "add" },
- ]);
- Object.unobserve(obj, observer.callback);
- delete obj[prop];
-}
-
-function TestObserveNonConfigurable(obj, prop, desc) {
- reset();
- Object.observe(obj, observer.callback);
- Object.unobserve(obj, observer.callback);
- obj[prop] = 1;
- Object.observe(obj, observer.callback);
- obj[prop] = 4;
- obj[prop] = 4; // ignored
- obj[prop] = 5;
- Object.defineProperty(obj, prop, {value: 6});
- Object.defineProperty(obj, prop, {value: 6}); // ignored
- Object.defineProperty(obj, prop, {value: 7});
- Object.defineProperty(obj, prop, {enumerable: desc.enumerable}); // ignored
- Object.defineProperty(obj, prop, {writable: false});
- obj[prop] = 7; // ignored
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: obj, name: prop, type: "update", oldValue: 1 },
- { object: obj, name: prop, type: "update", oldValue: 4 },
- { object: obj, name: prop, type: "update", oldValue: 5 },
- { object: obj, name: prop, type: "update", oldValue: 6 },
- { object: obj, name: prop, type: "reconfigure" },
- ]);
- Object.unobserve(obj, observer.callback);
-}
-
-// TODO(rafaelw) Enable when ES6 Proxies are implemented
-/*
-function createProxy(create, x) {
- var handler = {
- getPropertyDescriptor: function(k) {
- for (var o = this.target; o; o = Object.getPrototypeOf(o)) {
- var desc = Object.getOwnPropertyDescriptor(o, k);
- if (desc) return desc;
- }
- return undefined;
- },
- getOwnPropertyDescriptor: function(k) {
- return Object.getOwnPropertyDescriptor(this.target, k);
- },
- defineProperty: function(k, desc) {
- var x = Object.defineProperty(this.target, k, desc);
- Object.deliverChangeRecords(this.callback);
- return x;
- },
- delete: function(k) {
- var x = delete this.target[k];
- Object.deliverChangeRecords(this.callback);
- return x;
- },
- getPropertyNames: function() {
- return Object.getOwnPropertyNames(this.target);
- },
- target: {isProxy: true},
- callback: function(changeRecords) {
- print("callback", stringifyNoThrow(handler.proxy), stringifyNoThrow(got));
- for (var i in changeRecords) {
- var got = changeRecords[i];
- var change = {object: handler.proxy, name: got.name, type: got.type};
- if ("oldValue" in got) change.oldValue = got.oldValue;
- Object.getNotifier(handler.proxy).notify(change);
- }
- },
- };
- Object.observe(handler.target, handler.callback);
- return handler.proxy = create(handler, x);
-}
-*/
-
-var objects = [
- {},
- [],
- function(){},
- (function(){ return arguments })(),
- (function(){ "use strict"; return arguments })(),
- Object(1), Object(true), Object("bla"),
- new Date(),
- Object, Function, Date, RegExp,
- new Set, new Map, new WeakMap,
- new ArrayBuffer(10), new Int32Array(5)
-// TODO(rafaelw) Enable when ES6 Proxies are implemented.
-// createProxy(Proxy.create, null),
-// createProxy(Proxy.createFunction, function(){}),
-];
-var properties = ["a", "1", 1, "length", "setPrototype", "name", "caller"];
-
-// Cases that yield non-standard results.
-function blacklisted(obj, prop) {
- return (obj instanceof Int32Array && prop == 1) ||
- (obj instanceof Int32Array && prop === "length") ||
- (obj instanceof ArrayBuffer && prop == 1) ||
- (obj instanceof Function && prop === "name") || // Has its own test.
- (obj instanceof Function && prop === "length"); // Has its own test.
-}
-
-for (var i in objects) for (var j in properties) {
- var obj = objects[i];
- var prop = properties[j];
- if (blacklisted(obj, prop)) continue;
- var desc = Object.getOwnPropertyDescriptor(obj, prop);
- print("***", typeof obj, stringifyNoThrow(obj), prop);
- if (!desc || desc.configurable)
- TestObserveConfigurable(obj, prop);
- else if (desc.writable)
- TestObserveNonConfigurable(obj, prop, desc);
-}
-
-
-// Observing array length (including truncation)
-reset();
-var arr = ['a', 'b', 'c', 'd'];
-var arr2 = ['alpha', 'beta'];
-var arr3 = ['hello'];
-arr3[2] = 'goodbye';
-arr3.length = 6;
-Object.defineProperty(arr, '0', {configurable: false});
-Object.defineProperty(arr, '2', {get: function(){}});
-Object.defineProperty(arr2, '0', {get: function(){}, configurable: false});
-Object.observe(arr, observer.callback);
-Array.observe(arr, observer2.callback);
-Object.observe(arr2, observer.callback);
-Array.observe(arr2, observer2.callback);
-Object.observe(arr3, observer.callback);
-Array.observe(arr3, observer2.callback);
-arr.length = 2;
-arr.length = 0;
-arr.length = 10;
-Object.defineProperty(arr, 'length', {writable: false});
-arr2.length = 0;
-arr2.length = 1; // no change expected
-Object.defineProperty(arr2, 'length', {value: 1, writable: false});
-arr3.length = 0;
-++arr3.length;
-arr3.length++;
-arr3.length /= 2;
-Object.defineProperty(arr3, 'length', {value: 5});
-arr3[4] = 5;
-Object.defineProperty(arr3, 'length', {value: 1, writable: false});
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: arr, name: '3', type: 'delete', oldValue: 'd' },
- { object: arr, name: '2', type: 'delete' },
- { object: arr, name: 'length', type: 'update', oldValue: 4 },
- { object: arr, name: '1', type: 'delete', oldValue: 'b' },
- { object: arr, name: 'length', type: 'update', oldValue: 2 },
- { object: arr, name: 'length', type: 'update', oldValue: 1 },
- { object: arr, name: 'length', type: 'reconfigure' },
- { object: arr2, name: '1', type: 'delete', oldValue: 'beta' },
- { object: arr2, name: 'length', type: 'update', oldValue: 2 },
- { object: arr2, name: 'length', type: 'reconfigure' },
- { object: arr3, name: '2', type: 'delete', oldValue: 'goodbye' },
- { object: arr3, name: '0', type: 'delete', oldValue: 'hello' },
- { object: arr3, name: 'length', type: 'update', oldValue: 6 },
- { object: arr3, name: 'length', type: 'update', oldValue: 0 },
- { object: arr3, name: 'length', type: 'update', oldValue: 1 },
- { object: arr3, name: 'length', type: 'update', oldValue: 2 },
- { object: arr3, name: 'length', type: 'update', oldValue: 1 },
- { object: arr3, name: '4', type: 'add' },
- { object: arr3, name: '4', type: 'delete', oldValue: 5 },
- // TODO(rafaelw): It breaks spec compliance to get two records here.
- // When the TODO in v8natives.js::DefineArrayProperty is addressed
- // which prevents DefineProperty from over-writing the magic length
- // property, these will collapse into a single record.
- { object: arr3, name: 'length', type: 'update', oldValue: 5 },
- { object: arr3, name: 'length', type: 'reconfigure' }
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: arr, type: 'splice', index: 2, removed: [, 'd'], addedCount: 0 },
- { object: arr, type: 'splice', index: 1, removed: ['b'], addedCount: 0 },
- { object: arr, type: 'splice', index: 1, removed: [], addedCount: 9 },
- { object: arr2, type: 'splice', index: 1, removed: ['beta'], addedCount: 0 },
- { object: arr3, type: 'splice', index: 0, removed: ['hello',, 'goodbye',,,,], addedCount: 0 },
- { object: arr3, type: 'splice', index: 0, removed: [], addedCount: 1 },
- { object: arr3, type: 'splice', index: 1, removed: [], addedCount: 1 },
- { object: arr3, type: 'splice', index: 1, removed: [,], addedCount: 0 },
- { object: arr3, type: 'splice', index: 1, removed: [], addedCount: 4 },
- { object: arr3, name: '4', type: 'add' },
- { object: arr3, type: 'splice', index: 1, removed: [,,,5], addedCount: 0 }
-]);
-
-
-// Updating length on large (slow) array
-reset();
-var slow_arr = %NormalizeElements([]);
-slow_arr[500000000] = 'hello';
-slow_arr.length = 1000000000;
-Object.observe(slow_arr, observer.callback);
-var spliceRecords;
-function slowSpliceCallback(records) {
- spliceRecords = records;
-}
-Array.observe(slow_arr, slowSpliceCallback);
-slow_arr.length = 100;
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: slow_arr, name: '500000000', type: 'delete', oldValue: 'hello' },
- { object: slow_arr, name: 'length', type: 'update', oldValue: 1000000000 },
-]);
-Object.deliverChangeRecords(slowSpliceCallback);
-assertEquals(spliceRecords.length, 1);
-// Have to custom assert this splice record because the removed array is huge.
-var splice = spliceRecords[0];
-assertSame(splice.object, slow_arr);
-assertEquals(splice.type, 'splice');
-assertEquals(splice.index, 100);
-assertEquals(splice.addedCount, 0);
-var array_keys = %GetArrayKeys(splice.removed, splice.removed.length);
-assertEquals(array_keys.length, 1);
-assertEquals(array_keys[0], 499999900);
-assertEquals(splice.removed[499999900], 'hello');
-assertEquals(splice.removed.length, 999999900);
-
-
-// Assignments in loops (checking different IC states).
-reset();
-var obj = {};
-Object.observe(obj, observer.callback);
-for (var i = 0; i < 5; i++) {
- obj["a" + i] = i;
-}
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: "a0", type: "add" },
- { object: obj, name: "a1", type: "add" },
- { object: obj, name: "a2", type: "add" },
- { object: obj, name: "a3", type: "add" },
- { object: obj, name: "a4", type: "add" },
-]);
-
-reset();
-var obj = {};
-Object.observe(obj, observer.callback);
-for (var i = 0; i < 5; i++) {
- obj[i] = i;
-}
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: "0", type: "add" },
- { object: obj, name: "1", type: "add" },
- { object: obj, name: "2", type: "add" },
- { object: obj, name: "3", type: "add" },
- { object: obj, name: "4", type: "add" },
-]);
-
-
-// Adding elements past the end of an array should notify on length for
-// Object.observe and emit "splices" for Array.observe.
-reset();
-var arr = [1, 2, 3];
-Object.observe(arr, observer.callback);
-Array.observe(arr, observer2.callback);
-arr[3] = 10;
-arr[100] = 20;
-Object.defineProperty(arr, '200', {value: 7});
-Object.defineProperty(arr, '400', {get: function(){}});
-arr[50] = 30; // no length change expected
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: arr, name: '3', type: 'add' },
- { object: arr, name: 'length', type: 'update', oldValue: 3 },
- { object: arr, name: '100', type: 'add' },
- { object: arr, name: 'length', type: 'update', oldValue: 4 },
- { object: arr, name: '200', type: 'add' },
- { object: arr, name: 'length', type: 'update', oldValue: 101 },
- { object: arr, name: '400', type: 'add' },
- { object: arr, name: 'length', type: 'update', oldValue: 201 },
- { object: arr, name: '50', type: 'add' },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: arr, type: 'splice', index: 3, removed: [], addedCount: 1 },
- { object: arr, type: 'splice', index: 4, removed: [], addedCount: 97 },
- { object: arr, type: 'splice', index: 101, removed: [], addedCount: 100 },
- { object: arr, type: 'splice', index: 201, removed: [], addedCount: 200 },
- { object: arr, type: 'add', name: '50' },
-]);
-
-
-// Tests for array methods, first on arrays and then on plain objects
-//
-// === ARRAYS ===
-//
-// Push
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-Array.observe(array, observer2.callback);
-array.push(3, 4);
-array.push(5);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '2', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '3', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 3 },
- { object: array, name: '4', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 4 },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: array, type: 'splice', index: 2, removed: [], addedCount: 2 },
- { object: array, type: 'splice', index: 4, removed: [], addedCount: 1 }
-]);
-
-// Pop
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-array.pop();
-array.pop();
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '1', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '0', type: 'delete', oldValue: 1 },
- { object: array, name: 'length', type: 'update', oldValue: 1 },
-]);
-
-// Shift
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-array.shift();
-array.shift();
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '0', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '0', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 1 },
-]);
-
-// Unshift
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-array.unshift(3, 4);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '3', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'add' },
- { object: array, name: '0', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'update', oldValue: 2 },
-]);
-
-// Splice
-reset();
-var array = [1, 2, 3];
-Object.observe(array, observer.callback);
-array.splice(1, 1, 4, 5);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '3', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 3 },
- { object: array, name: '1', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'update', oldValue: 3 },
-]);
-
-// Sort
-reset();
-var array = [3, 2, 1];
-Object.observe(array, observer.callback);
-array.sort();
-assertEquals(1, array[0]);
-assertEquals(2, array[1]);
-assertEquals(3, array[2]);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '1', type: 'update', oldValue: 2 },
- { object: array, name: '0', type: 'update', oldValue: 3 },
- { object: array, name: '2', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'update', oldValue: 3 },
- { object: array, name: '0', type: 'update', oldValue: 2 },
-]);
-
-// Splice emitted after Array mutation methods
-function MockArray(initial, observer) {
- for (var i = 0; i < initial.length; i++)
- this[i] = initial[i];
-
- this.length_ = initial.length;
- this.observer = observer;
-}
-MockArray.prototype = {
- set length(length) {
- Object.getNotifier(this).notify({ type: 'lengthChange' });
- this.length_ = length;
- Object.observe(this, this.observer.callback, ['splice']);
- },
- get length() {
- return this.length_;
- }
-}
-
-reset();
-var array = new MockArray([], observer);
-Object.observe(array, observer.callback, ['lengthChange']);
-Array.prototype.push.call(array, 1);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, type: 'lengthChange' },
- { object: array, type: 'splice', index: 0, removed: [], addedCount: 1 },
-]);
-
-reset();
-var array = new MockArray([1], observer);
-Object.observe(array, observer.callback, ['lengthChange']);
-Array.prototype.pop.call(array);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, type: 'lengthChange' },
- { object: array, type: 'splice', index: 0, removed: [1], addedCount: 0 },
-]);
-
-reset();
-var array = new MockArray([1], observer);
-Object.observe(array, observer.callback, ['lengthChange']);
-Array.prototype.shift.call(array);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, type: 'lengthChange' },
- { object: array, type: 'splice', index: 0, removed: [1], addedCount: 0 },
-]);
-
-reset();
-var array = new MockArray([], observer);
-Object.observe(array, observer.callback, ['lengthChange']);
-Array.prototype.unshift.call(array, 1);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, type: 'lengthChange' },
- { object: array, type: 'splice', index: 0, removed: [], addedCount: 1 },
-]);
-
-reset();
-var array = new MockArray([0, 1, 2], observer);
-Object.observe(array, observer.callback, ['lengthChange']);
-Array.prototype.splice.call(array, 1, 1);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, type: 'lengthChange' },
- { object: array, type: 'splice', index: 1, removed: [1], addedCount: 0 },
-]);
-
-//
-// === PLAIN OBJECTS ===
-//
-// Push
-reset()
-var array = {0: 1, 1: 2, length: 2}
-Object.observe(array, observer.callback);
-Array.prototype.push.call(array, 3, 4);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '2', type: 'add' },
- { object: array, name: '3', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
-]);
-
-// Pop
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-Array.observe(array, observer2.callback);
-array.pop();
-array.pop();
-array.pop();
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '1', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '0', type: 'delete', oldValue: 1 },
- { object: array, name: 'length', type: 'update', oldValue: 1 },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: array, type: 'splice', index: 1, removed: [2], addedCount: 0 },
- { object: array, type: 'splice', index: 0, removed: [1], addedCount: 0 }
-]);
-
-// Shift
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-Array.observe(array, observer2.callback);
-array.shift();
-array.shift();
-array.shift();
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '0', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '0', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 1 },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: array, type: 'splice', index: 0, removed: [1], addedCount: 0 },
- { object: array, type: 'splice', index: 0, removed: [2], addedCount: 0 }
-]);
-
-// Unshift
-reset();
-var array = [1, 2];
-Object.observe(array, observer.callback);
-Array.observe(array, observer2.callback);
-array.unshift(3, 4);
-array.unshift(5);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '3', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'add' },
- { object: array, name: '0', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'update', oldValue: 2 },
- { object: array, name: '4', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 4 },
- { object: array, name: '3', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'update', oldValue: 4 },
- { object: array, name: '0', type: 'update', oldValue: 3 },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: array, type: 'splice', index: 0, removed: [], addedCount: 2 },
- { object: array, type: 'splice', index: 0, removed: [], addedCount: 1 }
-]);
-
-// Splice
-reset();
-var array = [1, 2, 3];
-Object.observe(array, observer.callback);
-Array.observe(array, observer2.callback);
-array.splice(1, 0, 4, 5); // 1 4 5 2 3
-array.splice(0, 2); // 5 2 3
-array.splice(1, 2, 6, 7); // 5 6 7
-array.splice(2, 0);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '4', type: 'add' },
- { object: array, name: 'length', type: 'update', oldValue: 3 },
- { object: array, name: '3', type: 'add' },
- { object: array, name: '1', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'update', oldValue: 3 },
-
- { object: array, name: '0', type: 'update', oldValue: 1 },
- { object: array, name: '1', type: 'update', oldValue: 4 },
- { object: array, name: '2', type: 'update', oldValue: 5 },
- { object: array, name: '4', type: 'delete', oldValue: 3 },
- { object: array, name: '3', type: 'delete', oldValue: 2 },
- { object: array, name: 'length', type: 'update', oldValue: 5 },
-
- { object: array, name: '1', type: 'update', oldValue: 2 },
- { object: array, name: '2', type: 'update', oldValue: 3 },
-]);
-Object.deliverChangeRecords(observer2.callback);
-observer2.assertCallbackRecords([
- { object: array, type: 'splice', index: 1, removed: [], addedCount: 2 },
- { object: array, type: 'splice', index: 0, removed: [1, 4], addedCount: 0 },
- { object: array, type: 'splice', index: 1, removed: [2, 3], addedCount: 2 },
-]);
-
-// Exercise StoreIC_ArrayLength
-reset();
-var dummy = {};
-Object.observe(dummy, observer.callback);
-Object.unobserve(dummy, observer.callback);
-var array = [0];
-Object.observe(array, observer.callback);
-array.splice(0, 1);
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: array, name: '0', type: 'delete', oldValue: 0 },
- { object: array, name: 'length', type: 'update', oldValue: 1},
-]);
-
-
-// __proto__
-reset();
-var obj = {};
-Object.observe(obj, observer.callback);
-var p = {foo: 'yes'};
-var q = {bar: 'no'};
-obj.__proto__ = p;
-obj.__proto__ = p; // ignored
-obj.__proto__ = null;
-obj.__proto__ = q; // the __proto__ accessor is gone
-// TODO(adamk): Add tests for objects with hidden prototypes
-// once we support observing the global object.
-Object.deliverChangeRecords(observer.callback);
-observer.assertCallbackRecords([
- { object: obj, name: '__proto__', type: 'setPrototype',
- oldValue: Object.prototype },
- { object: obj, name: '__proto__', type: 'setPrototype', oldValue: p },
- { object: obj, name: '__proto__', type: 'add' },
-]);
-
-
-// Function.prototype
-reset();
-var fun = function(){};
-Object.observe(fun, observer.callback);
-var myproto = {foo: 'bar'};
-fun.prototype = myproto;
-fun.prototype = 7;
-fun.prototype = 7; // ignored
-Object.defineProperty(fun, 'prototype', {value: 8});
-Object.deliverChangeRecords(observer.callback);
-observer.assertRecordCount(3);
-// Manually examine the first record in order to test
-// lazy creation of oldValue
-assertSame(fun, observer.records[0].object);
-assertEquals('prototype', observer.records[0].name);
-assertEquals('update', observer.records[0].type);
-// The only existing reference to the oldValue object is in this
-// record, so to test that lazy creation happened correctly
-// we compare its constructor to our function (one of the invariants
-// ensured when creating an object via AllocateFunctionPrototype).
-assertSame(fun, observer.records[0].oldValue.constructor);
-observer.records.splice(0, 1);
-observer.assertCallbackRecords([
- { object: fun, name: 'prototype', type: 'update', oldValue: myproto },
- { object: fun, name: 'prototype', type: 'update', oldValue: 7 },
-]);
-
-// Function.prototype should not be observable except on the object itself
-reset();
-var fun = function(){};
-var obj = { __proto__: fun };
-Object.observe(obj, observer.callback);
-obj.prototype = 7;
-Object.deliverChangeRecords(observer.callback);
-observer.assertRecordCount(1);
-observer.assertCallbackRecords([
- { object: obj, name: 'prototype', type: 'add' },
-]);
-
-// Check that changes in observation status are detected in all IC states and
-// in optimized code, especially in cases usually using fast elements.
-var mutation = [
- "a[i] = v",
- "a[i] ? ++a[i] : a[i] = v",
- "a[i] ? a[i]++ : a[i] = v",
- "a[i] ? a[i] += 1 : a[i] = v",
- "a[i] ? a[i] -= -1 : a[i] = v",
-];
-
-var props = [1, "1", "a"];
-
-function TestFastElements(prop, mutation, prepopulate, polymorphic, optimize) {
- var setElement = eval(
- "(function setElement(a, i, v) { " + mutation + "; " +
- "/* " + [].join.call(arguments, " ") + " */" +
- "})"
- );
- print("TestFastElements:", setElement);
-
- var arr = prepopulate ? [1, 2, 3, 4, 5] : [0];
- if (prepopulate) arr[prop] = 2; // for non-element case
- setElement(arr, prop, 3);
- setElement(arr, prop, 4);
- if (polymorphic) setElement(["M", "i", "l", "n", "e", "r"], 0, "m");
- if (optimize) %OptimizeFunctionOnNextCall(setElement);
- setElement(arr, prop, 5);
-
- reset();
- Object.observe(arr, observer.callback);
- setElement(arr, prop, 989898);
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: arr, name: "" + prop, type: 'update', oldValue: 5 }
- ]);
-}
-
-for (var b1 = 0; b1 < 2; ++b1)
- for (var b2 = 0; b2 < 2; ++b2)
- for (var b3 = 0; b3 < 2; ++b3)
- for (var i in props)
- for (var j in mutation)
- TestFastElements(props[i], mutation[j], b1 != 0, b2 != 0, b3 != 0);
-
-
-var mutation = [
- "a.length = v",
- "a.length += newSize - oldSize",
- "a.length -= oldSize - newSize",
-];
-
-var mutationByIncr = [
- "++a.length",
- "a.length++",
-];
-
-function TestFastElementsLength(
- mutation, polymorphic, optimize, oldSize, newSize) {
- var setLength = eval(
- "(function setLength(a, v) { " + mutation + "; " +
- "/* " + [].join.call(arguments, " ") + " */"
- + "})"
- );
- print("TestFastElementsLength:", setLength);
-
- function array(n) {
- var arr = new Array(n);
- for (var i = 0; i < n; ++i) arr[i] = i;
- return arr;
- }
-
- setLength(array(oldSize), newSize);
- setLength(array(oldSize), newSize);
- if (polymorphic) setLength(array(oldSize).map(isNaN), newSize);
- if (optimize) %OptimizeFunctionOnNextCall(setLength);
- setLength(array(oldSize), newSize);
-
- reset();
- var arr = array(oldSize);
- Object.observe(arr, observer.callback);
- setLength(arr, newSize);
- Object.deliverChangeRecords(observer.callback);
- if (oldSize === newSize) {
- observer.assertNotCalled();
- } else {
- var count = oldSize > newSize ? oldSize - newSize : 0;
- observer.assertRecordCount(count + 1);
- var lengthRecord = observer.records[count];
- assertSame(arr, lengthRecord.object);
- assertEquals('length', lengthRecord.name);
- assertEquals('update', lengthRecord.type);
- assertSame(oldSize, lengthRecord.oldValue);
- }
-}
-
-for (var b1 = 0; b1 < 2; ++b1)
- for (var b2 = 0; b2 < 2; ++b2)
- for (var n1 = 0; n1 < 3; ++n1)
- for (var n2 = 0; n2 < 3; ++n2)
- for (var i in mutation)
- TestFastElementsLength(mutation[i], b1 != 0, b2 != 0, 20*n1, 20*n2);
-
-for (var b1 = 0; b1 < 2; ++b1)
- for (var b2 = 0; b2 < 2; ++b2)
- for (var n = 0; n < 3; ++n)
- for (var i in mutationByIncr)
- TestFastElementsLength(mutationByIncr[i], b1 != 0, b2 != 0, 7*n, 7*n+1);
-
-
-(function TestFunctionName() {
- reset();
-
- function fun() {}
- Object.observe(fun, observer.callback);
- fun.name = 'x'; // No change. Not writable.
- Object.defineProperty(fun, 'name', {value: 'a'});
- Object.defineProperty(fun, 'name', {writable: true});
- fun.name = 'b';
- delete fun.name;
- fun.name = 'x'; // No change. Function.prototype.name is non writable
- Object.defineProperty(Function.prototype, 'name', {writable: true});
- fun.name = 'c';
- fun.name = 'c'; // Same, no update.
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: fun, type: 'update', name: 'name', oldValue: 'fun' },
- { object: fun, type: 'reconfigure', name: 'name'},
- { object: fun, type: 'update', name: 'name', oldValue: 'a' },
- { object: fun, type: 'delete', name: 'name', oldValue: 'b' },
- { object: fun, type: 'add', name: 'name' },
- ]);
-})();
-
-
-(function TestFunctionLength() {
- reset();
-
- function fun(x) {}
- Object.observe(fun, observer.callback);
- fun.length = 'x'; // No change. Not writable.
- Object.defineProperty(fun, 'length', {value: 'a'});
- Object.defineProperty(fun, 'length', {writable: true});
- fun.length = 'b';
- delete fun.length;
- fun.length = 'x'; // No change. Function.prototype.length is non writable
- Object.defineProperty(Function.prototype, 'length', {writable: true});
- fun.length = 'c';
- fun.length = 'c'; // Same, no update.
- Object.deliverChangeRecords(observer.callback);
- observer.assertCallbackRecords([
- { object: fun, type: 'update', name: 'length', oldValue: 1 },
- { object: fun, type: 'reconfigure', name: 'length'},
- { object: fun, type: 'update', name: 'length', oldValue: 'a' },
- { object: fun, type: 'delete', name: 'length', oldValue: 'b' },
- { object: fun, type: 'add', name: 'length' },
- ]);
-})();
-
-
-(function TestObserveInvalidAcceptMessage() {
- var ex;
- try {
- Object.observe({}, function(){}, "not an object");
- } catch (e) {
- ex = e;
- }
- assertInstanceof(ex, TypeError);
- assertEquals("Third argument to Object.observe must be an array of strings.",
- ex.message);
-})()
diff --git a/test/mjsunit/es7/regress/regress-443982.js b/test/mjsunit/es7/regress/regress-443982.js
deleted file mode 100644
index e04f14c..0000000
--- a/test/mjsunit/es7/regress/regress-443982.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --harmony-object-observe
-
-var records;
-function observer(r) {
- records = r;
-}
-
-Object.defineProperty(Array.prototype, '0', {
- get: function() { return 0; },
- set: function() { throw "boom!"; }
-});
-arr = [1, 2];
-Array.observe(arr, observer);
-arr.length = 0;
-assertEquals(0, arr.length);
-
-Object.deliverChangeRecords(observer);
-assertEquals(1, records.length);
-assertEquals('splice', records[0].type);
-assertArrayEquals([1, 2], records[0].removed);
diff --git a/test/mjsunit/es8/syntactic-tail-call-parsing-sloppy.js b/test/mjsunit/es8/syntactic-tail-call-parsing-sloppy.js
new file mode 100644
index 0000000..d026086
--- /dev/null
+++ b/test/mjsunit/es8/syntactic-tail-call-parsing-sloppy.js
@@ -0,0 +1,410 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-explicit-tailcalls
+// Flags: --harmony-do-expressions
+
+var SyntaxErrorTests = [
+ { msg: "Unexpected expression inside tail call",
+ tests: [
+ { src: `()=>{ return continue foo ; }`,
+ err: ` ^^^`,
+ },
+ { src: `()=>{ return continue 42 ; }`,
+ err: ` ^^`,
+ },
+ { src: `()=>{ return continue new foo () ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ loop: return continue loop ; }`,
+ err: ` ^^^^`,
+ },
+ { src: `class A { foo() { return continue super.x ; } }`,
+ err: ` ^^^^^^^`,
+ },
+ { src: `()=>{ return continue this ; }`,
+ err: ` ^^^^`,
+ },
+ { src: `()=>{ return continue class A {} ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue class A extends B {} ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue function A() { } ; }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue { a: b, c: d} ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue function* Gen() { yield 1; } ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `function A() { return continue new.target ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue () ; }`,
+ err: ` ^^`,
+ },
+ { src: `()=>{ return continue ( 42 ) ; }`,
+ err: ` ^^^^^^`,
+ },
+ { src: "()=>{ return continue `123 ${foo} 34lk` ; }",
+ err: ` ^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue do { x ? foo() : bar() ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expression is not allowed here",
+ tests: [
+ { src: `class A {}; class B extends A { constructor() { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `class A extends continue f () {}; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expressions are not allowed in non-strict mode",
+ tests: [
+ { src: `()=>{ return continue continue continue b() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue ( continue b() ) ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() - a ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b + continue f() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return 1, 2, 3, continue f() , 4 ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ var x = continue f ( ) ; }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f () ? 1 : 2 ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return (1, 2, 3, continue f()), 4; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, continue f() ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, ... continue f() ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, continue f(), 3 ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: "()=>{ return `123 ${a} ${ continue foo ( ) } 34lk` ; }",
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return g( 1, 2, continue f() ); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() || a; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || b || c || continue f() || d; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && b && c && continue f() && d; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && b || c && continue f() ? d : e; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a ? b : c && continue f() && d || e; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue foo() instanceof bar ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return bar instanceof continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue foo() in bar ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return bar in continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ function* G() { yield continue foo(); } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (1, 2, 3, continue f() ) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (... continue f()) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (a, b, c, ... continue f() ) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a <= continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b > continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a << continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b >> continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return c >>> continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() = a ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a = continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a += continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a ** continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return delete continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ typeof continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return ~ continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return void continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return !continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return -continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return +continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return ++ continue f( ) ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() ++; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() --; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return (continue foo()) () ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = continue foo(); i < 10; i++) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = 0; i < continue foo(); i++) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = 0; i < 10; continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ if (continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ while (continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ do { smth; } while (continue foo()) ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ throw continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ switch (continue foo()) { case 1: break; } ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ with (continue foo()) { smth; } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ let x = continue foo() }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ const c = continue foo() }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { return continue f ( ) ; } catch(e) {} }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { try { smth; } catch(e) { return continue f( ) ; } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { try { smth; } catch(e) { return continue f( ) ; } } finally { bla; } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { smth; } catch(e) { return continue f ( ) ; } finally { blah; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { smth; } catch(e) { try { smth; } catch (e) { return continue f ( ) ; } } finally { blah; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var v in {a:0}) { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var v of [1, 2, 3]) { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue a.b.c.foo () ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue a().b.c().d.foo () ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue foo (1)(2)(3, 4) ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return ( continue b() ) ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: "()=>{ return continue bar`ab cd ef` ; }",
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: "()=>{ return continue bar`ab ${cd} ef` ; }",
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a , continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ function* G() { return continue foo(); } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ function B() { return continue new.target() ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue do { x ? foo() : bar() ; }() }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue (do { x ? foo() : bar() ; })() }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return do { 1, continue foo() } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return do { x ? continue foo() : y } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || (b && continue c()); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && (b || continue c()); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || (b ? c : continue d()); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return 1, 2, 3, a || (b ? c : continue d()); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=> continue (foo ()) ;`,
+ err: ` ^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=> a || continue foo () ;`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=> a && continue foo () ;`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=> a ? continue foo () : b;`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Undefined label 'foo'",
+ tests: [
+ { src: `()=>{ continue foo () ; }`,
+ err: ` ^^^`,
+ },
+ ],
+ },
+];
+
+
+// Should parse successfully.
+var NoErrorTests = [
+ `()=>{ class A { foo() { return continue super.f() ; } } }`,
+ `()=>{ class A { foo() { return continue f() ; } } }`,
+ `()=>{ class A { foo() { return a || continue f() ; } } }`,
+ `()=>{ class A { foo() { return b && continue f() ; } } }`,
+];
+
+
+(function() {
+ for (var test_set of SyntaxErrorTests) {
+ var expected_message = "SyntaxError: " + test_set.msg;
+ for (var test of test_set.tests) {
+ var passed = true;
+ var e = null;
+ try {
+ Realm.eval(0, test.src);
+ } catch (ee) {
+ e = ee;
+ }
+ print("=======================================");
+ print("Expected | " + expected_message);
+ print("Source | " + test.src);
+ print(" | " + test.err);
+
+ if (e === null) {
+ print("FAILED");
+ throw new Error("SyntaxError was not thrown");
+ }
+
+ var details = %GetExceptionDetails(e);
+ if (details.start_pos == undefined ||
+ details.end_pos == undefined) {
+ throw new Error("Bad message object returned");
+ }
+ var underline = " ".repeat(details.start_pos) +
+ "^".repeat(details.end_pos - details.start_pos);
+ var passed = expected_message === e.toString() &&
+ test.err === underline;
+
+ if (passed) {
+ print("PASSED");
+ print();
+ } else {
+ print("---------------------------------------");
+ print("Actual | " + e);
+ print("Source | " + test.src);
+ print(" | " + underline);
+ print("FAILED");
+ throw new Error("Test failed");
+ }
+ }
+ }
+})();
+
+
+(function() {
+ for (var src of NoErrorTests) {
+ print("=======================================");
+ print("Source | " + src);
+ Realm.eval(0, src);
+ print("PASSED");
+ print();
+ }
+})();
diff --git a/test/mjsunit/es8/syntactic-tail-call-parsing.js b/test/mjsunit/es8/syntactic-tail-call-parsing.js
new file mode 100644
index 0000000..9ceff9c
--- /dev/null
+++ b/test/mjsunit/es8/syntactic-tail-call-parsing.js
@@ -0,0 +1,388 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-explicit-tailcalls
+// Flags: --harmony-do-expressions
+"use strict";
+
+var SyntaxErrorTests = [
+ { msg: "Unexpected expression inside tail call",
+ tests: [
+ { src: `()=>{ return continue foo ; }`,
+ err: ` ^^^`,
+ },
+ { src: `()=>{ return continue 42 ; }`,
+ err: ` ^^`,
+ },
+ { src: `()=>{ return continue new foo () ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ loop: return continue loop ; }`,
+ err: ` ^^^^`,
+ },
+ { src: `class A { foo() { return continue super.x ; } }`,
+ err: ` ^^^^^^^`,
+ },
+ { src: `()=>{ return continue this ; }`,
+ err: ` ^^^^`,
+ },
+ { src: `()=>{ return continue class A {} ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue class A extends B {} ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue function A() { } ; }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue { a: b, c: d} ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue function* Gen() { yield 1; } ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `function A() { return continue new.target ; }`,
+ err: ` ^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue () ; }`,
+ err: ` ^^`,
+ },
+ { src: `()=>{ return continue ( 42 ) ; }`,
+ err: ` ^^^^^^`,
+ },
+ { src: "()=>{ return continue `123 ${foo} 34lk` ; }",
+ err: ` ^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue do { x ? foo() : bar() ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expression is not allowed here",
+ tests: [
+ { src: `()=>{ return continue continue continue b() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue ( continue b() ) ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() - a ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b + continue f() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return 1, 2, 3, continue f() , 4 ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ var x = continue f ( ) ; }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f () ? 1 : 2 ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return (1, 2, 3, continue f()), 4; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, continue f() ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, ... continue f() ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return [1, 2, continue f(), 3 ] ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: "()=>{ return `123 ${a} ${ continue foo ( ) } 34lk` ; }",
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return g( 1, 2, continue f() ); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() || a; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || b || c || continue f() || d; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && b && c && continue f() && d; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a && b || c && continue f() ? d : e; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a ? b : c && continue f() && d || e; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue foo() instanceof bar ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return bar instanceof continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue foo() in bar ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return bar in continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ function* G() { yield continue foo(); } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (1, 2, 3, continue f() ) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (... continue f()) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ (a, b, c, ... continue f() ) => {} }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a <= continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b > continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a << continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return b >> continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return c >>> continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() = a ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a = continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a += continue f(); }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a ** continue f() ; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return delete continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ typeof continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return ~ continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return void continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return !continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return -continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return +continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return ++ continue f( ) ; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() ++; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return continue f() --; }`,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return (continue foo()) () ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = continue foo(); i < 10; i++) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = 0; i < continue foo(); i++) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var i = 0; i < 10; continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ if (continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ while (continue foo()) bar(); }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ do { smth; } while (continue foo()) ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ throw continue foo() ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ switch (continue foo()) { case 1: break; } ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ let x = continue foo() }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ const c = continue foo() }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `class A {}; class B extends A { constructor() { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^`,
+ },
+ { src: `class A extends continue f () {}; }`,
+ err: ` ^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expression in try block",
+ tests: [
+ { src: `()=>{ try { return continue f ( ) ; } catch(e) {} }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { try { smth; } catch(e) { return continue f( ) ; } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { try { smth; } catch(e) { return continue f( ) ; } } finally { bla; } }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expression in catch block when finally block is also present",
+ tests: [
+ { src: `()=>{ try { smth; } catch(e) { return continue f ( ) ; } finally { blah; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ try { smth; } catch(e) { try { smth; } catch (e) { return continue f ( ) ; } } finally { blah; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call expression in for-in/of body",
+ tests: [
+ { src: `()=>{ for (var v in {a:0}) { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ for (var v of [1, 2, 3]) { return continue foo () ; } }`,
+ err: ` ^^^^^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Tail call of a direct eval is not allowed",
+ tests: [
+ { src: `()=>{ return continue eval(" foo () " ) ; }`,
+ err: ` ^^^^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a || continue eval("", 1, 2) ; }`,
+ err: ` ^^^^^^^^^^^^^^`,
+ },
+ { src: `()=>{ return a, continue eval ( ) ; }`,
+ err: ` ^^^^^^^^^`,
+ },
+ { src: `()=> a, continue eval ( ) ; `,
+ err: ` ^^^^^^^^^`,
+ },
+ { src: `()=> a || continue eval (' ' ) ; `,
+ err: ` ^^^^^^^^^^^^`,
+ },
+ ],
+ },
+ { msg: "Undefined label 'foo'",
+ tests: [
+ { src: `()=>{ continue foo () ; }`,
+ err: ` ^^^`,
+ },
+ ],
+ },
+];
+
+
+// Should parse successfully.
+var NoErrorTests = [
+ `()=>{ return continue a.b.c.foo () ; }`,
+ `()=>{ return continue a().b.c().d.foo () ; }`,
+ `()=>{ return continue foo (1)(2)(3, 4) ; }`,
+ `()=>{ return continue (0, eval)(); }`,
+ `()=>{ return ( continue b() ) ; }`,
+ "()=>{ return continue bar`ab cd ef` ; }",
+ "()=>{ return continue bar`ab ${cd} ef` ; }",
+ `()=>{ return a || continue f() ; }`,
+ `()=>{ return a && continue f() ; }`,
+ `()=>{ return a , continue f() ; }`,
+ `()=>{ function* G() { return continue foo(); } }`,
+ `()=>{ class A { foo() { return continue super.f() ; } } }`,
+ `()=>{ function B() { return continue new.target() ; } }`,
+ `()=>{ return continue do { x ? foo() : bar() ; }() }`,
+ `()=>{ return continue (do { x ? foo() : bar() ; })() }`,
+ `()=>{ return do { 1, continue foo() } }`,
+ `()=>{ return do { x ? continue foo() : y } }`,
+ `()=>{ return a || (b && continue c()); }`,
+ `()=>{ return a && (b || continue c()); }`,
+ `()=>{ return a || (b ? c : continue d()); }`,
+ `()=>{ return 1, 2, 3, a || (b ? c : continue d()); }`,
+ `()=> continue (foo ()) ;`,
+ `()=> a || continue foo () ;`,
+ `()=> a && continue foo () ;`,
+ `()=> a ? continue foo () : b;`,
+];
+
+
+(function() {
+ for (var test_set of SyntaxErrorTests) {
+ var expected_message = "SyntaxError: " + test_set.msg;
+ for (var test of test_set.tests) {
+ var passed = true;
+ var e = null;
+ try {
+ eval(test.src);
+ } catch (ee) {
+ e = ee;
+ }
+ print("=======================================");
+ print("Expected | " + expected_message);
+ print("Source | " + test.src);
+ print(" | " + test.err);
+
+ if (e === null) {
+ print("FAILED");
+ throw new Error("SyntaxError was not thrown");
+ }
+
+ var details = %GetExceptionDetails(e);
+ if (details.start_pos == undefined ||
+ details.end_pos == undefined) {
+ throw new Error("Bad message object returned");
+ }
+ var underline = " ".repeat(details.start_pos) +
+ "^".repeat(details.end_pos - details.start_pos);
+ var passed = expected_message === e.toString() &&
+ test.err === underline;
+
+ if (passed) {
+ print("PASSED");
+ print();
+ } else {
+ print("---------------------------------------");
+ print("Actual | " + e);
+ print("Source | " + test.src);
+ print(" | " + underline);
+ print("FAILED");
+ throw new Error("Test failed");
+ }
+ }
+ }
+})();
+
+
+(function() {
+ for (var src of NoErrorTests) {
+ print("=======================================");
+ print("Source | " + src);
+ src = `"use strict"; ` + src;
+ Realm.eval(0, src);
+ print("PASSED");
+ print();
+ }
+})();
diff --git a/test/mjsunit/es8/syntactic-tail-call-simple.js b/test/mjsunit/es8/syntactic-tail-call-simple.js
new file mode 100644
index 0000000..ec7ade6
--- /dev/null
+++ b/test/mjsunit/es8/syntactic-tail-call-simple.js
@@ -0,0 +1,143 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-explicit-tailcalls --stack-size=100
+
+//
+// Tail calls work only in strict mode.
+//
+(function() {
+ function f(n) {
+ if (n <= 0) {
+ return "foo";
+ }
+ return f(n - 1);
+ }
+ assertThrows(()=>{ f(1e5) });
+ %OptimizeFunctionOnNextCall(f);
+ assertThrows(()=>{ f(1e5) });
+})();
+
+
+//
+// Tail call normal functions.
+//
+(function() {
+ "use strict";
+ function f(n) {
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue f(n - 1);
+ }
+ assertEquals("foo", f(1e5));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+})();
+
+
+(function() {
+ "use strict";
+ function f(n) {
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue f(n - 1, 42); // Call with arguments adaptor.
+ }
+ assertEquals("foo", f(1e5));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+})();
+
+
+(function() {
+ "use strict";
+ function f(n){
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue g(n - 1);
+ }
+ function g(n){
+ if (n <= 0) {
+ return "bar";
+ }
+ return continue f(n - 1);
+ }
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+})();
+
+
+(function() {
+ "use strict";
+ function f(n){
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue g(n - 1, 42); // Call with arguments adaptor.
+ }
+ function g(n){
+ if (n <= 0) {
+ return "bar";
+ }
+ return continue f(n - 1, 42); // Call with arguments adaptor.
+ }
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+})();
+
+
+//
+// Tail call bound functions.
+//
+(function() {
+ "use strict";
+ function f0(n) {
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue f_bound(n - 1);
+ }
+ var f_bound = f0.bind({});
+ function f(n) {
+ return continue f_bound(n);
+ }
+ assertEquals("foo", f(1e5));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+})();
+
+
+(function() {
+ "use strict";
+ function f0(n){
+ if (n <= 0) {
+ return "foo";
+ }
+ return continue g_bound(n - 1);
+ }
+ function g0(n){
+ if (n <= 0) {
+ return "bar";
+ }
+ return continue f_bound(n - 1);
+ }
+ var f_bound = f0.bind({});
+ var g_bound = g0.bind({});
+ function f(n) {
+ return continue f_bound(n);
+ }
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("foo", f(1e5));
+ assertEquals("bar", f(1e5 + 1));
+})();
diff --git a/test/mjsunit/es8/syntactic-tail-call.js b/test/mjsunit/es8/syntactic-tail-call.js
new file mode 100644
index 0000000..44936a4
--- /dev/null
+++ b/test/mjsunit/es8/syntactic-tail-call.js
@@ -0,0 +1,604 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-explicit-tailcalls
+// Flags: --harmony-do-expressions
+
+"use strict";
+
+Error.prepareStackTrace = (error,stack) => {
+ error.strace = stack;
+ return error.message + "\n at " + stack.join("\n at ");
+}
+
+
+function CheckStackTrace(expected) {
+ var e = new Error();
+ e.stack; // prepare stack trace
+ var stack = e.strace;
+ assertEquals("CheckStackTrace", stack[0].getFunctionName());
+ for (var i = 0; i < expected.length; i++) {
+ assertEquals(expected[i].name, stack[i + 1].getFunctionName());
+ }
+}
+%NeverOptimizeFunction(CheckStackTrace);
+
+
+function f(expected_call_stack, a, b) {
+ CheckStackTrace(expected_call_stack);
+ return a;
+}
+
+function f_153(expected_call_stack, a) {
+ CheckStackTrace(expected_call_stack);
+ return 153;
+}
+
+
+// Tail call when caller does not have an arguments adaptor frame.
+(function() {
+ // Caller and callee have same number of arguments.
+ function f1(a) {
+ CheckStackTrace([f1, test]);
+ return 10 + a;
+ }
+ function g1(a) { return continue f1(2); }
+
+ // Caller has more arguments than callee.
+ function f2(a) {
+ CheckStackTrace([f2, test]);
+ return 10 + a;
+ }
+ function g2(a, b, c) { return continue f2(2); }
+
+ // Caller has less arguments than callee.
+ function f3(a, b, c) {
+ CheckStackTrace([f3, test]);
+ return 10 + a + b + c;
+ }
+ function g3(a) { return continue f3(2, 3, 4); }
+
+ // Callee has arguments adaptor frame.
+ function f4(a, b, c) {
+ CheckStackTrace([f4, test]);
+ return 10 + a;
+ }
+ function g4(a) { return continue f4(2); }
+
+ function test() {
+ assertEquals(12, g1(1));
+ assertEquals(12, g2(1, 2, 3));
+ assertEquals(19, g3(1));
+ assertEquals(12, g4(1));
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail call when caller has an arguments adaptor frame.
+(function() {
+ // Caller and callee have same number of arguments.
+ function f1(a) {
+ CheckStackTrace([f1, test]);
+ return 10 + a;
+ }
+ function g1(a) { return continue f1(2); }
+
+ // Caller has more arguments than callee.
+ function f2(a) {
+ CheckStackTrace([f2, test]);
+ return 10 + a;
+ }
+ function g2(a, b, c) { return continue f2(2); }
+
+ // Caller has less arguments than callee.
+ function f3(a, b, c) {
+ CheckStackTrace([f3, test]);
+ return 10 + a + b + c;
+ }
+ function g3(a) { return continue f3(2, 3, 4); }
+
+ // Callee has arguments adaptor frame.
+ function f4(a, b, c) {
+ CheckStackTrace([f4, test]);
+ return 10 + a;
+ }
+ function g4(a) { return continue f4(2); }
+
+ function test() {
+ assertEquals(12, g1());
+ assertEquals(12, g2());
+ assertEquals(19, g3());
+ assertEquals(12, g4());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail call bound function when caller does not have an arguments
+// adaptor frame.
+(function() {
+ // Caller and callee have same number of arguments.
+ function f1(a) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f1, test]);
+ return 10 + a;
+ }
+ var b1 = f1.bind({a: 153});
+ function g1(a) { return continue b1(2); }
+
+ // Caller has more arguments than callee.
+ function f2(a) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f2, test]);
+ return 10 + a;
+ }
+ var b2 = f2.bind({a: 153});
+ function g2(a, b, c) { return continue b2(2); }
+
+ // Caller has less arguments than callee.
+ function f3(a, b, c) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f3, test]);
+ return 10 + a + b + c;
+ }
+ var b3 = f3.bind({a: 153});
+ function g3(a) { return continue b3(2, 3, 4); }
+
+ // Callee has arguments adaptor frame.
+ function f4(a, b, c) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f4, test]);
+ return 10 + a;
+ }
+ var b4 = f4.bind({a: 153});
+ function g4(a) { return continue b4(2); }
+
+ function test() {
+ assertEquals(12, g1(1));
+ assertEquals(12, g2(1, 2, 3));
+ assertEquals(19, g3(1));
+ assertEquals(12, g4(1));
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail call bound function when caller has an arguments adaptor frame.
+(function() {
+ // Caller and callee have same number of arguments.
+ function f1(a) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f1, test]);
+ return 10 + a;
+ }
+ var b1 = f1.bind({a: 153});
+ function g1(a) { return continue b1(2); }
+
+ // Caller has more arguments than callee.
+ function f2(a) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f2, test]);
+ return 10 + a;
+ }
+ var b2 = f2.bind({a: 153});
+ function g2(a, b, c) { return continue b2(2); }
+
+ // Caller has less arguments than callee.
+ function f3(a, b, c) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f3, test]);
+ return 10 + a + b + c;
+ }
+ var b3 = f3.bind({a: 153});
+ function g3(a) { return continue b3(2, 3, 4); }
+
+ // Callee has arguments adaptor frame.
+ function f4(a, b, c) {
+ assertEquals(153, this.a);
+ CheckStackTrace([f4, test]);
+ return 10 + a;
+ }
+ var b4 = f4.bind({a: 153});
+ function g4(a) { return continue b4(2); }
+
+ function test() {
+ assertEquals(12, g1());
+ assertEquals(12, g2());
+ assertEquals(19, g3());
+ assertEquals(12, g4());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail calling from getter.
+(function() {
+ function g(v) {
+ CheckStackTrace([g, test]);
+ %DeoptimizeFunction(test);
+ return 153;
+ }
+ %NeverOptimizeFunction(g);
+
+ function f(v) {
+ return continue g();
+ }
+ %SetForceInlineFlag(f);
+
+ function test() {
+ var o = {};
+ o.__defineGetter__('p', f);
+ assertEquals(153, o.p);
+ }
+
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail calling from setter.
+(function() {
+ function g() {
+ CheckStackTrace([g, test]);
+ %DeoptimizeFunction(test);
+ return 153;
+ }
+ %NeverOptimizeFunction(g);
+
+ function f(v) {
+ return continue g();
+ }
+ %SetForceInlineFlag(f);
+
+ function test() {
+ var o = {};
+ o.__defineSetter__('q', f);
+ assertEquals(1, o.q = 1);
+ }
+
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail calling from constructor.
+(function() {
+ function g(context) {
+ CheckStackTrace([g, test]);
+ %DeoptimizeFunction(test);
+ return {x: 153};
+ }
+ %NeverOptimizeFunction(g);
+
+ function A() {
+ this.x = 42;
+ return continue g();
+ }
+
+ function test() {
+ var o = new A();
+ %DebugPrint(o);
+ assertEquals(153, o.x);
+ }
+
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail calling via various expressions.
+(function() {
+ function g1(a) {
+ return f([f, g1, test], false) || continue f([f, test], true);
+ }
+
+ function g2(a) {
+ return f([f, g2, test], true) && continue f([f, test], true);
+ }
+
+ function g3(a) {
+ return f([f, g3, test], 13), continue f([f, test], 153);
+ }
+
+ function g4(a) {
+ return f([f, g4, test], false) ||
+ (f([f, g4, test], true) && continue f([f, test], true));
+ }
+
+ function g5(a) {
+ return f([f, g5, test], true) &&
+ (f([f, g5, test], false) || continue f([f, test], true));
+ }
+
+ function g6(a) {
+ return f([f, g6, test], 13), f([f, g6, test], 42),
+ continue f([f, test], 153);
+ }
+
+ function g7(a) {
+ return f([f, g7, test], false) ||
+ (f([f, g7, test], false) ? continue f([f, test], true)
+ : continue f([f, test], true));
+ }
+
+ function g8(a) {
+ return f([f, g8, test], false) || f([f, g8, test], true) &&
+ continue f([f, test], true);
+ }
+
+ function g9(a) {
+ return f([f, g9, test], true) && f([f, g9, test], false) ||
+ continue f([f, test], true);
+ }
+
+ function g10(a) {
+ return f([f, g10, test], true) && f([f, g10, test], false) ||
+ f([f, g10, test], true) ?
+ f([f, g10, test], true) && f([f, g10, test], false) ||
+ continue f([f, test], true) :
+ f([f, g10, test], true) && f([f, g10, test], false) ||
+ continue f([f, test], true);
+ }
+
+ function test() {
+ assertEquals(true, g1());
+ assertEquals(true, g2());
+ assertEquals(153, g3());
+ assertEquals(true, g4());
+ assertEquals(true, g5());
+ assertEquals(153, g6());
+ assertEquals(true, g7());
+ assertEquals(true, g8());
+ assertEquals(true, g9());
+ assertEquals(true, g10());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Tail calling from various statements.
+(function() {
+ function g3() {
+ for (var i = 0; i < 10; i++) {
+ return continue f_153([f_153, test]);
+ }
+ }
+
+ function g4() {
+ while (true) {
+ return continue f_153([f_153, test]);
+ }
+ }
+
+ function g5() {
+ do {
+ return continue f_153([f_153, test]);
+ } while (true);
+ }
+
+ function test() {
+ assertEquals(153, g3());
+ assertEquals(153, g4());
+ assertEquals(153, g5());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from try-catch constructs.
+(function() {
+ function tc1(a) {
+ try {
+ f_153([f_153, tc1, test]);
+ return f_153([f_153, tc1, test]);
+ } catch(e) {
+ f_153([f_153, tc1, test]);
+ }
+ }
+
+ function tc2(a) {
+ try {
+ f_153([f_153, tc2, test]);
+ throw new Error("boom");
+ } catch(e) {
+ f_153([f_153, tc2, test]);
+ return continue f_153([f_153, test]);
+ }
+ }
+
+ function tc3(a) {
+ try {
+ f_153([f_153, tc3, test]);
+ throw new Error("boom");
+ } catch(e) {
+ f_153([f_153, tc3, test]);
+ }
+ f_153([f_153, tc3, test]);
+ return continue f_153([f_153, test]);
+ }
+
+ function test() {
+ assertEquals(153, tc1());
+ assertEquals(153, tc2());
+ assertEquals(153, tc3());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from try-finally constructs.
+(function() {
+ function tf1(a) {
+ try {
+ f_153([f_153, tf1, test]);
+ return f_153([f_153, tf1, test]);
+ } finally {
+ f_153([f_153, tf1, test]);
+ }
+ }
+
+ function tf2(a) {
+ try {
+ f_153([f_153, tf2, test]);
+ throw new Error("boom");
+ } finally {
+ f_153([f_153, tf2, test]);
+ return continue f_153([f_153, test]);
+ }
+ }
+
+ function tf3(a) {
+ try {
+ f_153([f_153, tf3, test]);
+ } finally {
+ f_153([f_153, tf3, test]);
+ }
+ return continue f_153([f_153, test]);
+ }
+
+ function test() {
+ assertEquals(153, tf1());
+ assertEquals(153, tf2());
+ assertEquals(153, tf3());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from try-catch-finally constructs.
+(function() {
+ function tcf1(a) {
+ try {
+ f_153([f_153, tcf1, test]);
+ return f_153([f_153, tcf1, test]);
+ } catch(e) {
+ } finally {
+ f_153([f_153, tcf1, test]);
+ }
+ }
+
+ function tcf2(a) {
+ try {
+ f_153([f_153, tcf2, test]);
+ throw new Error("boom");
+ } catch(e) {
+ f_153([f_153, tcf2, test]);
+ return f_153([f_153, tcf2, test]);
+ } finally {
+ f_153([f_153, tcf2, test]);
+ }
+ }
+
+ function tcf3(a) {
+ try {
+ f_153([f_153, tcf3, test]);
+ throw new Error("boom");
+ } catch(e) {
+ f_153([f_153, tcf3, test]);
+ } finally {
+ f_153([f_153, tcf3, test]);
+ return continue f_153([f_153, test]);
+ }
+ }
+
+ function tcf4(a) {
+ try {
+ f_153([f_153, tcf4, test]);
+ throw new Error("boom");
+ } catch(e) {
+ f_153([f_153, tcf4, test]);
+ } finally {
+ f_153([f_153, tcf4, test]);
+ }
+ return continue f_153([f_153, test]);
+ }
+
+ function test() {
+ assertEquals(153, tcf1());
+ assertEquals(153, tcf2());
+ assertEquals(153, tcf3());
+ assertEquals(153, tcf4());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from arrow functions.
+(function () {
+ function g1(a) {
+ return continue (() => { return continue f_153([f_153, test]); })();
+ }
+
+ function g2(a) {
+ return continue (() => continue f_153([f_153, test]))();
+ }
+
+ function g3(a) {
+ var closure = () => f([f, closure, test], true)
+ ? continue f_153([f_153, test])
+ : continue f_153([f_153, test]);
+ return continue closure();
+ }
+
+ function test() {
+ assertEquals(153, g1());
+ assertEquals(153, g2());
+ assertEquals(153, g3());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
+
+
+// Test tail calls from do expressions.
+(function () {
+ function g1(a) {
+ var a = do { return continue f_153([f_153, test]); 42; };
+ return a;
+ }
+
+ function test() {
+ assertEquals(153, g1());
+ }
+ test();
+ test();
+ %OptimizeFunctionOnNextCall(test);
+ test();
+})();
diff --git a/test/mjsunit/eval-origin.js b/test/mjsunit/eval-origin.js
new file mode 100644
index 0000000..bb86ef3
--- /dev/null
+++ b/test/mjsunit/eval-origin.js
@@ -0,0 +1,39 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --nostress-opt
+
+Error.prepareStackTrace = function(exception, frames) {
+ return frames[0].getEvalOrigin();
+}
+
+var source = "new Error()";
+var eval_origin;
+var geval = eval;
+var log = [];
+
+(function() {
+ log.push([geval(source).stack, "17:13"]);
+ log.push([geval(source).stack, "18:13"]);
+ // log.push([geval(source).stack, "19:13"]); TODO(4921).
+})();
+
+(function() {
+ log.push([eval(source).stack, "23:13"]);
+ log.push([eval(source).stack, "24:13"]);
+ // log.push([eval(source).stack, "25:13"]); TODO(4921).
+})();
+
+log.push([eval(source).stack, "28:11"]);
+log.push([eval(source).stack, "29:11"]);
+// log.push([eval(source).stack, "30:11"]); TODO(4921).
+
+Error.prepareStackTrace = undefined;
+
+for (var item of log) {
+ var stacktraceline = item[0];
+ var expectation = item[1];
+ var re = new RegExp(`:${expectation}\\)$`);
+ assertTrue(re.test(stacktraceline));
+}
diff --git a/test/mjsunit/for-in.js b/test/mjsunit/for-in.js
index bece37a..547c748 100644
--- a/test/mjsunit/for-in.js
+++ b/test/mjsunit/for-in.js
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --noharmony-for-in
+
function props(x) {
var array = [];
for (var p in x) array.push(p);
diff --git a/test/mjsunit/harmony/array-concat-array-proto-getter.js b/test/mjsunit/harmony/array-concat-array-proto-getter.js
new file mode 100644
index 0000000..9368e7f
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-array-proto-getter.js
@@ -0,0 +1,53 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+
+"use strict"
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+var concatSpreadable = false;
+Object.defineProperty(Array.prototype, Symbol.isConcatSpreadable, {
+ get() { return concatSpreadable },
+ configurable: true
+});
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+concatSpreadable = true;
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals([object], [].concat(object));
+assertEquals([1, 2, 3, object], array.concat(object));
+assertEquals([object], Array.prototype.concat.call(object,[]));
+assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+
+delete Array.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/array-concat-array-proto.js b/test/mjsunit/harmony/array-concat-array-proto.js
new file mode 100644
index 0000000..520178f
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-array-proto.js
@@ -0,0 +1,48 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+
+"use strict"
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+Array.prototype[Symbol.isConcatSpreadable] = false;
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+Array.prototype[Symbol.isConcatSpreadable] = true;
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals([object], [].concat(object));
+assertEquals([1, 2, 3, object], array.concat(object));
+assertEquals([object], Array.prototype.concat.call(object,[]));
+assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+delete Array.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/array-concat-object-proto-dict-getter.js b/test/mjsunit/harmony/array-concat-object-proto-dict-getter.js
new file mode 100644
index 0000000..6e61588
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-object-proto-dict-getter.js
@@ -0,0 +1,57 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+// with a dictionary backing store.
+
+// Force Object.prototype into dictionary backing store by adding many
+// properties.
+for (var i = 0; i < 10*1000; i++) {
+ Object.prototype['generatedProperty'+i] = true;
+}
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+var concatSpreadable = false;
+Object.defineProperty(Object.prototype, Symbol.isConcatSpreadable, {
+ get() { return concatSpreadable },
+ configurable: true
+});
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+concatSpreadable = true;
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals(['a'], [].concat(object));
+assertEquals([1, 2, 3, 'a'], array.concat(object));
+assertEquals(['a'], Array.prototype.concat.call(object,[]));
+assertEquals(['a', 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals(['a', 'a'], Array.prototype.concat.call(object, object));
+
+delete Object.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/array-concat-object-proto-dict.js b/test/mjsunit/harmony/array-concat-object-proto-dict.js
new file mode 100644
index 0000000..c817006
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-object-proto-dict.js
@@ -0,0 +1,53 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+// with a dictionary backing store.
+
+// Force Object.prototype into dictionary backing store by adding many
+// properties.
+for (var i = 0; i < 10*1000; i++) {
+ Object.prototype['generatedProperty'+i] = true;
+}
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+Object.prototype[Symbol.isConcatSpreadable] = false;
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+Object.prototype[Symbol.isConcatSpreadable] = true;
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals(['a'], [].concat(object));
+assertEquals([1, 2, 3, 'a'], array.concat(object));
+assertEquals(['a'], Array.prototype.concat.call(object,[]));
+assertEquals(['a', 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals(['a', 'a'], Array.prototype.concat.call(object, object));
+
+delete Object.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/array-concat-object-proto-generic-dict.js b/test/mjsunit/harmony/array-concat-object-proto-generic-dict.js
new file mode 100644
index 0000000..7b61422
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-object-proto-generic-dict.js
@@ -0,0 +1,65 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+// with a dictionary backing store.
+
+// Force Object.prototype into dictionary backing store by adding many
+// properties.
+for (var i = 0; i < 10*1000; i++) {
+ Object.prototype['generatedProperty'+i] = true;
+}
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function SetProperty(receiver, key, value) {
+ receiver[key] = value;
+}
+
+// Force the Keyed Store IC in SetProperty to be generic.
+var receiver = {};
+for (var i = 0; i < 100; i++) {
+ SetProperty(receiver, 'prop'+i, 'value');
+}
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+// Use a generic IC to set @@isConcatSpreadable
+SetProperty(Object.prototype, Symbol.isConcatSpreadable, false);
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+// Use a generic IC to set @@isConcatSpreadable
+SetProperty(Object.prototype, Symbol.isConcatSpreadable, true);
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals(['a'], [].concat(object));
+assertEquals([1, 2, 3, 'a'], array.concat(object));
+assertEquals(['a'], Array.prototype.concat.call(object,[]));
+assertEquals(['a', 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals(['a', 'a'], Array.prototype.concat.call(object, object));
+
+delete Object.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/array-concat-object-proto.js b/test/mjsunit/harmony/array-concat-object-proto.js
new file mode 100644
index 0000000..307326c
--- /dev/null
+++ b/test/mjsunit/harmony/array-concat-object-proto.js
@@ -0,0 +1,48 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that @@isConcatSpreadable is checked when set on Object.prototype
+
+"use strict"
+
+var array = [1, 2, 3];
+var object = {length: 1, '0': 'a'};
+
+function testConcatDefaults() {
+ assertEquals(array, [].concat(array));
+ assertEquals(array, array.concat([]));
+ assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+ assertEquals([object], [].concat(object));
+ assertEquals([1, 2, 3, object], array.concat(object));
+ assertEquals([object], Array.prototype.concat.call(object,[]));
+ assertEquals([object, 1, 2, 3], Array.prototype.concat.call(object, array));
+ assertEquals([object, object], Array.prototype.concat.call(object, object));
+}
+
+testConcatDefaults();
+
+Object.prototype[Symbol.isConcatSpreadable] = false;
+
+assertEquals([[], array], [].concat(array));
+assertEquals([array, []], array.concat([]));
+assertEquals([array, array], array.concat(array));
+assertEquals([[], object], [].concat(object));
+assertEquals([array, object], array.concat(object));
+assertEquals([object, []], Array.prototype.concat.call(object,[]));
+assertEquals([object, array], Array.prototype.concat.call(object, array));
+assertEquals([object, object], Array.prototype.concat.call(object, object));
+
+Object.prototype[Symbol.isConcatSpreadable] = true;
+
+assertEquals(array, [].concat(array));
+assertEquals(array, array.concat([]));
+assertEquals([1, 2, 3, 1, 2, 3], array.concat(array));
+assertEquals(['a'], [].concat(object));
+assertEquals([1, 2, 3, 'a'], array.concat(object));
+assertEquals(['a'], Array.prototype.concat.call(object,[]));
+assertEquals(['a', 1, 2, 3], Array.prototype.concat.call(object, array));
+assertEquals(['a', 'a'], Array.prototype.concat.call(object, object));
+
+delete Object.prototype[Symbol.isConcatSpreadable];
+testConcatDefaults();
diff --git a/test/mjsunit/harmony/async-arrow-lexical-arguments.js b/test/mjsunit/harmony/async-arrow-lexical-arguments.js
new file mode 100644
index 0000000..44d38a4
--- /dev/null
+++ b/test/mjsunit/harmony/async-arrow-lexical-arguments.js
@@ -0,0 +1,42 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-async-await --allow-natives-syntax
+
+function assertEqualsAsync(expected, run, msg) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (hadError) throw actual;
+
+ assertTrue(
+ hadValue, "Expected '" + run.toString() + "' to produce a value");
+
+ assertEquals(expected, actual, msg);
+};
+
+assertEqualsAsync("[1,2,3]", () => (function() {
+ return (async () => JSON.stringify([...arguments]))();
+})(1, 2, 3));
+
+assertEqualsAsync("[4,5,6]",
+ () => (function() {
+ return (async () => {
+ return JSON.stringify([...await arguments]) })();
+ })(4, 5, 6));
diff --git a/test/mjsunit/harmony/async-arrow-lexical-new.target.js b/test/mjsunit/harmony/async-arrow-lexical-new.target.js
new file mode 100644
index 0000000..72b29e6
--- /dev/null
+++ b/test/mjsunit/harmony/async-arrow-lexical-new.target.js
@@ -0,0 +1,43 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-async-await --allow-natives-syntax
+
+function assertEqualsAsync(expected, run, msg) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (hadError) throw actual;
+
+ assertTrue(
+ hadValue, "Expected '" + run.toString() + "' to produce a value");
+
+ assertEquals(expected, actual, msg);
+};
+
+class BaseClass {
+ constructor() {
+ return async () => new.target;
+ }
+}
+
+class ChildClass extends BaseClass {}
+
+assertEqualsAsync(BaseClass, () => new BaseClass()());
+assertEqualsAsync(ChildClass, () => new ChildClass()());
diff --git a/test/mjsunit/harmony/async-arrow-lexical-super.js b/test/mjsunit/harmony/async-arrow-lexical-super.js
new file mode 100644
index 0000000..78f5d55
--- /dev/null
+++ b/test/mjsunit/harmony/async-arrow-lexical-super.js
@@ -0,0 +1,58 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-async-await --allow-natives-syntax
+
+function assertEqualsAsync(expected, run, msg) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (hadError) throw actual;
+
+ assertTrue(
+ hadValue, "Expected '" + run.toString() + "' to produce a value");
+
+ assertEquals(expected, actual, msg);
+};
+
+class BaseClass {
+ constructor(x) {
+ this.name_ = x;
+ }
+ get name() { return this.name_; }
+};
+
+class DeferredSuperCall extends BaseClass {
+ constructor(x) {
+ return async() => super(x);
+ }
+};
+
+assertEqualsAsync(
+ "LexicalSuperCall",
+ () => new DeferredSuperCall("LexicalSuperCall")().then(x => x.name));
+
+
+class DeferredSuperProperty extends BaseClass {
+ deferredName() { return async() => super.name; }
+};
+
+assertEqualsAsync(
+ "LexicalSuperProperty",
+ () => new DeferredSuperProperty("LexicalSuperProperty").deferredName()());
diff --git a/test/mjsunit/harmony/async-arrow-lexical-this.js b/test/mjsunit/harmony/async-arrow-lexical-this.js
new file mode 100644
index 0000000..182db47
--- /dev/null
+++ b/test/mjsunit/harmony/async-arrow-lexical-this.js
@@ -0,0 +1,48 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-async-await --allow-natives-syntax
+
+function assertEqualsAsync(expected, run, msg) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (hadError) throw actual;
+
+ assertTrue(
+ hadValue, "Expected '" + run.toString() + "' to produce a value");
+
+ assertEquals(expected, actual, msg);
+};
+
+var O = {
+ [Symbol.toStringTag]: "LexicalThis",
+ run(n) {
+ return async passFail => `${n}. ${passFail}: ${this}`;
+ },
+};
+
+assertEqualsAsync("1. PASS: [object LexicalThis]", () => O.run(1)("PASS"));
+
+var O2 = {
+ [Symbol.toStringTag]: "LexicalThis",
+ run: O.run(2)
+};
+
+assertEqualsAsync("2. PASS: [object LexicalThis]", () => O2.run("PASS"));
diff --git a/test/mjsunit/harmony/async-await-basic.js b/test/mjsunit/harmony/async-await-basic.js
new file mode 100644
index 0000000..d0888ea
--- /dev/null
+++ b/test/mjsunit/harmony/async-await-basic.js
@@ -0,0 +1,347 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-async-await --allow-natives-syntax
+
+// Do not install `AsyncFunction` constructor on global object
+
+function assertThrowsAsync(run, errorType, message) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (!hadError) {
+ throw new MjsUnitAssertionError(
+ "Expected " + run + "() to throw " + errorType.name +
+ ", but did not throw.");
+ }
+ if (!(actual instanceof errorType))
+ throw new MjsUnitAssertionError(
+ "Expected " + run + "() to throw " + errorType.name +
+ ", but threw '" + actual + "'");
+ if (message !== void 0 && actual.message !== message)
+ throw new MjsUnitAssertionError(
+ "Expected " + run + "() to throw '" + message + "', but threw '" +
+ actual.message + "'");
+};
+
+function assertEqualsAsync(expected, run, msg) {
+ var actual;
+ var hadValue = false;
+ var hadError = false;
+ var promise = run();
+
+ if (typeof promise !== "object" || typeof promise.then !== "function") {
+ throw new MjsUnitAssertionError(
+ "Expected " + run.toString() +
+ " to return a Promise, but it returned " + PrettyPrint(promise));
+ }
+
+ promise.then(function(value) { hadValue = true; actual = value; },
+ function(error) { hadError = true; actual = error; });
+
+ assertFalse(hadValue || hadError);
+
+ %RunMicrotasks();
+
+ if (hadError) throw actual;
+
+ assertTrue(
+ hadValue, "Expected '" + run.toString() + "' to produce a value");
+
+ assertEquals(expected, actual, msg);
+};
+
+assertEquals(undefined, this.AsyncFunction);
+let AsyncFunction = (async function() {}).constructor;
+
+// Let functionPrototype be the intrinsic object %AsyncFunctionPrototype%.
+async function asyncFunctionForProto() {}
+assertEquals(AsyncFunction.prototype,
+ Object.getPrototypeOf(asyncFunctionForProto));
+assertEquals(AsyncFunction.prototype,
+ Object.getPrototypeOf(async function() {}));
+assertEquals(AsyncFunction.prototype, Object.getPrototypeOf(async () => {}));
+assertEquals(AsyncFunction.prototype,
+ Object.getPrototypeOf({ async method() {} }.method));
+assertEquals(AsyncFunction.prototype, Object.getPrototypeOf(AsyncFunction()));
+assertEquals(AsyncFunction.prototype,
+ Object.getPrototypeOf(new AsyncFunction()));
+
+// AsyncFunctionCreate does not produce an object with a Prototype
+assertEquals(undefined, asyncFunctionForProto.prototype);
+assertEquals(false, asyncFunctionForProto.hasOwnProperty("prototype"));
+assertEquals(undefined, (async function() {}).prototype);
+assertEquals(false, (async function() {}).hasOwnProperty("prototype"));
+assertEquals(undefined, (async() => {}).prototype);
+assertEquals(false, (async() => {}).hasOwnProperty("prototype"));
+assertEquals(undefined, ({ async method() {} }).method.prototype);
+assertEquals(false, ({ async method() {} }).method.hasOwnProperty("prototype"));
+assertEquals(undefined, AsyncFunction().prototype);
+assertEquals(false, AsyncFunction().hasOwnProperty("prototype"));
+assertEquals(undefined, (new AsyncFunction()).prototype);
+assertEquals(false, (new AsyncFunction()).hasOwnProperty("prototype"));
+
+assertEquals(1, async function(a) { await 1; }.length);
+assertEquals(2, async function(a, b) { await 1; }.length);
+assertEquals(1, async function(a, b = 2) { await 1; }.length);
+assertEquals(2, async function(a, b, ...c) { await 1; }.length);
+
+assertEquals(1, (async(a) => await 1).length);
+assertEquals(2, (async(a, b) => await 1).length);
+assertEquals(1, (async(a, b = 2) => await 1).length);
+assertEquals(2, (async(a, b, ...c) => await 1).length);
+
+assertEquals(1, ({ async f(a) { await 1; } }).f.length);
+assertEquals(2, ({ async f(a, b) { await 1; } }).f.length);
+assertEquals(1, ({ async f(a, b = 2) { await 1; } }).f.length);
+assertEquals(2, ({ async f(a, b, ...c) { await 1; } }).f.length);
+
+assertEquals(1, AsyncFunction("a", "await 1").length);
+assertEquals(2, AsyncFunction("a", "b", "await 1").length);
+assertEquals(1, AsyncFunction("a", "b = 2", "await 1").length);
+assertEquals(2, AsyncFunction("a", "b", "...c", "await 1").length);
+
+assertEquals(1, (new AsyncFunction("a", "await 1")).length);
+assertEquals(2, (new AsyncFunction("a", "b", "await 1")).length);
+assertEquals(1, (new AsyncFunction("a", "b = 2", "await 1")).length);
+assertEquals(2, (new AsyncFunction("a", "b", "...c", "await 1")).length);
+
+// AsyncFunction.prototype[ @@toStringTag ]
+var descriptor =
+ Object.getOwnPropertyDescriptor(AsyncFunction.prototype,
+ Symbol.toStringTag);
+assertEquals("AsyncFunction", descriptor.value);
+assertEquals(false, descriptor.enumerable);
+assertEquals(false, descriptor.writable);
+assertEquals(true, descriptor.configurable);
+
+assertEquals(1, AsyncFunction.length);
+
+// Let F be ! FunctionAllocate(functionPrototype, Strict, "non-constructor")
+async function asyncNonConstructorDecl() {}
+assertThrows(
+ () => new asyncNonConstructorDecl(), TypeError);
+assertThrows(
+ () => new (async function() {}), TypeError);
+assertThrows(
+ () => new ({ async nonConstructor() {} }).nonConstructor(), TypeError);
+assertThrows(
+ () => new (() => "not a constructor!"), TypeError);
+assertThrows(
+ () => new (AsyncFunction()), TypeError);
+assertThrows(
+ () => new (new AsyncFunction()), TypeError);
+
+// Normal completion
+async function asyncDecl() { return "test"; }
+assertEqualsAsync("test", asyncDecl);
+assertEqualsAsync("test2", async function() { return "test2"; });
+assertEqualsAsync("test3", async () => "test3");
+assertEqualsAsync("test4", () => ({ async f() { return "test4"; } }).f());
+assertEqualsAsync("test5", () => AsyncFunction("no", "return 'test' + no;")(5));
+assertEqualsAsync("test6",
+ () => (new AsyncFunction("no", "return 'test' + no;"))(6));
+
+class MyError extends Error {};
+
+// Throw completion
+async function asyncDeclThrower(e) { throw new MyError(e); }
+assertThrowsAsync(() => asyncDeclThrower("boom!"), MyError, "boom!");
+assertThrowsAsync(
+ () => (async function(e) { throw new MyError(e); })("boom!!!"),
+ MyError, "boom!!!");
+assertThrowsAsync(
+ () => (async e => { throw new MyError(e) })("boom!!"), MyError, "boom!!");
+assertThrowsAsync(
+ () => ({ async thrower(e) { throw new MyError(e); } }).thrower("boom!1!"),
+ MyError, "boom!1!");
+assertThrowsAsync(
+ () => AsyncFunction("msg", "throw new MyError(msg)")("boom!2!!"),
+ MyError, "boom!2!!");
+assertThrowsAsync(
+ () => (new AsyncFunction("msg", "throw new MyError(msg)"))("boom!2!!!"),
+ MyError, "boom!2!!!");
+
+function resolveLater(value) { return Promise.resolve(value); }
+function rejectLater(error) { return Promise.reject(error); }
+
+// Resume after Normal completion
+var log = [];
+async function resumeAfterNormal(value) {
+ log.push("start:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ return value + 1;
+}
+
+assertEqualsAsync(4, () => resumeAfterNormal(1));
+assertEquals("start:1 resume:2 resume:3", log.join(" "));
+
+var O = {
+ async resumeAfterNormal(value) {
+ log.push("start:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ return value + 1;
+ }
+};
+log = [];
+assertEqualsAsync(5, () => O.resumeAfterNormal(2));
+assertEquals("start:2 resume:3 resume:4", log.join(" "));
+
+var resumeAfterNormalArrow = async (value) => {
+ log.push("start:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ return value + 1;
+};
+log = [];
+assertEqualsAsync(6, () => resumeAfterNormalArrow(3));
+assertEquals("start:3 resume:4 resume:5", log.join(" "));
+
+var resumeAfterNormalEval = AsyncFunction("value", `
+ log.push("start:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ return value + 1;`);
+log = [];
+assertEqualsAsync(7, () => resumeAfterNormalEval(4));
+assertEquals("start:4 resume:5 resume:6", log.join(" "));
+
+var resumeAfterNormalNewEval = new AsyncFunction("value", `
+ log.push("start:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ value = await resolveLater(value + 1);
+ log.push("resume:" + value);
+ return value + 1;`);
+log = [];
+assertEqualsAsync(8, () => resumeAfterNormalNewEval(5));
+assertEquals("start:5 resume:6 resume:7", log.join(" "));
+
+// Resume after Throw completion
+async function resumeAfterThrow(value) {
+ log.push("start:" + value);
+ try {
+ value = await rejectLater("throw1");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ try {
+ value = await rejectLater("throw2");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ return value + 1;
+}
+
+log = [];
+assertEqualsAsync(2, () => resumeAfterThrow(1));
+assertEquals("start:1 resume:throw1 resume:throw2", log.join(" "));
+
+var O = {
+ async resumeAfterThrow(value) {
+ log.push("start:" + value);
+ try {
+ value = await rejectLater("throw1");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ try {
+ value = await rejectLater("throw2");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ return value + 1;
+ }
+}
+log = [];
+assertEqualsAsync(3, () => O.resumeAfterThrow(2));
+assertEquals("start:2 resume:throw1 resume:throw2", log.join(" "));
+
+var resumeAfterThrowArrow = async (value) => {
+ log.push("start:" + value);
+ try {
+ value = await rejectLater("throw1");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ try {
+ value = await rejectLater("throw2");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ return value + 1;
+};
+
+log = [];
+
+assertEqualsAsync(4, () => resumeAfterThrowArrow(3));
+assertEquals("start:3 resume:throw1 resume:throw2", log.join(" "));
+
+var resumeAfterThrowEval = AsyncFunction("value", `
+ log.push("start:" + value);
+ try {
+ value = await rejectLater("throw1");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ try {
+ value = await rejectLater("throw2");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ return value + 1;`);
+log = [];
+assertEqualsAsync(5, () => resumeAfterThrowEval(4));
+assertEquals("start:4 resume:throw1 resume:throw2", log.join(" "));
+
+var resumeAfterThrowNewEval = new AsyncFunction("value", `
+ log.push("start:" + value);
+ try {
+ value = await rejectLater("throw1");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ try {
+ value = await rejectLater("throw2");
+ } catch (e) {
+ log.push("resume:" + e);
+ }
+ return value + 1;`);
+log = [];
+assertEqualsAsync(6, () => resumeAfterThrowNewEval(5));
+assertEquals("start:5 resume:throw1 resume:throw2", log.join(" "));
+
+async function foo() {}
+assertEquals("async function foo() {}", foo.toString());
+assertEquals("async function () {}", async function() {}.toString());
+assertEquals("async x => x", (async x => x).toString());
+assertEquals("async x => { return x }", (async x => { return x }).toString());
+class AsyncMethod { async foo() { } }
+assertEquals("async foo() { }", Function.prototype.toString.call(AsyncMethod.prototype.foo));
+assertEquals("async foo() { }", Function.prototype.toString.call({async foo() { }}.foo));
diff --git a/test/mjsunit/harmony/atomics.js b/test/mjsunit/harmony/atomics.js
index bf27eb4..e608df3 100644
--- a/test/mjsunit/harmony/atomics.js
+++ b/test/mjsunit/harmony/atomics.js
@@ -16,26 +16,19 @@
return value;
}
-function toRangeClamped(value) {
- if (value < this.min) return this.min;
- if (value > this.max) return this.max;
- return value;
-}
-
function makeConstructorObject(constr, min, max, toRange) {
var o = {constr: constr, min: min, max: max};
- o.toRange = toRange.bind(o);
+ o.toRange = toRangeWrapped.bind(o);
return o;
}
var IntegerTypedArrayConstructors = [
- makeConstructorObject(Int8Array, -128, 127, toRangeWrapped),
- makeConstructorObject(Int16Array, -32768, 32767, toRangeWrapped),
- makeConstructorObject(Int32Array, -0x80000000, 0x7fffffff, toRangeWrapped),
- makeConstructorObject(Uint8Array, 0, 255, toRangeWrapped),
- makeConstructorObject(Uint8ClampedArray, 0, 255, toRangeClamped),
- makeConstructorObject(Uint16Array, 0, 65535, toRangeWrapped),
- makeConstructorObject(Uint32Array, 0, 0xffffffff, toRangeWrapped),
+ makeConstructorObject(Int8Array, -128, 127),
+ makeConstructorObject(Int16Array, -32768, 32767),
+ makeConstructorObject(Int32Array, -0x80000000, 0x7fffffff),
+ makeConstructorObject(Uint8Array, 0, 255),
+ makeConstructorObject(Uint16Array, 0, 65535),
+ makeConstructorObject(Uint32Array, 0, 0xffffffff),
];
(function TestBadArray() {
@@ -44,9 +37,13 @@
var sab = new SharedArrayBuffer(128);
var sf32a = new Float32Array(sab);
var sf64a = new Float64Array(sab);
+ var u8ca = new Uint8ClampedArray(sab);
// Atomic ops required integer shared typed arrays
- [undefined, 1, 'hi', 3.4, ab, u32a, sab, sf32a, sf64a].forEach(function(o) {
+ var badArrayTypes = [
+ undefined, 1, 'hi', 3.4, ab, u32a, sab, sf32a, sf64a, u8ca
+ ];
+ badArrayTypes.forEach(function(o) {
assertThrows(function() { Atomics.compareExchange(o, 0, 0, 0); },
TypeError);
assertThrows(function() { Atomics.load(o, 0); }, TypeError);
@@ -129,15 +126,16 @@
var testOp = function(op, ia, index, expectedIndex, name) {
for (var i = 0; i < ia.length; ++i)
- ia[i] = 22;
+ ia[i] = i * 2;
ia[expectedIndex] = 0;
- assertEquals(0, op(ia, index, 0, 0), name);
+ var result = op(ia, index, 0, 0);
+ assertEquals(0, result, name);
assertEquals(0, ia[expectedIndex], name);
for (var i = 0; i < ia.length; ++i) {
if (i == expectedIndex) continue;
- assertEquals(22, ia[i], name);
+ assertEquals(i * 2, ia[i], name);
}
};
@@ -222,6 +220,24 @@
}
})
});
+
+ // Test Smi range
+ (function () {
+ var sab = new SharedArrayBuffer(4);
+ var i32 = new Int32Array(sab);
+ var u32 = new Uint32Array(sab);
+
+ function testLoad(signedValue, unsignedValue) {
+ u32[0] = unsignedValue;
+ assertEquals(unsignedValue, Atomics.load(u32, 0));
+ assertEquals(signedValue, Atomics.load(i32, 0));
+ }
+
+ testLoad(0x3fffffff, 0x3fffffff); // 2**30-1 (always smi)
+ testLoad(0x40000000, 0x40000000); // 2**30 (smi if signed and 32-bits)
+ testLoad(0x80000000, -0x80000000); // 2**31 (smi if signed and 32-bits)
+ testLoad(0xffffffff, -1); // 2**31 (smi if signed)
+ });
})();
(function TestStore() {
@@ -405,7 +421,7 @@
assertEquals(50, Atomics.compareExchange(sta, 0, v, v), name);
// Store
- assertEquals(+v, Atomics.store(sta, 0, v), name);
+ assertEquals(v|0, Atomics.store(sta, 0, v), name);
assertEquals(v|0, sta[0], name);
// Add
diff --git a/test/mjsunit/harmony/do-expressions.js b/test/mjsunit/harmony/do-expressions.js
index b3be4ec..38b68b6 100644
--- a/test/mjsunit/harmony/do-expressions.js
+++ b/test/mjsunit/harmony/do-expressions.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-do-expressions --harmony-sloppy-let --allow-natives-syntax
+// Flags: --harmony-do-expressions --allow-natives-syntax
function returnValue(v) { return v; }
function MyError() {}
diff --git a/test/mjsunit/harmony/for-in.js b/test/mjsunit/harmony/for-in.js
new file mode 100644
index 0000000..58e343b
--- /dev/null
+++ b/test/mjsunit/harmony/for-in.js
@@ -0,0 +1,9 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-for-in
+
+assertThrows("for (var x = 0 in {});", SyntaxError);
+assertThrows("for (const x = 0 in {});", SyntaxError);
+assertThrows("for (let x = 0 in {});", SyntaxError);
diff --git a/test/mjsunit/harmony/function-sent.js b/test/mjsunit/harmony/function-sent.js
index b3cd644..cd0ca95 100644
--- a/test/mjsunit/harmony/function-sent.js
+++ b/test/mjsunit/harmony/function-sent.js
@@ -49,7 +49,7 @@
try {
yield function.sent;
} finally {
- return 666;
+ return 23;
}
}
@@ -77,7 +77,7 @@
let x = g();
assertEquals({value: 1, done: false}, x.next(1));
assertEquals({value: undefined, done: false}, x.next(2));
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 23, done: true}, x.return(42));
}
}
diff --git a/test/mjsunit/harmony/generators.js b/test/mjsunit/harmony/generators.js
index df6cec8..895a248 100644
--- a/test/mjsunit/harmony/generators.js
+++ b/test/mjsunit/harmony/generators.js
@@ -2,6 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --ignition-generators --harmony-do-expressions
+// Flags: --allow-natives-syntax
+
+
+function MaybeOptimizeOrDeoptimize(f) {
+ let x = Math.random(); // --random-seed makes this deterministic
+ if (x <= 0.33) {
+ %OptimizeFunctionOnNextCall(f);
+ } else if (x <= 0.66) {
+ %DeoptimizeFunction(f);
+ }
+}
+
+function Next(generator, ...args) {
+ MaybeOptimizeOrDeoptimize(%GeneratorGetFunction(generator));
+ return generator.next(...args);
+}
+
+function Return(generator, ...args) {
+ MaybeOptimizeOrDeoptimize(%GeneratorGetFunction(generator));
+ return generator.return(...args);
+}
+
+function Throw(generator, ...args) {
+ MaybeOptimizeOrDeoptimize(%GeneratorGetFunction(generator));
+ return generator.throw(...args);
+}
+
{ // yield in try-catch
@@ -9,19 +37,19 @@
try {yield 1} catch (error) {assertEquals("caught", error)}
};
- assertThrowsEquals(() => g().throw("not caught"), "not caught");
+ assertThrowsEquals(() => Throw(g(), "not caught"), "not caught");
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.throw("caught"));
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Throw(x, "caught"));
}
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
- assertThrowsEquals(() => x.throw("not caught"), "not caught");
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
+ assertThrowsEquals(() => Throw(x, "not caught"), "not caught");
}
}
@@ -31,19 +59,19 @@
{
let x = g();
- assertEquals({value: 43, done: false}, x.next());
- assertEquals({value: 42, done: true}, x.next());
+ assertEquals({value: 43, done: false}, Next(x));
+ assertEquals({value: 42, done: true}, Next(x));
}
}
{ // return that doesn't close
let x;
- let g = function*() { try {return 42} finally {x.throw(666)} };
+ let g = function*() { try {return 42} finally {Throw(x, 666)} };
{
x = g();
- assertThrows(() => x.next(), TypeError); // still executing
+ assertThrows(() => Next(x), TypeError); // still executing
}
}
@@ -54,42 +82,42 @@
{ // "return" closes at suspendedStart
let x = g();
- assertEquals({value: 666, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next(42));
- assertThrowsEquals(() => x.throw(43), 43);
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 666, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 42));
+ assertThrowsEquals(() => Throw(x, 43), 43);
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
{ // "throw" closes at suspendedStart
let x = g();
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: undefined, done: true}, x.next(42));
- assertEquals({value: 43, done: true}, x.return(43));
- assertThrowsEquals(() => x.throw(44), 44);
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: undefined, done: true}, Next(x, 42));
+ assertEquals({value: 43, done: true}, Return(x, 43));
+ assertThrowsEquals(() => Throw(x, 44), 44);
}
{ // "next" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 13, done: true}, x.next(666));
- assertEquals({value: undefined, done: true}, x.next(666));
- assertThrowsEquals(() => x.throw(666), 666);
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 13, done: true}, Next(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertThrowsEquals(() => Throw(x, 666), 666);
}
{ // "return" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 13, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next(666));
- assertEquals({value: 666, done: true}, x.return(666));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 13, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertEquals({value: 666, done: true}, Return(x, 666));
}
{ // "throw" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 13, done: true}, x.throw(666));
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: undefined, done: true}, x.next(666));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 13, done: true}, Throw(x, 666));
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: undefined, done: true}, Next(x, 666));
}
}
@@ -100,45 +128,45 @@
{ // "return" closes at suspendedStart
let x = g();
- assertEquals({value: 666, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next(42));
- assertThrowsEquals(() => x.throw(43), 43);
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 666, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 42));
+ assertThrowsEquals(() => Throw(x, 43), 43);
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
{ // "throw" closes at suspendedStart
let x = g();
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: undefined, done: true}, x.next(42));
- assertEquals({value: 43, done: true}, x.return(43));
- assertThrowsEquals(() => x.throw(44), 44);
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: undefined, done: true}, Next(x, 42));
+ assertEquals({value: 43, done: true}, Return(x, 43));
+ assertThrowsEquals(() => Throw(x, 44), 44);
}
{ // "next" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next(666));
- assertEquals({value: undefined, done: true}, x.next(666));
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
{ // "return" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 666, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next(666));
- assertThrowsEquals(() => x.throw(44), 44);
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 666, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertThrowsEquals(() => Throw(x, 44), 44);
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
{ // "throw" closes at suspendedYield
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: undefined, done: true}, x.next(666));
- assertThrowsEquals(() => x.throw(666), 666);
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: undefined, done: true}, Next(x, 666));
+ assertThrowsEquals(() => Throw(x, 666), 666);
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
}
@@ -149,17 +177,17 @@
{
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.return(666));
- assertEquals({value: 13, done: true}, x.next());
- assertEquals({value: 666, done: true}, x.return(666));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Return(x, 666));
+ assertEquals({value: 13, done: true}, Next(x));
+ assertEquals({value: 666, done: true}, Return(x, 666));
}
{
let x = g();
- assertEquals({value: 666, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next());
- assertEquals({value: 666, done: true}, x.return(666));
+ assertEquals({value: 666, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x));
+ assertEquals({value: 666, done: true}, Return(x, 666));
}
}
@@ -170,17 +198,17 @@
{
let x = g();
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.return(666));
- assertEquals({value: 666, done: true}, x.next());
- assertEquals({value: 5, done: true}, x.return(5));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Return(x, 666));
+ assertEquals({value: 666, done: true}, Next(x));
+ assertEquals({value: 5, done: true}, Return(x, 5));
}
{
let x = g();
- assertEquals({value: 666, done: true}, x.return(666));
- assertEquals({value: undefined, done: true}, x.next());
- assertEquals({value: 666, done: true}, x.return(666));
+ assertEquals({value: 666, done: true}, Return(x, 666));
+ assertEquals({value: undefined, done: true}, Next(x));
+ assertEquals({value: 666, done: true}, Return(x, 666));
}
}
@@ -192,29 +220,29 @@
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.next(666));
- assertEquals({value: 13, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Next(x, 666));
+ assertEquals({value: 13, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
}
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.return(666));
- assertEquals({value: 13, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Return(x, 666));
+ assertEquals({value: 13, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
}
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.throw(666));
- assertEquals({value: 13, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Throw(x, 666));
+ assertEquals({value: 13, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
}
}
@@ -226,28 +254,28 @@
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.next(666));
- assertEquals({value: undefined, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Next(x, 666));
+ assertEquals({value: undefined, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
}
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.return(44));
- assertEquals({value: 44, done: false}, x.next());
- assertEquals({value: undefined, done: true}, x.next());
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Return(x, 44));
+ assertEquals({value: 44, done: false}, Next(x));
+ assertEquals({value: undefined, done: true}, Next(x));
}
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 42, done: false}, x.next());
- assertEquals({value: 43, done: false}, x.throw(666));
- assertThrowsEquals(() => x.next(), 666);
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 42, done: false}, Next(x));
+ assertEquals({value: 43, done: false}, Throw(x, 666));
+ assertThrowsEquals(() => Next(x), 666);
}
}
@@ -265,8 +293,370 @@
{
let x = g();
- assertEquals({value: 1, done: false}, x.next());
- assertEquals({value: 2, done: false}, x.next());
- assertEquals({value: 42, done: true}, x.return(42));
+ assertEquals({value: 1, done: false}, Next(x));
+ assertEquals({value: 2, done: false}, Next(x));
+ assertEquals({value: 42, done: true}, Return(x, 42));
}
}
+
+
+// More or less random tests from here on.
+
+
+{
+ function* foo() { }
+ let g = foo();
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { return new.target }
+ let g = foo();
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { throw 666; return 42}
+ let g = foo();
+ assertThrowsEquals(() => Next(g), 666);
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo(a) { return a; }
+ let g = foo(42);
+ assertEquals({value: 42, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo(a) { a.iwashere = true; return a; }
+ let x = {};
+ let g = foo(x);
+ assertEquals({value: {iwashere: true}, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let a = 42;
+ function* foo() { return a; }
+ let g = foo();
+ assertEquals({value: 42, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let a = 40;
+ function* foo(b) { return a + b; }
+ let g = foo(2);
+ assertEquals({value: 42, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let a = 40;
+ function* foo(b) { a--; b++; return a + b; }
+ let g = foo(2);
+ assertEquals({value: 42, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let g;
+ function* foo() { Next(g) }
+ g = foo();
+ assertThrows(() => Next(g), TypeError);
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { yield 2; yield 3; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+
+{
+ function* foo() { yield 2; if (true) { yield 3 }; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { yield 2; if (true) { yield 3; yield 4 } }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { yield 2; if (false) { yield 3 }; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() { yield 2; while (true) { yield 3 }; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+}
+
+{
+ function* foo() { yield 2; (yield 3) + 42; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+}
+
+{
+ function* foo() { yield 2; (do {yield 3}) + 42; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+}
+
+{
+ function* foo() { yield 2; return (yield 3) + 42; yield 4 }
+ g = foo();
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 42, done: true}, Next(g, 0));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let x = 42;
+ function* foo() {
+ yield x;
+ for (let x in {a: 1, b: 2}) {
+ let i = 2;
+ yield x;
+ yield i;
+ do {
+ yield i;
+ } while (i-- > 0);
+ }
+ yield x;
+ return 5;
+ }
+ g = foo();
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 'a', done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 1, done: false}, Next(g));
+ assertEquals({value: 0, done: false}, Next(g));
+ assertEquals({value: 'b', done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 1, done: false}, Next(g));
+ assertEquals({value: 0, done: false}, Next(g));
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 5, done: true}, Next(g));
+}
+
+{
+ let a = 3;
+ function* foo() {
+ let b = 4;
+ yield 1;
+ { let c = 5; yield 2; yield a; yield b; yield c; }
+ }
+ g = foo();
+ assertEquals({value: 1, done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 3, done: false}, Next(g));
+ assertEquals({value: 4, done: false}, Next(g));
+ assertEquals({value: 5, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() {
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ yield 42;
+ }
+ g = foo();
+ for (let i = 0; i < 100; ++i) {
+ assertEquals({value: 42, done: false}, i%25 === 0 ? Next(g) : g.next());
+ }
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ function* foo() {
+ for (let i = 0; i < 3; ++i) {
+ let j = 0
+ yield i;
+ do {
+ yield (i + 10);
+ } while (++j < 2);
+ }
+ }
+ g = foo();
+ assertEquals({value: 0, done: false}, Next(g));
+ assertEquals({value: 10, done: false}, Next(g));
+ assertEquals({value: 10, done: false}, Next(g));
+ assertEquals({value: 1, done: false}, Next(g));
+ assertEquals({value: 11, done: false}, Next(g));
+ assertEquals({value: 11, done: false}, Next(g));
+ assertEquals({value: 2, done: false}, Next(g));
+ assertEquals({value: 12, done: false}, Next(g));
+ assertEquals({value: 12, done: false}, Next(g));
+ assertEquals({value: undefined, done: true}, Next(g));
+}
+
+{
+ let foo = function*() {
+ while (true) {
+ if (true || false) yield 42;
+ continue;
+ }
+ }
+ g = foo();
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 42, done: false}, Next(g));
+}
+
+{
+ let foo = function*() {
+ yield* (function*() { yield 42; }());
+ assertUnreachable();
+ }
+ g = foo();
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 23, done: true}, Return(g, 23));
+}
+
+{
+ let iterable = {
+ [Symbol.iterator]() {
+ return { next() { return {} } };
+ }
+ };
+ let foo = function*() { yield* iterable };
+ g = foo();
+ g.next();
+ assertThrows(() => Throw(g), TypeError);
+}
diff --git a/test/mjsunit/harmony/harmony-string-pad-end.js b/test/mjsunit/harmony/harmony-string-pad-end.js
index 3292e94..03e5aea 100644
--- a/test/mjsunit/harmony/harmony-string-pad-end.js
+++ b/test/mjsunit/harmony/harmony-string-pad-end.js
@@ -67,8 +67,19 @@
(function TestFillerToString() {
assertEquals(". ", ".".padEnd(10));
assertEquals(". ", ".".padEnd(10, undefined));
- assertEquals(". ", ".".padEnd(10, { toString() { return ""; } }));
assertEquals(".nullnulln", ".".padEnd(10, null));
+ assertEquals(".XXXXXXXXX", ".".padEnd(10, { toString() { return "X"; } }));
+ assertEquals(
+ ".111111111",
+ ".".padEnd(10, { toString: undefined, valueOf() { return 1; } }));
+})();
+
+
+(function TestFillerEmptyString() {
+ assertEquals(".", ".".padEnd(10, ""));
+ assertEquals(".", ".".padEnd(10, { toString() { return ""; } }));
+ assertEquals(
+ ".", ".".padEnd(10, { toString: undefined, valueOf() { return ""; } }));
})();
diff --git a/test/mjsunit/harmony/harmony-string-pad-start.js b/test/mjsunit/harmony/harmony-string-pad-start.js
index 2b2d004..33bf8f3 100644
--- a/test/mjsunit/harmony/harmony-string-pad-start.js
+++ b/test/mjsunit/harmony/harmony-string-pad-start.js
@@ -67,8 +67,19 @@
(function TestFillerToString() {
assertEquals(" .", ".".padStart(10));
assertEquals(" .", ".".padStart(10, undefined));
- assertEquals(" .", ".".padStart(10, { toString() { return ""; } }));
assertEquals("nullnulln.", ".".padStart(10, null));
+ assertEquals("XXXXXXXXX.", ".".padStart(10, { toString() { return "X"; } }));
+ assertEquals(
+ "111111111.",
+ ".".padStart(10, { toString: undefined, valueOf() { return 1; } }));
+})();
+
+
+(function TestFillerEmptyString() {
+ assertEquals(".", ".".padStart(10, ""));
+ assertEquals(".", ".".padStart(10, { toString() { return ""; } }));
+ assertEquals(
+ ".", ".".padStart(10, { toString: undefined, valueOf() { return ""; } }));
})();
diff --git a/test/mjsunit/harmony/instanceof-es6.js b/test/mjsunit/harmony/instanceof-es6.js
index 60e7ee2..4971c9c 100644
--- a/test/mjsunit/harmony/instanceof-es6.js
+++ b/test/mjsunit/harmony/instanceof-es6.js
@@ -48,3 +48,22 @@
// OrdinaryHasInstance passed a non-object argument returns false.
assertEquals(Function.prototype[Symbol.hasInstance].call(Array, 0), false);
+
+// Cannot assign to @@hasInstance with %FunctionPrototype%.
+(function() {
+ "use strict";
+ function F() {}
+ assertThrows(function() { F[Symbol.hasInstance] = (v) => v }, TypeError);
+})();
+
+// Check correct invocation of @@hasInstance handler on function instance.
+(function() {
+ function F() {}
+ var counter = 0;
+ var proto = Object.getPrototypeOf(F);
+ Object.setPrototypeOf(F, null);
+ F[Symbol.hasInstance] = function(v) { ++counter; return true };
+ Object.setPrototypeOf(F, proto);
+ assertTrue(1 instanceof F);
+ assertEquals(1, counter);
+})();
diff --git a/test/mjsunit/harmony/iterator-close.js b/test/mjsunit/harmony/iterator-close.js
index 09e0153..03cdeac 100644
--- a/test/mjsunit/harmony/iterator-close.js
+++ b/test/mjsunit/harmony/iterator-close.js
@@ -1007,6 +1007,26 @@
assertThrowsEquals(() => {
(([x]) => x)(g());
}, 666);
+
+ assertThrowsEquals(() => {
+ var [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ let [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ const [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ (([...x]) => x)(g());
+ }, 666);
}
@@ -1051,6 +1071,26 @@
assertThrowsEquals(() => {
(([x]) => x)(g());
}, 666);
+
+ assertThrowsEquals(() => {
+ var [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ let [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ const [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ (([...x]) => x)(g());
+ }, 666);
}
@@ -1095,6 +1135,26 @@
assertThrowsEquals(() => {
(([x]) => x)(g());
}, 666);
+
+ assertThrowsEquals(() => {
+ var [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ let [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ const [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ [...x] = g();
+ }, 666);
+
+ assertThrowsEquals(() => {
+ (([...x]) => x)(g());
+ }, 666);
}
@@ -1238,3 +1298,75 @@
}, 5);
assertEquals([1], log);
}
+
+
+// yield*, argument's return method is "undefined".
+function TestYieldStarWithoutReturn(get_iterable) {
+ assertTrue(get_iterable().return == undefined);
+
+ function* g() { yield* get_iterable() }
+
+ {
+ let gen = g();
+ assertEquals({value: 1, done: false}, gen.next());
+ assertEquals({value: undefined, done: true}, gen.return());
+ }
+
+ assertEquals(42, (() => {
+ for (let x of g()) break;
+ return 42;
+ })());
+
+ assertEquals(42, (() => {
+ for (let x of g()) return 42;
+ })());
+
+ assertThrowsEquals(() => {
+ for (let x of g()) throw 42;
+ }, 42);
+}
+{
+ let get_iterable1 = () => [1, 2];
+ let get_iterable2 = function*() { yield 1; yield 2 };
+ get_iterable2.prototype.return = null;
+ TestYieldStarWithoutReturn(get_iterable1);
+ TestYieldStarWithoutReturn(get_iterable2);
+}
+
+
+// yield*, argument's return method is defined.
+{
+ let get_iterable = function*() { yield 1; yield 2 };
+ const obj = {};
+ get_iterable.prototype.return = (...args) => obj;
+
+ function* g() { yield* get_iterable() }
+
+ {
+ let gen = g();
+ assertEquals({value: 1, done: false}, gen.next());
+ assertSame(obj, gen.return());
+ assertSame(obj, gen.return());
+ assertSame(obj, gen.return());
+ assertEquals({value: 2, done: false}, gen.next());
+ assertSame(obj, gen.return());
+ assertSame(obj, gen.return());
+ assertSame(obj, gen.return());
+ assertEquals({value: undefined, done: true}, gen.next());
+ assertEquals({value: undefined, done: true}, gen.return());
+ assertEquals({value: undefined, done: true}, gen.return());
+ }
+
+ assertEquals(42, (() => {
+ for (let x of g()) break;
+ return 42;
+ })());
+
+ assertEquals(42, (() => {
+ for (let x of g()) return 42;
+ })());
+
+ assertThrowsEquals(() => {
+ for (let x of g()) throw 42;
+ }, 42);
+}
diff --git a/test/mjsunit/harmony/regexp-property-binary.js b/test/mjsunit/harmony/regexp-property-binary.js
new file mode 100644
index 0000000..d0894b7
--- /dev/null
+++ b/test/mjsunit/harmony/regexp-property-binary.js
@@ -0,0 +1,25 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property --harmony-unicode-regexps
+
+function t(re, s) { assertTrue(re.test(s)); }
+function f(re, s) { assertFalse(re.test(s)); }
+
+t(/\p{Bidi_Control}+/u, "\u200E");
+f(/\p{Bidi_C}+/u, "On a dark desert highway, cool wind in my hair");
+t(/\p{AHex}+/u, "DEADBEEF");
+t(/\p{Alphabetic}+/u, "abcdefg");
+t(/\P{Alphabetic}+/u, "1234");
+t(/\p{White_Space}+/u, "\u00A0");
+t(/\p{Uppercase}+/u, "V");
+f(/\p{Lower}+/u, "U");
+t(/\p{Ideo}+/u, "字");
+f(/\p{Ideo}+/u, "x");
+
+assertThrows("/\\p{Hiragana}/u");
+assertThrows("/\\p{Bidi_Class}/u");
+assertThrows("/\\p{Bidi_C=False}/u");
+assertThrows("/\\P{Bidi_Control=Y}/u");
+assertThrows("/\\p{AHex=Yes}/u");
diff --git a/test/mjsunit/harmony/regexp-property-blocks.js b/test/mjsunit/harmony/regexp-property-blocks.js
index d186e98..f41c06e 100644
--- a/test/mjsunit/harmony/regexp-property-blocks.js
+++ b/test/mjsunit/harmony/regexp-property-blocks.js
@@ -7,28 +7,28 @@
function t(re, s) { assertTrue(re.test(s)); }
function f(re, s) { assertFalse(re.test(s)); }
-t(/\p{InASCII}+/u, ".");
-t(/\p{InASCII}+/u, "supercalifragilisticexpialidocious");
-t(/\p{InBasic_Latin}+/u, ".");
-t(/\p{InBasic_Latin}+/u, "supercalifragilisticexpialidocious");
+t(/\p{Block=ASCII}+/u, ".");
+t(/\p{Block=ASCII}+/u, "supercalifragilisticexpialidocious");
+t(/\p{Block=Basic_Latin}+/u, ".");
+t(/\p{Block=Basic_Latin}+/u, "supercalifragilisticexpialidocious");
-t(/\p{InCJK}+/u, "话说天下大势,分久必合,合久必分");
-t(/\p{InCJK_Unified_Ideographs}+/u, "吾庄后有一桃园,花开正盛");
-f(/\p{InCJK}+/u, "おはようございます");
-f(/\p{InCJK_Unified_Ideographs}+/u,
+t(/\p{blk=CJK}+/u, "话说天下大势,分久必合,合久必分");
+t(/\p{blk=CJK_Unified_Ideographs}+/u, "吾庄后有一桃园,花开正盛");
+f(/\p{blk=CJK}+/u, "おはようございます");
+f(/\p{blk=CJK_Unified_Ideographs}+/u,
"Something is rotten in the state of Denmark");
-t(/\p{InLatin_1}+/u, "Wie froh bin ich, daß ich weg bin!");
-f(/\p{InLatin_1_Supplement}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
-f(/\p{InLatin_1_Sup}+/u, "いただきます");
+t(/\p{blk=Latin_1}+/u, "Wie froh bin ich, daß ich weg bin!");
+f(/\p{blk=Latin_1_Supplement}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
+f(/\p{blk=Latin_1_Sup}+/u, "いただきます");
-t(/\p{InHiragana}/u, "いただきます");
-t(/\p{Hiragana}/u, "\u{1b001}"); // This refers to the script "Hiragana".
-f(/\p{InHiragana}/u, "\u{1b001}"); // This refers to the block "Hiragana".
+t(/\p{blk=Hiragana}/u, "いただきます");
+t(/\p{sc=Hiragana}/u, "\u{1b001}"); // This refers to the script "Hiragana".
+f(/\p{blk=Hiragana}/u, "\u{1b001}"); // This refers to the block "Hiragana".
-t(/\p{InGreek_And_Coptic}/u,
+t(/\p{blk=Greek_And_Coptic}/u,
"ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ");
-t(/\p{InGreek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
+t(/\p{blk=Greek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
assertThrows("/\\p{In}/u");
assertThrows("/\\pI/u");
diff --git a/test/mjsunit/harmony/regexp-property-char-class.js b/test/mjsunit/harmony/regexp-property-char-class.js
index 76774cb..6162012 100644
--- a/test/mjsunit/harmony/regexp-property-char-class.js
+++ b/test/mjsunit/harmony/regexp-property-char-class.js
@@ -9,9 +9,6 @@
assertThrows("/[\\p{}]/u");
assertThrows("/[\\p{]/u");
assertThrows("/[\\p}]/u");
-assertThrows("/[\\p{Math}]/u");
-assertThrows("/[\\p{Bidi_M}]/u");
-assertThrows("/[\\p{Hex}]/u");
assertTrue(/^[\p{Lu}\p{Ll}]+$/u.test("ABCabc"));
assertTrue(/^[\p{Lu}-\p{Ll}]+$/u.test("ABC-abc"));
@@ -19,6 +16,9 @@
assertTrue(/^[\P{Lu}\p{Ll}]+$/u.test("abc"));
assertTrue(/^[\P{Lu}]+$/u.test("abc123"));
assertFalse(/^[\P{Lu}]+$/u.test("XYZ"));
+assertTrue(/[\p{Math}]/u.test("+"));
+assertTrue(/[\P{Bidi_M}]/u.test(" "));
+assertTrue(/[\p{Hex}]/u.test("A"));
assertTrue(/^[^\P{Lu}]+$/u.test("XYZ"));
assertFalse(/^[^\p{Lu}\p{Ll}]+$/u.test("abc"));
diff --git a/test/mjsunit/harmony/regexp-property-enumerated.js b/test/mjsunit/harmony/regexp-property-enumerated.js
new file mode 100644
index 0000000..e4a81a4
--- /dev/null
+++ b/test/mjsunit/harmony/regexp-property-enumerated.js
@@ -0,0 +1,28 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property --harmony-unicode-regexps
+
+function t(re, s) { assertTrue(re.test(s)); }
+function f(re, s) { assertFalse(re.test(s)); }
+
+t(/\p{Bidi_Class=L}+/u, "Is this the real life?");
+t(/\p{bc=Left_To_Right}+/u, "Is this just fantasy?");
+t(/\p{bc=AL}+/u, "السلام عليكم");
+t(/\p{bc=Arabic_Letter}+/u, "متشرف بمعرفتك");
+
+t(/\p{Line_Break=Glue}/u, "\u00A0");
+t(/\p{lb=AL}/u, "~");
+
+assertThrows("/\\p{Block=}/u");
+assertThrows("/\\p{=}/u");
+assertThrows("/\\p{=L}/u");
+assertThrows("/\\p{=Hiragana}/u");
+assertThrows("/\\p{Block=CJK=}/u");
+
+assertThrows("/\\p{Age=V8_0}/u");
+assertThrows("/\\p{General_Category=Letter}/u");
+assertThrows("/\\p{gc=L}/u");
+assertThrows("/\\p{General_Category_Mask=Letter}/u");
+assertThrows("/\\p{gcm=L}/u");
diff --git a/test/mjsunit/harmony/regexp-property-exact-match.js b/test/mjsunit/harmony/regexp-property-exact-match.js
index 4dfcc5f..fe233f2 100644
--- a/test/mjsunit/harmony/regexp-property-exact-match.js
+++ b/test/mjsunit/harmony/regexp-property-exact-match.js
@@ -6,12 +6,12 @@
assertThrows("/\\p{In CJK}/u");
assertThrows("/\\p{InCJKUnifiedIdeographs}/u");
-assertDoesNotThrow("/\\p{InCJK}/u");
-assertDoesNotThrow("/\\p{InCJK_Unified_Ideographs}/u");
+assertThrows("/\\p{InCJK}/u");
+assertThrows("/\\p{InCJK_Unified_Ideographs}/u");
-assertDoesNotThrow("/\\p{InCyrillic_Sup}/u");
-assertDoesNotThrow("/\\p{InCyrillic_Supplement}/u");
-assertDoesNotThrow("/\\p{InCyrillic_Supplementary}/u");
+assertThrows("/\\p{InCyrillic_Sup}/u");
+assertThrows("/\\p{InCyrillic_Supplement}/u");
+assertThrows("/\\p{InCyrillic_Supplementary}/u");
assertThrows("/\\p{InCyrillicSupplementary}/u");
assertThrows("/\\p{InCyrillic_supplementary}/u");
@@ -25,9 +25,18 @@
assertDoesNotThrow("/\\p{Combining_Mark}/u");
assertThrows("/\\p{Combining Mark}/u");
-assertDoesNotThrow("/\\p{Copt}/u");
-assertDoesNotThrow("/\\p{Coptic}/u");
-assertDoesNotThrow("/\\p{Qaac}/u");
-assertDoesNotThrow("/\\p{Egyp}/u");
-assertDoesNotThrow("/\\p{Egyptian_Hieroglyphs}/u");
+assertDoesNotThrow("/\\p{Script=Copt}/u");
+assertThrows("/\\p{Coptic}/u");
+assertThrows("/\\p{Qaac}/u");
+assertThrows("/\\p{Egyp}/u");
+assertDoesNotThrow("/\\p{Script=Egyptian_Hieroglyphs}/u");
assertThrows("/\\p{EgyptianHieroglyphs}/u");
+
+assertThrows("/\\p{BidiClass=LeftToRight}/u");
+assertThrows("/\\p{BidiC=LeftToRight}/u");
+assertThrows("/\\p{bidi_c=Left_To_Right}/u");
+
+assertDoesNotThrow("/\\p{Block=CJK}/u");
+assertThrows("/\\p{Block = CJK}/u");
+assertThrows("/\\p{Block=cjk}/u");
+assertThrows("/\\p{BLK=CJK}/u");
diff --git a/test/mjsunit/harmony/regexp-property-scripts.js b/test/mjsunit/harmony/regexp-property-scripts.js
index 19b50ee..ec2b11d 100644
--- a/test/mjsunit/harmony/regexp-property-scripts.js
+++ b/test/mjsunit/harmony/regexp-property-scripts.js
@@ -7,33 +7,33 @@
function t(re, s) { assertTrue(re.test(s)); }
function f(re, s) { assertFalse(re.test(s)); }
-t(/\p{Common}+/u, ".");
-f(/\p{Common}+/u, "supercalifragilisticexpialidocious");
+t(/\p{Script=Common}+/u, ".");
+f(/\p{Script=Common}+/u, "supercalifragilisticexpialidocious");
-t(/\p{Han}+/u, "话说天下大势,分久必合,合久必分");
-t(/\p{Hani}+/u, "吾庄后有一桃园,花开正盛");
-f(/\p{Han}+/u, "おはようございます");
-f(/\p{Hani}+/u, "Something is rotten in the state of Denmark");
+t(/\p{Script=Han}+/u, "话说天下大势,分久必合,合久必分");
+t(/\p{Script=Hani}+/u, "吾庄后有一桃园,花开正盛");
+f(/\p{Script=Han}+/u, "おはようございます");
+f(/\p{Script=Hani}+/u, "Something is rotten in the state of Denmark");
-t(/\p{Latin}+/u, "Wie froh bin ich, daß ich weg bin!");
-t(/\p{Latn}+/u,
+t(/\p{Script=Latin}+/u, "Wie froh bin ich, daß ich weg bin!");
+t(/\p{Script=Latn}+/u,
"It was a bright day in April, and the clocks were striking thirteen");
-f(/\p{Latin}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
-f(/\p{Latn}+/u, "いただきます");
+f(/\p{Script=Latin}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
+f(/\p{Script=Latn}+/u, "いただきます");
-t(/\p{Hiragana}/u, "いただきます");
-t(/\p{Hira}/u, "ありがとうございました");
-f(/\p{Hiragana}/u,
+t(/\p{sc=Hiragana}/u, "いただきます");
+t(/\p{sc=Hira}/u, "ありがとうございました");
+f(/\p{sc=Hiragana}/u,
"Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte");
-f(/\p{Hira}/u, "Call me Ishmael");
+f(/\p{sc=Hira}/u, "Call me Ishmael");
-t(/\p{Phoenician}/u, "\u{10900}\u{1091a}");
-t(/\p{Phnx}/u, "\u{1091f}\u{10916}");
-f(/\p{Phoenician}/u, "Arthur est un perroquet");
-f(/\p{Phnx}/u, "设心狠毒非良士,操卓原来一路人");
+t(/\p{sc=Phoenician}/u, "\u{10900}\u{1091a}");
+t(/\p{sc=Phnx}/u, "\u{1091f}\u{10916}");
+f(/\p{sc=Phoenician}/u, "Arthur est un perroquet");
+f(/\p{sc=Phnx}/u, "设心狠毒非良士,操卓原来一路人");
-t(/\p{Grek}/u, "ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ");
-t(/\p{Greek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
-f(/\p{Greek}/u, "高贤未服英雄志,屈节偏生杰士疑");
-f(/\p{Greek}/u,
+t(/\p{sc=Grek}/u, "ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ");
+t(/\p{sc=Greek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
+f(/\p{sc=Greek}/u, "高贤未服英雄志,屈节偏生杰士疑");
+f(/\p{sc=Greek}/u,
"Mr. Jones, of the Manor Farm, had locked the hen-houses for the night");
diff --git a/test/mjsunit/harmony/regress/regress-4904.js b/test/mjsunit/harmony/regress/regress-4904.js
new file mode 100644
index 0000000..a57d246
--- /dev/null
+++ b/test/mjsunit/harmony/regress/regress-4904.js
@@ -0,0 +1,24 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-do-expressions
+
+(function testCatchScopeInDoExpression() {
+ var f = (s = 17, y = do { try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
+
+(function testCatchScopeInDoExpression() {
+ var f = (s = 17, y = do { let t; try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
+
+(function testCatchScopeInDoExpression() {
+ let t1;
+ var f = (s = 17, y = do { let t2; try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
diff --git a/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js b/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js
deleted file mode 100644
index 1460889..0000000
--- a/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --harmony-object-observe
-// Flags: --allow-natives-syntax
-//
-// Test passes if it does not crash.
-
-arr = [1.1];
-Object.observe(arr, function(){});
-arr.length = 0;
-// TODO(observe): we currently disallow fast elements for observed object.
-// assertTrue(%HasFastDoubleElements(arr));
-// Should not crash
-arr.push(1.1);
diff --git a/test/mjsunit/holy-double-no-arg-array.js b/test/mjsunit/holy-double-no-arg-array.js
new file mode 100644
index 0000000..73e2ddc
--- /dev/null
+++ b/test/mjsunit/holy-double-no-arg-array.js
@@ -0,0 +1,14 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+ function f() {
+ return new Array();
+ }
+ var a = f();
+ a[0] = 0.5;
+ var b = f();
+ b[2] = 0.5;
+ assertEquals(undefined, b[0]);
+})();
diff --git a/test/mjsunit/ignition/elided-instruction-no-ignition.js b/test/mjsunit/ignition/elided-instruction-no-ignition.js
index d31150b..50ad528 100644
--- a/test/mjsunit/ignition/elided-instruction-no-ignition.js
+++ b/test/mjsunit/ignition/elided-instruction-no-ignition.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-debug-as debug
+// Flags: --no-ignition --expose-debug-as debug
Debug = debug.Debug
diff --git a/test/mjsunit/ignition/elided-instruction.js b/test/mjsunit/ignition/elided-instruction.js
index 807974b..a047f41 100644
--- a/test/mjsunit/ignition/elided-instruction.js
+++ b/test/mjsunit/ignition/elided-instruction.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-debug-as debug
+// Flags: --ignition --expose-debug-as debug
Debug = debug.Debug
diff --git a/test/mjsunit/ignition/ignition-statistics-extension.js b/test/mjsunit/ignition/ignition-statistics-extension.js
new file mode 100644
index 0000000..43d05c9
--- /dev/null
+++ b/test/mjsunit/ignition/ignition-statistics-extension.js
@@ -0,0 +1,62 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --ignition --trace-ignition-dispatches
+
+assertEquals(typeof getIgnitionDispatchCounters, "function");
+
+var old_dispatch_counters = getIgnitionDispatchCounters();
+
+// Check that old_dispatch_counters is a non-empty object of objects, such that
+// the value of each property in the inner objects is a number.
+
+assertEquals(typeof old_dispatch_counters, "object");
+assertTrue(Object.getOwnPropertyNames(old_dispatch_counters).length > 0);
+for (var source_bytecode in old_dispatch_counters) {
+ var counters_row = old_dispatch_counters[source_bytecode];
+ assertEquals(typeof counters_row, "object");
+ for (var counter in counters_row) {
+ assertEquals(typeof counters_row[counter], "number");
+ }
+}
+
+// Do something
+function f(x) { return x*x; }
+f(42);
+
+var new_dispatch_counters = getIgnitionDispatchCounters();
+
+var old_source_bytecodes = Object.getOwnPropertyNames(old_dispatch_counters);
+var new_source_bytecodes = Object.getOwnPropertyNames(new_dispatch_counters);
+var common_source_bytecodes = new_source_bytecodes.filter(function (name) {
+ return old_source_bytecodes.indexOf(name) > -1;
+});
+
+// Check that the keys on the outer objects are the same
+assertEquals(common_source_bytecodes, old_source_bytecodes);
+assertEquals(common_source_bytecodes, new_source_bytecodes);
+
+common_source_bytecodes.forEach(function (source_bytecode) {
+ var new_counters_row = new_dispatch_counters[source_bytecode];
+ var old_counters_row = old_dispatch_counters[source_bytecode];
+
+ var old_destination_bytecodes = Object.getOwnPropertyNames(old_counters_row);
+ var new_destination_bytecodes = Object.getOwnPropertyNames(new_counters_row);
+
+ // Check that all the keys in old_ are in new_ too
+ old_destination_bytecodes.forEach(function (name) {
+ assertTrue(new_destination_bytecodes.indexOf(name) > -1);
+ });
+
+ // Check that for each source-destination pair, the counter has either
+ // appeared (was undefined before calling f()), is unchanged, or incremented.
+ new_destination_bytecodes.forEach(function (destination_bytecode) {
+ var new_counter = new_counters_row[destination_bytecode];
+ var old_counter = old_counters_row[destination_bytecode];
+ assertTrue(typeof new_counter === "number");
+ if (typeof old_counter === "number") {
+ assertTrue(new_counter >= old_counter);
+ }
+ });
+});
diff --git a/test/mjsunit/ignition/regress-599001-verifyheap.js b/test/mjsunit/ignition/regress-599001-verifyheap.js
index 5aa2efd..ce5b46d 100644
--- a/test/mjsunit/ignition/regress-599001-verifyheap.js
+++ b/test/mjsunit/ignition/regress-599001-verifyheap.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --verify-heap --expose-gc
+// Flags: --ignition --verify-heap --expose-gc
// Tests that verify heap works for BytecodeArrays in the large object space.
diff --git a/test/mjsunit/messages.js b/test/mjsunit/messages.js
index 8796d05..d40994d 100644
--- a/test/mjsunit/messages.js
+++ b/test/mjsunit/messages.js
@@ -147,7 +147,12 @@
}, "Method Set.prototype.add called on incompatible receiver [object Array]",
TypeError);
-// kInstanceofFunctionExpected
+// kNonCallableInInstanceOfCheck
+test(function() {
+ 1 instanceof {};
+}, "Right-hand side of 'instanceof' is not callable", TypeError);
+
+// kNonObjectInInstanceOfCheck
test(function() {
1 instanceof 1;
}, "Right-hand side of 'instanceof' is not an object", TypeError);
diff --git a/test/mjsunit/migrations.js b/test/mjsunit/migrations.js
index a18d884..2bd70fb 100644
--- a/test/mjsunit/migrations.js
+++ b/test/mjsunit/migrations.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-ayle license that can be
// found in the LICENSE file.
-// Flags: --harmony-object-observe
// Flags: --allow-natives-syntax --track-fields --expose-gc
var global = Function('return this')();
@@ -275,10 +274,6 @@
},
},
{
- name: "observe",
- migr: function(o, i) { Object.observe(o, function(){}); },
- },
- {
name: "seal",
migr: function(o, i) { Object.seal(o); },
},
diff --git a/test/mjsunit/mirror-object.js b/test/mjsunit/mirror-object.js
index 834d7a5..cae652a 100644
--- a/test/mjsunit/mirror-object.js
+++ b/test/mjsunit/mirror-object.js
@@ -265,3 +265,27 @@
assertTrue("[[BoundArgs]]" in property_map);
assertEquals("object", property_map["[[BoundArgs]]"].value().type());
assertEquals(1, property_map["[[BoundArgs]]"].value().value().length);
+
+// Test JSProxy internal properties.
+var target = {};
+var handler = {
+ get: function (target, name, receiver) {
+ return target[name];
+ },
+ set: function(target, name, value, receiver) {
+ target[name] = value;
+ return value;
+ }
+}
+ip = debug.ObjectMirror.GetInternalProperties(new Proxy(target, handler));
+assertEquals(3, ip.length);
+var property_map = {};
+for (var i = 0; i < ip.length; i++) {
+ property_map[ip[i].name()] = ip[i];
+}
+assertTrue("[[Target]]" in property_map);
+assertEquals(target, property_map["[[Target]]"].value().value());
+assertTrue("[[Handler]]" in property_map);
+assertEquals(handler, property_map["[[Handler]]"].value().value());
+assertTrue("[[IsRevoked]]" in property_map);
+assertEquals(false, property_map["[[IsRevoked]]"].value().value());
diff --git a/test/mjsunit/mjsunit.gyp b/test/mjsunit/mjsunit.gyp
index 35ce2ff..e0a7469 100644
--- a/test/mjsunit/mjsunit.gyp
+++ b/test/mjsunit/mjsunit.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'mjsunit.isolate',
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index 9b07953..6a7c2da 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -114,6 +114,9 @@
var assertOptimized;
var assertUnoptimized;
+// Assert that a string contains another expected substring.
+var assertContains;
+
(function () { // Scope for utility functions.
@@ -416,6 +419,12 @@
throw new MjsUnitAssertionError(message);
};
+ assertContains = function(sub, value, name_opt) {
+ if (value == null ? (sub != null) : value.indexOf(sub) == -1) {
+ fail("contains '" + String(sub) + "'", value, name_opt);
+ }
+ };
+
var OptimizationStatusImpl = undefined;
var OptimizationStatus = function(fun, sync_opt) {
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index 6d786f9..228832b 100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -76,6 +76,7 @@
'unicode-test': [PASS, NO_VARIANTS],
'whitespaces': [PASS, NO_VARIANTS],
'compiler/osr-assert': [PASS, NO_VARIANTS],
+ 'ignition/regress-599001-verifyheap': [PASS, NO_VARIANTS],
'es6/string-fromcodepoint': [PASS, NO_VARIANTS],
'regress/regress-2185-2': [PASS, NO_VARIANTS],
'regress/regress-2612': [PASS, NO_VARIANTS],
@@ -149,10 +150,6 @@
# issue 4078:
'allocation-site-info': [PASS, NO_VARIANTS],
- # TODO(turbofan): The escape analysis needs some investigation.
- 'compiler/escape-analysis-deopt-5': [PASS, NO_VARIANTS],
- 'compiler/escape-analysis-9': [PASS, NO_VARIANTS],
-
##############################################################################
# Too slow in debug mode with --stress-opt mode.
'compiler/regress-stacktrace-methods': [PASS, ['mode == debug', SKIP]],
@@ -260,7 +257,6 @@
# Slow tests.
'copy-on-write-assert': [PASS, SLOW],
'debug-scopes': [PASS, SLOW],
- 'es7/object-observe': [PASS, ['mode == debug', SLOW]],
'numops-fuzz-part*': [PASS, ['mode == debug', SLOW]],
'readonly': [PASS, SLOW],
'regress/regress-1200351': [PASS, ['mode == debug', SLOW]],
@@ -274,21 +270,72 @@
'wasm/asm-wasm-literals': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el] or ignition == True', SKIP]],
'wasm/asm-wasm-copy': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el]', SKIP]],
'wasm/asm-wasm-deopt': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el]', SKIP]],
+ 'wasm/asm-wasm-switch': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el]', SKIP]],
# TODO(branelson): Figure out why ignition + asm->wasm fails embenchen.
'wasm/embenchen/*': [PASS, ['arch == arm64', SKIP], ['ignition == True', SKIP]],
- # TODO(bradnelson) Fix and re-enable.
- 'wasm/embenchen/box2d': [SKIP], # hang
- 'wasm/embenchen/lua_binarytrees': [SKIP], # fails decode
- #'wasm/embenchen/zlib': [SKIP], # fails gc-stress
-
# case-insensitive unicode regexp relies on case mapping provided by ICU.
'harmony/unicode-regexp-ignore-case': [PASS, ['no_i18n == True', FAIL]],
'harmony/unicode-regexp-ignore-case-noi18n': [FAIL, ['no_i18n == True', PASS]],
'regress/regress-5036': [PASS, ['no_i18n == True', FAIL]],
# desugaring regexp property class relies on ICU.
'harmony/regexp-property-*': [PASS, ['no_i18n == True', FAIL]],
+
+ ############################################################################
+ # Ignition
+
+ # TODO(mythria, 4780): Related to type feedback for calls in interpreter.
+ 'array-literal-feedback': [PASS, NO_IGNITION],
+ 'regress/regress-4121': [PASS, NO_IGNITION],
+
+ # TODO(mythria, 4764): lack of osr support.
+ 'regress/regress-2618': [PASS, NO_IGNITION],
+
+ # TODO(mythria, 4764): lack of osr support. The tests waits in a loop
+ # till it is optimized. So test timeouts.
+ 'array-literal-transitions': [PASS, NO_IGNITION],
+
+ # TODO(rmcilroy, 4680): Script throws RangeError as expected, but does so during
+ # eager compile of the whole script instead of during lazy compile of the function
+ # f(), so we can't catch the exception in the try/catch. Skip because on some
+ # platforms the stack limit is different and the exception doesn't fire.
+ 'regress/regress-crbug-589472': [PASS, NO_IGNITION],
+
+ # TODO(4680): Test doesn't know about three tier compiler pipeline.
+ 'assert-opt-and-deopt': [PASS, NO_IGNITION],
+
+ # BUG(rmcilroy,4989): Function is optimized without type feedback and so immediately deopts again, causing check failure in the test.
+ 'compiler/deopt-inlined-from-call': [PASS, NO_IGNITION],
+ 'compiler/increment-typefeedback': [PASS, NO_IGNITION],
+ 'compiler/manual-concurrent-recompile': [PASS, NO_IGNITION],
+ 'constant-folding-2': [PASS, NO_IGNITION],
+ 'debug-is-active': [PASS, NO_IGNITION],
+ 'deopt-with-fp-regs': [PASS, NO_IGNITION],
+ 'deserialize-optimize-inner': [PASS, NO_IGNITION],
+ 'div-mul-minus-one': [PASS, NO_IGNITION],
+ 'double-intrinsics': [PASS, NO_IGNITION],
+ 'elements-transition-hoisting': [PASS, NO_IGNITION],
+ 'es6/block-let-crankshaft': [PASS, NO_IGNITION],
+ 'es6/block-let-crankshaft-sloppy': [PASS, NO_IGNITION],
+ 'getters-on-elements': [PASS, NO_IGNITION],
+ 'harmony/do-expressions': [PASS, NO_IGNITION],
+ 'math-floor-of-div-minus-zero': [PASS, NO_IGNITION],
+ 'regress/regress-2132': [PASS, NO_IGNITION],
+ 'regress/regress-2339': [PASS, NO_IGNITION],
+ 'regress/regress-3176': [PASS, NO_IGNITION],
+ 'regress/regress-3709': [PASS, NO_IGNITION],
+ 'regress/regress-385565': [PASS, NO_IGNITION],
+ 'regress/regress-crbug-594183': [PASS, NO_IGNITION],
+ 'regress/regress-embedded-cons-string': [PASS, NO_IGNITION],
+ 'regress/regress-map-invalidation-2': [PASS, NO_IGNITION],
+ 'regress/regress-param-local-type': [PASS, NO_IGNITION],
+ 'regress/regress-prepare-break-while-recompile': [PASS, NO_IGNITION],
+ 'shift-for-integer-div': [PASS, NO_IGNITION],
+ 'sin-cos': [PASS, NO_IGNITION],
+ 'smi-mul-const': [PASS, NO_IGNITION],
+ 'smi-mul': [PASS, NO_IGNITION],
+ 'unary-minus-deopt': [PASS, NO_IGNITION],
}], # ALWAYS
['novfp3 == True', {
@@ -459,6 +506,13 @@
'unicodelctest': [PASS, SLOW],
'unicode-test': [PASS, SLOW],
'whitespaces': [PASS, TIMEOUT, SLOW],
+
+ # TODO(rmcilroy,4680): Arm64 specific timeouts.
+ 'asm/construct-double': [PASS, NO_IGNITION],
+ 'compiler/osr-one': [PASS, NO_IGNITION],
+ 'compiler/osr-two': [PASS, NO_IGNITION],
+ 'wasm/asm-wasm-i32': [PASS, NO_IGNITION],
+ 'wasm/asm-wasm-u32': [PASS, NO_IGNITION],
}], # 'arch == arm64'
['arch == arm64 and mode == debug and simulator_run == True', {
@@ -475,6 +529,11 @@
'unicodelctest-no-optimization': [PASS, TIMEOUT],
# Issue 3219:
'getters-on-elements': [PASS, ['gc_stress == True', FAIL]],
+
+ # Ignition.
+ 'es6/templates': [PASS, ['no_snap and mode == debug', NO_IGNITION]],
+ 'harmony/generators': [PASS, ['no_snap and mode == debug', NO_IGNITION]],
+ 'regress/regress-crbug-364374': [PASS, ['no_snap and mode == debug', NO_IGNITION]],
}], # 'arch == arm64 and mode == debug and simulator_run == True'
##############################################################################
@@ -497,6 +556,17 @@
'deep-recursion': [SKIP],
'regress/regress-builtinbust-7': [SKIP],
'string-localecompare': [SKIP],
+
+ # TODO(mythria,4680): All of these tests have large loops and hence slow
+ # and timeout.
+ 'compiler/osr-big': [PASS, NO_IGNITION],
+ 'compiler/osr-nested': [PASS, NO_IGNITION],
+ 'regress/regress-298269': [PASS, NO_IGNITION],
+ 'regress/regress-crbug-319860': [PASS, NO_IGNITION],
+ 'regress/regress-deep-proto': [PASS, NO_IGNITION],
+ 'try': [PASS, NO_IGNITION],
+ # Too slow for interpreter and msan.
+ 'es6/tail-call-megatest*': [PASS, NO_IGNITION],
}], # 'msan == True'
##############################################################################
@@ -542,6 +612,11 @@
'regress/regress-91008': [PASS, SLOW],
'regress/regress-json-stringify-gc': [PASS, SLOW],
'string-indexof-2': [PASS, TIMEOUT],
+
+ # TODO(rmcilroy,4680): Arm specific timeouts.
+ 'compiler/osr-one': [PASS, NO_IGNITION],
+ 'compiler/osr-two': [PASS, NO_IGNITION],
+ 'regress/regress-1257': [PASS, NO_IGNITION],
}], # 'arch == arm or arch == android_arm'
##############################################################################
@@ -759,35 +834,14 @@
}], # 'arch == ppc and simulator_run == True'
##############################################################################
-['ignition == True', {
- # TODO(yangguo,4690): assertion failures in debugger tests.
- 'debug-allscopes-on-debugger': [FAIL],
- 'es6/debug-stepnext-for': [FAIL],
- 'es6/debug-promises/stepin-constructor': [FAIL],
- 'es6/debug-stepin-proxies': [FAIL],
- 'regress/regress-crbug-119800': [FAIL],
- 'regress/regress-opt-after-debug-deopt': [FAIL],
+['arch == ppc64', {
- # TODO(yangguo,4690): flaky failures on the bots.
- 'debug-stepin-builtin-callback-opt': [SKIP],
+ # stack overflow
+ 'big-array-literal': [SKIP],
+}], # 'arch == ppc64'
- # TODO(rmcilroy,4765): assertion failures in LiveEdit tests.
- 'debug-liveedit-restart-frame': [FAIL],
- 'debug-liveedit-literals': [FAIL],
- 'debug-liveedit-3': [FAIL],
- 'debug-liveedit-1': [FAIL],
- 'debug-liveedit-2': [FAIL],
- 'debug-liveedit-patch-positions-replace': [FAIL],
- 'debug-liveedit-patch-positions': [FAIL],
- 'debug-liveedit-stepin': [FAIL],
- 'debug-liveedit-newsource': [FAIL],
- 'debug-liveedit-stack-padding': [FAIL],
- 'debug-liveedit-breakpoints': [FAIL],
- 'es6/debug-liveedit-new-target-1': [FAIL],
- 'es6/debug-liveedit-new-target-2': [FAIL],
- 'es6/debug-liveedit-new-target-3': [FAIL],
- 'es6/generators-debug-liveedit': [FAIL],
-
+##############################################################################
+['ignition or ignition_turbofan', {
# TODO(mythria, 4780): Related to type feedback for calls in interpreter.
'array-literal-feedback': [FAIL],
'regress/regress-4121': [FAIL],
@@ -798,56 +852,37 @@
# till it is optimized. So test timeouts.
'array-literal-transitions': [SKIP],
- # TODO(mythria, 4680): Relate to GC and ignition holding references to
- # objects.
- 'es6/mirror-collections': [FAIL],
-
- # TODO(mythria, 4680): Fails with context_register_count_ > 0 (0 vs. 0) when
- # trying to get a context register in BytecodeGenerator.
- 'harmony/regress/regress-4658': [FAIL, ['mode == release and dcheck_always_on == False', PASS],],
-
# TODO(rmcilroy, 4680): Script throws RangeError as expected, but does so during
# eager compile of the whole script instead of during lazy compile of the function
# f(), so we can't catch the exception in the try/catch. Skip because on some
# platforms the stack limit is different and the exception doesn't fire.
'regress/regress-crbug-589472': [SKIP],
- # Debugger test cases that pass with ignition, but not full-codegen.
- # These differences between full-codegen and ignition are deliberate.
- 'ignition/elided-instruction-no-ignition': [FAIL],
-
'wasm/asm-wasm-f32': [PASS, ['arch in [arm64]', SKIP]],
'wasm/asm-wasm-f64': [PASS, ['arch in [arm64]', SKIP]],
-}], # ignition == True
-['ignition == True and system == windows', {
- # TODO(rmcilroy,4680): Crash on windows nosnap shared.
- 'regress/regress-crbug-352058': [PASS, ['no_snap == True', SKIP]],
+ # TODO(rmcilroy,titzer): Times out after
+ # https://codereview.chromium.org/1951013002 .
+ 'regress/regress-599717': [PASS, ['tsan', SKIP]],
+}], # ignition or ignition_turbofan
- # TODO(513471): Attempting to optimize generator hits unreachable path.
- 'regress/regress-crbug-513471': [PASS, ['no_snap == True', SKIP]],
-
- # TODO(rmcilroy,4680): Fails on win32 debug.
- 'div-mod': [PASS, ['arch == ia32', SKIP]],
-}], # ignition == True and system == windows
-
-['ignition == True and arch == arm64', {
+['(ignition or ignition_turbofan) and arch == arm64', {
# TODO(rmcilroy,4680): Arm64 specific timeouts.
'asm/construct-double': [SKIP],
'compiler/osr-one': [SKIP],
'compiler/osr-two': [SKIP],
'wasm/asm-wasm-i32': [SKIP],
'wasm/asm-wasm-u32': [SKIP],
-}], # ignition == True and arch == arm64
+}], # (ignition or ignition_turbofan) and arch == arm64
-['ignition == True and arch == arm', {
+['(ignition or ignition_turbofan) and arch == arm', {
# TODO(rmcilroy,4680): Arm specific timeouts.
'compiler/osr-one': [SKIP],
'compiler/osr-two': [SKIP],
'regress/regress-1257': [SKIP],
-}], # ignition == True and arch == arm
+}], # (ignition or ignition_turbofan) and arch == arm
-['ignition == True and msan', {
+['(ignition or ignition_turbofan) and msan', {
# TODO(mythria,4680): All of these tests have large loops and hence slow
# and timeout.
'compiler/osr-big': [SKIP],
@@ -858,55 +893,7 @@
'try': [SKIP],
# Too slow for interpreter and msan.
'es6/tail-call-megatest*': [SKIP],
-}], # ignition == True and msan
-
-['ignition == True and gc_stress == True', {
- # TODO(oth,4680): failures from the bots.
- 'es6/debug-step-destructuring-bind': [SKIP],
- 'es6/debug-stepin-collections-foreach': [SKIP],
- 'ignition/elided-instruction': [SKIP],
- 'regress/regress-269': [SKIP],
-}], # ignition == True and gc_stress == True
-
-['ignition == False', {
- # Debugger test cases that pass with full-codegen, but not ignition.
- # These differences between full-codegen and ignition are deliberate.
- 'ignition/elided-instruction': [FAIL],
-}], # ignition == False
-
-['ignition == True and system == windows and no_snap', {
- # TODO(rmcilroy): Fail with nosnap and shared libraries.
- 'es6/array-from': [FAIL],
- 'es6/classes-subclass-builtins': [FAIL],
- 'es6/computed-property-names-classes': [FAIL],
- 'es6/computed-property-names-object-literals-methods': [FAIL],
- 'es6/debug-stepin-generators': [FAIL],
- 'es6/destructuring': [FAIL],
- 'es6/destructuring-assignment': [FAIL],
- 'es6/generators-iteration': [FAIL],
- 'es6/generators-mirror': [FAIL],
- 'es6/generators-parsing': [FAIL],
- 'es6/generators-poisoned-properties': [FAIL],
- 'es6/generators-relocation': [FAIL],
- 'es6/generators-states': [FAIL],
- 'es6/iteration-semantics': [FAIL],
- 'es6/object-literals-method': [FAIL],
- 'es6/object-literals-super': [FAIL],
- 'es6/promises': [FAIL],
- 'es6/regress/regress-2681': [FAIL],
- 'es6/regress/regress-2691': [FAIL],
- 'es6/regress/regress-3280': [FAIL],
- 'es6/spread-array': [FAIL],
- 'es6/spread-call': [FAIL],
- 'es6/typedarray': [FAIL],
- 'es6/typedarray-from': [FAIL],
- 'harmony/function-sent': [FAIL],
- 'harmony/generators': [FAIL],
- 'harmony/iterator-close': [FAIL],
- 'harmony/regress/regress-4482': [FAIL],
- 'messages': [FAIL],
- 'regress-3225': [FAIL],
-}], # ignition == True and system == windows and no_snap
+}], # (ignition or ignition_turbofan) and msan
##############################################################################
['gcov_coverage', {
diff --git a/test/mjsunit/object-define-property.js b/test/mjsunit/object-define-property.js
index 4c495c6..380a71a 100644
--- a/test/mjsunit/object-define-property.js
+++ b/test/mjsunit/object-define-property.js
@@ -467,8 +467,7 @@
}
-// Test runtime calls to DefineDataPropertyUnchecked and
-// DefineAccessorPropertyUnchecked - make sure we don't
+// Test runtime calls to DefineAccessorPropertyUnchecked - make sure we don't
// crash.
try {
%DefineAccessorPropertyUnchecked(0, 0, 0, 0, 0);
@@ -477,29 +476,11 @@
}
try {
- %DefineDataPropertyUnchecked(0, 0, 0, 0);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
-try {
- %DefineDataPropertyUnchecked(null, null, null, null);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
-try {
%DefineAccessorPropertyUnchecked(null, null, null, null, null);
} catch (e) {
assertTrue(/illegal access/.test(e));
}
-try {
- %DefineDataPropertyUnchecked({}, null, null, null);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
// Defining properties null should fail even when we have
// other allowed values
try {
@@ -508,12 +489,6 @@
assertTrue(/illegal access/.test(e));
}
-try {
- %DefineDataPropertyUnchecked(null, 'foo', 0, 0);
-} catch (e) {
- assertTrue(/illegal access/.test(e));
-}
-
// Test that all possible differences in step 6 in DefineOwnProperty are
// exercised, i.e., any difference in the given property descriptor and the
// existing properties should not return true, but throw an error if the
diff --git a/test/mjsunit/osr-elements-kind.js b/test/mjsunit/osr-elements-kind.js
index bd15ef3..aee7017 100644
--- a/test/mjsunit/osr-elements-kind.js
+++ b/test/mjsunit/osr-elements-kind.js
@@ -30,7 +30,7 @@
// Limit the number of stress runs to reduce polymorphism it defeats some of the
// assumptions made about how elements transitions work because transition stubs
// end up going generic.
-// Flags: --stress-runs=2
+// Flags: --stress-runs=1
var elements_kind = {
fast_smi_only : 'fast smi only elements',
diff --git a/test/mjsunit/regexp-compile.js b/test/mjsunit/regexp-compile.js
index 92c3f7b..f001780 100644
--- a/test/mjsunit/regexp-compile.js
+++ b/test/mjsunit/regexp-compile.js
@@ -42,3 +42,7 @@
assertEquals(["y", "y"], re.exec("axyb"));
assertEquals(2, re.compile.length);
+
+// If RegExp parsing fails, the RegExp is not modified
+var r = /./; try { r.compile('? invalid'); } catch(err){}
+assertEquals("/./", r.toString());
diff --git a/test/mjsunit/regexp-lastIndex.js b/test/mjsunit/regexp-lastIndex.js
deleted file mode 100644
index 1445b9b..0000000
--- a/test/mjsunit/regexp-lastIndex.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// lastIndex is set according to funny rules. It is typically set only
-// for global or sticky RegExps, but on a failure to find a match, it is
-// set unconditionally. If a set fails, then it acts as if in strict mode
-// and throws.
-
-var re = /x/;
-Object.defineProperty(re, 'lastIndex', {writable: false});
-assertThrows(() => re.exec(""), TypeError);
-assertEquals(["x"], re.exec("x"));
-
-var re = /x/y;
-Object.defineProperty(re, 'lastIndex', {writable: false});
-assertThrows(() => re.exec(""), TypeError);
-assertThrows(() => re.exec("x"), TypeError);
diff --git a/test/mjsunit/regress-604044.js b/test/mjsunit/regress-604044.js
new file mode 100644
index 0000000..58ccfbe
--- /dev/null
+++ b/test/mjsunit/regress-604044.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --min-preparse-length 1
+
+(function(_ = function() {}){})
diff --git a/test/mjsunit/regress/regress-3315.js b/test/mjsunit/regress/regress-3315.js
deleted file mode 100644
index bfd7df2..0000000
--- a/test/mjsunit/regress/regress-3315.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Flags: --harmony-object-observe
-
-var indexZeroCallCount = 0;
-var indexOneCallCount = 0;
-var lengthCallCount = 0;
-var acceptList = {
- get 0() {
- indexZeroCallCount++;
- return 'foo';
- },
- get 1() {
- indexOneCallCount++;
- return 'bar';
- },
- get length() {
- lengthCallCount++;
- return 1;
- }
-};
-
-Object.observe({}, function(){}, acceptList);
-assertEquals(1, lengthCallCount);
-assertEquals(1, indexZeroCallCount);
-assertEquals(0, indexOneCallCount);
diff --git a/test/mjsunit/regress/regress-353004.js b/test/mjsunit/regress/regress-353004.js
index 658fd6d..7e1fb7e 100644
--- a/test/mjsunit/regress/regress-353004.js
+++ b/test/mjsunit/regress/regress-353004.js
@@ -41,19 +41,21 @@
var buffer5 = new ArrayBuffer(100 * 1024);
-var buffer6 = buffer5.slice({valueOf : function() {
- %ArrayBufferNeuter(buffer5);
- return 0;
-}}, 100 * 1024 * 1024);
-assertEquals(0, buffer6.byteLength);
+assertThrows(function() {
+ buffer5.slice({valueOf : function() {
+ %ArrayBufferNeuter(buffer5);
+ return 0;
+ }}, 100 * 1024 * 1024);
+}, TypeError);
var buffer7 = new ArrayBuffer(100 * 1024 * 1024);
-var buffer8 = buffer7.slice(0, {valueOf : function() {
- %ArrayBufferNeuter(buffer7);
- return 100 * 1024 * 1024;
-}});
-assertEquals(0, buffer8.byteLength);
+assertThrows(function() {
+ buffer7.slice(0, {valueOf : function() {
+ %ArrayBufferNeuter(buffer7);
+ return 100 * 1024 * 1024;
+ }});
+}, TypeError);
var buffer9 = new ArrayBuffer(1024);
var array9 = new Uint8Array(buffer9);
diff --git a/test/mjsunit/regress/regress-356589.js b/test/mjsunit/regress/regress-356589.js
deleted file mode 100644
index a47f51b..0000000
--- a/test/mjsunit/regress/regress-356589.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --harmony-object-observe
-
-// This test passes if it does not crash in debug mode
-
-arr = ['a', 'b', 'c', 'd'];
-Object.defineProperty(arr.__proto__, '0', { get: function(){} });
-Object.defineProperty(arr, '2', {get: function(){} });
-Object.observe(arr, function() {});
-arr.length = 2;
diff --git a/test/mjsunit/regress/regress-3926.js b/test/mjsunit/regress/regress-3926.js
index 4720c1b..4d9b298 100644
--- a/test/mjsunit/regress/regress-3926.js
+++ b/test/mjsunit/regress/regress-3926.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-let
-
// See: http://code.google.com/p/v8/issues/detail?id=3926
// Switch statements should disable hole check elimination
diff --git a/test/mjsunit/regress/regress-417709a.js b/test/mjsunit/regress/regress-417709a.js
deleted file mode 100644
index 5500be2..0000000
--- a/test/mjsunit/regress/regress-417709a.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe
-// Flags: --stack-size=100
-
-var a = [];
-
-Object.observe(a, function() {});
-
-function f(a, x) {
- a.length = x;
- f(a, x + 1);
-}
-
-assertThrows(function() { f(a, 1); }, RangeError);
diff --git a/test/mjsunit/regress/regress-417709b.js b/test/mjsunit/regress/regress-417709b.js
deleted file mode 100644
index 4d9572e..0000000
--- a/test/mjsunit/regress/regress-417709b.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe --stack-size=100
-
-var a = [];
-
-Array.observe(a, function() {});
-
-function f(a, x) {
- a.length = x;
- f(a, x + 1);
-}
-
-assertThrows(function() { f(a, 1); }, RangeError);
diff --git a/test/mjsunit/regress/regress-4693.js b/test/mjsunit/regress/regress-4693.js
index 13b4e2b..2c31cd9 100644
--- a/test/mjsunit/regress/regress-4693.js
+++ b/test/mjsunit/regress/regress-4693.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Flags: --harmony-sloppy-function
// In sloppy mode we allow function redeclarations within blocks for webcompat.
(function() {
diff --git a/test/mjsunit/regress/regress-4908.js b/test/mjsunit/regress/regress-4908.js
new file mode 100644
index 0000000..ec618b3
--- /dev/null
+++ b/test/mjsunit/regress/regress-4908.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --always-opt --no-lazy
+
+(function() { ((s = 17, y = s) => s)() })();
diff --git a/test/mjsunit/regress/regress-4945.js b/test/mjsunit/regress/regress-4945.js
new file mode 100644
index 0000000..8e595e6
--- /dev/null
+++ b/test/mjsunit/regress/regress-4945.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function* g(o) {
+ yield 'x' in o;
+}
+
+assertTrue(g({x: 1}).next().value);
+assertFalse(g({}).next().value);
diff --git a/test/mjsunit/regress/regress-4964.js b/test/mjsunit/regress/regress-4964.js
new file mode 100644
index 0000000..d834708
--- /dev/null
+++ b/test/mjsunit/regress/regress-4964.js
@@ -0,0 +1,22 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Neutered source
+var ab = new ArrayBuffer(10);
+ab.constructor = { get [Symbol.species]() { %ArrayBufferNeuter(ab); return ArrayBuffer; } };
+assertThrows(() => ab.slice(0), TypeError);
+
+// Neutered target
+class NeuteredArrayBuffer extends ArrayBuffer {
+ constructor(...args) {
+ super(...args);
+ %ArrayBufferNeuter(this);
+ }
+}
+
+var ab2 = new ArrayBuffer(10);
+ab2.constructor = NeuteredArrayBuffer;
+assertThrows(() => ab2.slice(0), TypeError);
diff --git a/test/mjsunit/regress/regress-4967.js b/test/mjsunit/regress/regress-4967.js
new file mode 100644
index 0000000..9b36405
--- /dev/null
+++ b/test/mjsunit/regress/regress-4967.js
@@ -0,0 +1,9 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(() => {
+ new class extends Object {
+ constructor() { (() => delete super[super()])(); }
+ }
+}, ReferenceError);
diff --git a/test/mjsunit/regress/regress-4971.js b/test/mjsunit/regress/regress-4971.js
new file mode 100644
index 0000000..041f6c2
--- /dev/null
+++ b/test/mjsunit/regress/regress-4971.js
@@ -0,0 +1,41 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function TestDeoptInNamedSuperGetter() {
+ class C { m() { return 23 } }
+ class D extends C { f() { return super.boom() } }
+
+ var should_deoptimize_caller = false;
+ Object.defineProperty(C.prototype, "boom", { get: function() {
+ if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f);
+ return this.m
+ }})
+
+ assertEquals(23, new D().f());
+ assertEquals(23, new D().f());
+ %OptimizeFunctionOnNextCall(D.prototype.f);
+ assertEquals(23, new D().f());
+ should_deoptimize_caller = true;
+ assertEquals(23, new D().f());
+})();
+
+(function TestDeoptInKeyedSuperGetter() {
+ class C { m() { return 23 } }
+ class D extends C { f(name) { return super[name]() } }
+
+ var should_deoptimize_caller = false;
+ Object.defineProperty(C.prototype, "boom", { get: function() {
+ if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f);
+ return this.m
+ }})
+
+ assertEquals(23, new D().f("boom"));
+ assertEquals(23, new D().f("boom"));
+ %OptimizeFunctionOnNextCall(D.prototype.f);
+ assertEquals(23, new D().f("boom"));
+ should_deoptimize_caller = true;
+ assertEquals(23, new D().f("boom"));
+})();
diff --git a/test/mjsunit/regress/regress-5033.js b/test/mjsunit/regress/regress-5033.js
new file mode 100644
index 0000000..728094f
--- /dev/null
+++ b/test/mjsunit/regress/regress-5033.js
@@ -0,0 +1,21 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var test = function() {
+ var t = Date.now(); // Just any non-constant double value.
+ var o = {
+ ['p']: 1,
+ t
+ };
+};
+
+function caller() {
+ test();
+}
+caller();
+caller();
+%OptimizeFunctionOnNextCall(caller);
+caller();
diff --git a/test/mjsunit/regress/regress-5178.js b/test/mjsunit/regress/regress-5178.js
new file mode 100644
index 0000000..bc0dd11
--- /dev/null
+++ b/test/mjsunit/regress/regress-5178.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(() => {
+ try { throw {} } catch({a=b, b}) { a+b }
+}, ReferenceError);
diff --git a/test/mjsunit/regress/regress-5199.js b/test/mjsunit/regress/regress-5199.js
new file mode 100644
index 0000000..818e71a
--- /dev/null
+++ b/test/mjsunit/regress/regress-5199.js
@@ -0,0 +1,5 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertTrue(/(a[\u1000A])+/i.test('aa'));
diff --git a/test/mjsunit/regress/regress-520029.js b/test/mjsunit/regress/regress-520029.js
index 299dd75..9a1d200 100644
--- a/test/mjsunit/regress/regress-520029.js
+++ b/test/mjsunit/regress/regress-520029.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy-let --harmony-sloppy
-
// Test that hoisting a function out of a lexical scope does not
// lead to a parsing error
diff --git a/test/mjsunit/regress/regress-536751.js b/test/mjsunit/regress/regress-536751.js
index 0707e00..a63fae3 100644
--- a/test/mjsunit/regress/regress-536751.js
+++ b/test/mjsunit/regress/regress-536751.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-function --harmony-sloppy-let
// Flags: --no-harmony-restrictive-declarations
// At some point, this code led to DCHECK errors in debug mode
diff --git a/test/mjsunit/regress/regress-542099.js b/test/mjsunit/regress/regress-542099.js
index eef4953..6345fd4 100644
--- a/test/mjsunit/regress/regress-542099.js
+++ b/test/mjsunit/regress/regress-542099.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-function
// Flags: --no-harmony-restrictive-declarations
// Previously, this caused a CHECK fail in debug mode
diff --git a/test/mjsunit/regress/regress-542100.js b/test/mjsunit/regress/regress-542100.js
index 70fb5dc..c16e628 100644
--- a/test/mjsunit/regress/regress-542100.js
+++ b/test/mjsunit/regress/regress-542100.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy --harmony-sloppy-function
// Flags: --no-harmony-restrictive-declarations
(function() {
diff --git a/test/mjsunit/regress/regress-585041.js b/test/mjsunit/regress/regress-585041.js
new file mode 100644
index 0000000..c072ed2
--- /dev/null
+++ b/test/mjsunit/regress/regress-585041.js
@@ -0,0 +1,21 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f(arr, i) {
+ arr[i] = 50;
+}
+
+function boom(dummy) {
+ var arr = new Array(10);
+ f(arr, 10);
+ if (dummy) {
+ f(arr, -2147483648);
+ }
+}
+
+boom(false);
+%OptimizeFunctionOnNextCall(boom);
+boom(false);
diff --git a/test/mjsunit/regress/regress-592352.js b/test/mjsunit/regress/regress-592352.js
new file mode 100644
index 0000000..f3477c0
--- /dev/null
+++ b/test/mjsunit/regress/regress-592352.js
@@ -0,0 +1,20 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --allow-natives-syntax
+
+function __f_76() {
+ "use asm";
+ function __f_72() {
+ %OptimizeFunctionOnNextCall();
+ }
+ return {__f_72:__f_72};
+}
+
+try {
+ Wasm.instantiateModuleFromAsm( __f_76.toString());
+ assertTrue(false);
+} catch (e) {
+ print("Caught: " + e);
+}
diff --git a/test/mjsunit/regress/regress-599068-func-bindings.js b/test/mjsunit/regress/regress-599068-func-bindings.js
new file mode 100644
index 0000000..887c000
--- /dev/null
+++ b/test/mjsunit/regress/regress-599068-func-bindings.js
@@ -0,0 +1,45 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Tests function bindings are correctly handled in ignition.
+(function f() {
+ function assignSloppy() {
+ f = 0;
+ }
+ assertDoesNotThrow(assignSloppy);
+
+ function assignStrict() {
+ 'use strict';
+ f = 0;
+ }
+ assertThrows(assignStrict, TypeError);
+
+ function assignStrictLookup() {
+ eval("'use strict'; f = 1;");
+ }
+ assertThrows(assignStrictLookup, TypeError);
+})();
+
+// Tests for compound assignments which are handled differently
+// in crankshaft.
+(function f() {
+ function assignSloppy() {
+ f += "x";
+ }
+ assertDoesNotThrow(assignSloppy);
+ assertDoesNotThrow(assignSloppy);
+ %OptimizeFunctionOnNextCall(assignSloppy);
+ assertDoesNotThrow(assignSloppy);
+
+ function assignStrict() {
+ 'use strict';
+ f += "x";
+ }
+ assertThrows(assignStrict, TypeError);
+ assertThrows(assignStrict, TypeError);
+ %OptimizeFunctionOnNextCall(assignStrict);
+ assertThrows(assignStrict, TypeError);
+})();
diff --git a/test/mjsunit/regress/regress-599717.js b/test/mjsunit/regress/regress-599717.js
new file mode 100644
index 0000000..2cfd7fc
--- /dev/null
+++ b/test/mjsunit/regress/regress-599717.js
@@ -0,0 +1,25 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+function __f_61(stdlib, buffer) {
+ "use asm";
+ var __v_14 = new stdlib.Float64Array(buffer);
+ function __f_74() {
+ var __v_35 = 6.0;
+ __v_14[2] = __v_35 + 1.0;
+ }
+ return {__f_74: __f_74};
+}
+var ok = false;
+try {
+ var __v_12 = new ArrayBuffer(2147483648);
+ ok = true;
+} catch (e) {
+ // Can happen on 32 bit systems.
+}
+if (ok) {
+ var module = Wasm.instantiateModuleFromAsm( __f_61.toString(), null, __v_12);
+}
diff --git a/test/mjsunit/regress/regress-599719.js b/test/mjsunit/regress/regress-599719.js
new file mode 100644
index 0000000..579fa1f
--- /dev/null
+++ b/test/mjsunit/regress/regress-599719.js
@@ -0,0 +1,24 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-wasm
+
+function __f_7() {
+ %DeoptimizeFunction(__f_5);
+}
+function __f_8(global, env) {
+ "use asm";
+ var __f_7 = env.__f_7;
+ function __f_9(i4, i5) {
+ i4 = i4 | 0;
+ i5 = i5 | 0;
+ __f_7();
+ }
+ return {'__f_9': __f_9}
+}
+function __f_5() {
+ var __v_5 = Wasm.instantiateModuleFromAsm( __f_8.toString(), {'__f_7': __f_7});
+ __v_5.__f_9(0, 0, 0);
+}
+__f_5();
diff --git a/test/mjsunit/regress/regress-605470.js b/test/mjsunit/regress/regress-605470.js
new file mode 100644
index 0000000..722e8ae
--- /dev/null
+++ b/test/mjsunit/regress/regress-605470.js
@@ -0,0 +1,17 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --ignition
+
+function function_with_m_args(m) {
+ var source = '(function f() { return; })(';
+ for (var arg = 0; arg < m ; arg++) {
+ if (arg != 0) source += ',';
+ source += arg;
+ }
+ source += ')';
+ return eval(source);
+}
+
+function_with_m_args(0x7FFF);
diff --git a/test/mjsunit/regress/regress-605488.js b/test/mjsunit/regress/regress-605488.js
new file mode 100644
index 0000000..03e6a38
--- /dev/null
+++ b/test/mjsunit/regress/regress-605488.js
@@ -0,0 +1,12 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+try {
+ Wasm.instantiateModuleFromAsm("");
+ assertTrue(false);
+} catch (e) {
+ print("Caught: " + e);
+}
diff --git a/test/mjsunit/regress/regress-606021.js b/test/mjsunit/regress/regress-606021.js
new file mode 100644
index 0000000..54b283e
--- /dev/null
+++ b/test/mjsunit/regress/regress-606021.js
@@ -0,0 +1,32 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo() {
+ return function(c) {
+ var double_var = [3.0, 3.5][0];
+ var literal = c ? [1, double_var] : [double_var, 3.5];
+ return literal[0];
+ };
+}
+
+var f1 = foo();
+var f2 = foo();
+
+// Both closures point to full code.
+f1(false);
+f2(false);
+
+// Optimize f1, but don't initialize the [1, double_var] literal.
+%OptimizeFunctionOnNextCall(f1);
+f1(false);
+
+// Initialize the [1, double_var] literal, and transition the boilerplate to
+// double.
+f2(true);
+
+// Trick crankshaft into writing double_var at the wrong position.
+var l = f1(true);
+assertEquals(1, l);
diff --git a/test/mjsunit/regress/regress-608630.js b/test/mjsunit/regress/regress-608630.js
new file mode 100644
index 0000000..a0f3c43
--- /dev/null
+++ b/test/mjsunit/regress/regress-608630.js
@@ -0,0 +1,69 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+var __v_5 = {};
+var __v_35 = {};
+var __v_44 = {};
+var __v_43 = {};
+
+try {
+__v_1 = 1;
+__v_2 = {
+ get: function() { return function() {} },
+ has() { return true },
+ getOwnPropertyDescriptor: function() {
+ if (__v_1-- == 0) throw "please die";
+ return {value: function() {}, configurable: true};
+ }
+};
+__v_3 = new Proxy({}, __v_2);
+__v_30 = Object.create(__v_35);
+with (__v_5) { f() }
+} catch(e) { print("Caught: " + e); }
+
+function __f_1(asmfunc, expect) {
+ var __v_1 = asmfunc.toString();
+ var __v_2 = __v_1.replace(new RegExp("use asm"), "");
+ var __v_39 = {Math: Math};
+ var __v_4 = eval("(" + __v_2 + ")")(__v_3);
+ print("Testing " + asmfunc.name + " (js)...");
+ __v_44.valueOf = __v_43;
+ expect(__v_4);
+ print("Testing " + asmfunc.name + " (asm.js)...");
+ var __v_5 = asmfunc(__v_3);
+ expect(__v_5);
+ print("Testing " + asmfunc.name + " (wasm)...");
+ var __v_6 = Wasm.instantiateModuleFromAsm(__v_1, __v_3);
+ expect(__v_6);
+}
+function __f_2() {
+ "use asm";
+ function __f_3() { return 0; }
+ function __f_4() { return 1; }
+ function __f_5() { return 4; }
+ function __f_6() { return 64; }
+ function __f_7() { return 137; }
+ function __f_8() { return 128; }
+ function __f_9() { return -1; }
+ function __f_10() { return 1000; }
+ function __f_11() { return 2000000; }
+ function __f_12() { return 2147483647; }
+ return {__f_3: __f_3, __f_4: __f_4, __f_5: __f_5, __f_6: __f_6, __f_7: __f_7, __f_8: __f_8,
+ __f_9: __f_9, __f_10: __f_10, __f_11, __f_12: __f_12};
+}
+try {
+__f_1(__f_2, function(module) {
+ assertEquals(0, module.__f_3());
+ assertEquals(1, module.__f_4());
+ assertEquals(4, module.__f_5());
+ assertEquals(64, module.__f_6());
+ assertEquals(128, module.__f_8());
+ assertEquals(-1, module.__f_9());
+ assertEquals(1000, module.__f_10());
+ assertEquals(2000000, module.__f_11());
+ assertEquals(2147483647, module.__f_12());
+});
+} catch(e) { print("Caught: " + e); }
diff --git a/test/mjsunit/regress/regress-610633.js b/test/mjsunit/regress/regress-610633.js
new file mode 100644
index 0000000..8ee0e7e
--- /dev/null
+++ b/test/mjsunit/regress/regress-610633.js
@@ -0,0 +1,40 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function getLength(a) {
+ return a.length;
+}
+
+function getByteLength(a) {
+ return a.byteLength;
+}
+
+function getByteOffset(a) {
+ return a.byteOffset;
+}
+
+var a = new Uint8Array([1, 2, 3]);
+getLength(a);
+getLength(a);
+
+Object.defineProperty(a.__proto__, 'length', {value: 42});
+
+assertEquals(42, getLength(a));
+assertEquals(42, a.length);
+
+getByteLength(a);
+getByteLength(a);
+
+Object.defineProperty(a.__proto__, 'byteLength', {value: 42});
+
+assertEquals(42, getByteLength(a));
+assertEquals(42, a.byteLength);
+
+getByteOffset(a);
+getByteOffset(a);
+
+Object.defineProperty(a.__proto__, 'byteOffset', {value: 42});
+
+assertEquals(42, getByteOffset(a));
+assertEquals(42, a.byteOffset);
diff --git a/test/mjsunit/regress/regress-616386.js b/test/mjsunit/regress/regress-616386.js
new file mode 100644
index 0000000..d462ab7
--- /dev/null
+++ b/test/mjsunit/regress/regress-616386.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --no-lazy
+
+assertEquals(0, ((y = (function(a2) { bbbb = a2 }), bbbb = eval('1')) => {y(0); return bbbb})())
+assertEquals(0, (({y = (function(a2) { bbbb = a2 }), bbbb = eval('1')} = {}) => {y(0); return bbbb})())
+assertEquals(0, (function (y = (function(a2) { bbbb = a2 }), bbbb = eval('1')) {y(0); return bbbb})())
+assertEquals(0, (function ({y = (function(a2) { bbbb = a2 }), bbbb = eval('1')} = {}) {y(0); return bbbb})())
diff --git a/test/mjsunit/regress/regress-619382.js b/test/mjsunit/regress/regress-619382.js
new file mode 100644
index 0000000..971318a
--- /dev/null
+++ b/test/mjsunit/regress/regress-619382.js
@@ -0,0 +1,35 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// // Use of this source code is governed by a BSD-style license that can be
+// // found in the LICENSE file.
+//
+// // Flags: --expose-gc --always-opt
+
+(function __f_9() {
+})();
+function __f_16(ctor_desc) {
+ var __v_22 = 5;
+ var __v_25 = [];
+ gc(); gc(); gc();
+ for (var __v_18 = 0; __v_18 < __v_22; __v_18++) {
+ __v_25[__v_18] = ctor_desc.ctor.apply();
+ }
+}
+var __v_28 = [
+ {
+ ctor: function(__v_27) { return {a: __v_27}; },
+ args: function() { return [1.5 + __v_18]; } },
+ {
+ ctor: function(__v_27) { var __v_21 = []; __v_21[1] = __v_27; __v_21[200000] = __v_27; return __v_21; },
+ args: function() { return [1.5 + __v_18]; } },
+ {
+ ctor: function() {
+ } }
+];
+var __v_26 = [
+ {
+ }];
+ __v_26.forEach(function(__v_16) {
+ __v_28.forEach(function(ctor) {
+ __f_16(ctor);
+ });
+ });
diff --git a/test/mjsunit/regress/regress-620553.js b/test/mjsunit/regress/regress-620553.js
new file mode 100644
index 0000000..461b9bb
--- /dev/null
+++ b/test/mjsunit/regress/regress-620553.js
@@ -0,0 +1,17 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc
+
+var o0 = [];
+var o1 = [];
+var cnt = 0;
+o1.__defineGetter__(0, function() {
+ if (cnt++ > 2) return;
+ o0.shift();
+ gc();
+ o0.push(0);
+ o0.concat(o1);
+});
+o1[0];
diff --git a/test/mjsunit/regress/regress-621869.js b/test/mjsunit/regress/regress-621869.js
new file mode 100644
index 0000000..db34064
--- /dev/null
+++ b/test/mjsunit/regress/regress-621869.js
@@ -0,0 +1,18 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc
+
+var o0 = [];
+var o1 = [];
+var cnt = 0;
+var only_scavenge = true;
+o1.__defineGetter__(0, function() {
+ if (cnt++ > 2) return;
+ o0.shift();
+ gc(only_scavenge);
+ o0.push((64));
+ o0.concat(o1);
+});
+o1[0];
diff --git a/test/mjsunit/regress/regress-674753.js b/test/mjsunit/regress/regress-674753.js
index b3704ea..d8a504a 100644
--- a/test/mjsunit/regress/regress-674753.js
+++ b/test/mjsunit/regress/regress-674753.js
@@ -25,62 +25,138 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
+var undetectable = %GetUndetectable();
+
// Number
assertTrue(typeof 0 == 'number');
assertTrue(typeof 0 === 'number');
+assertFalse(typeof 0 != 'number');
+assertFalse(typeof 0 !== 'number');
assertTrue(typeof 1.2 == 'number');
assertTrue(typeof 1.2 === 'number');
+assertFalse(typeof 1.2 != 'number');
+assertFalse(typeof 1.2 !== 'number');
+assertTrue(typeof 'x' != 'number');
+assertTrue(typeof 'x' !== 'number');
assertFalse(typeof 'x' == 'number');
assertFalse(typeof 'x' === 'number');
+assertTrue(typeof Object() != 'number');
+assertTrue(typeof Object() !== 'number');
+assertFalse(typeof Object() == 'number');
+assertFalse(typeof Object() === 'number');
// String
assertTrue(typeof 'x' == 'string');
assertTrue(typeof 'x' === 'string');
+assertFalse(typeof 'x' != 'string');
+assertFalse(typeof 'x' !== 'string');
assertTrue(typeof ('x' + 'x') == 'string');
assertTrue(typeof ('x' + 'x') === 'string');
+assertFalse(typeof ('x' + 'x') != 'string');
+assertFalse(typeof ('x' + 'x') !== 'string');
+assertTrue(typeof 1 != 'string');
+assertTrue(typeof 1 !== 'string');
assertFalse(typeof 1 == 'string');
assertFalse(typeof 1 === 'string');
+assertTrue(typeof Object() != 'string');
+assertTrue(typeof Object() !== 'string');
assertFalse(typeof Object() == 'string');
assertFalse(typeof Object() === 'string');
// Boolean
assertTrue(typeof true == 'boolean');
assertTrue(typeof true === 'boolean');
+assertFalse(typeof true != 'boolean');
+assertFalse(typeof true !== 'boolean');
assertTrue(typeof false == 'boolean');
assertTrue(typeof false === 'boolean');
+assertFalse(typeof false != 'boolean');
+assertFalse(typeof false !== 'boolean');
+assertTrue(typeof 1 != 'boolean');
+assertTrue(typeof 1 !== 'boolean');
assertFalse(typeof 1 == 'boolean');
assertFalse(typeof 1 === 'boolean');
+assertTrue(typeof 'x' != 'boolean');
+assertTrue(typeof 'x' !== 'boolean');
+assertFalse(typeof 'x' == 'boolean');
+assertFalse(typeof 'x' === 'boolean');
+assertTrue(typeof Object() != 'boolean');
+assertTrue(typeof Object() !== 'boolean');
assertFalse(typeof Object() == 'boolean');
assertFalse(typeof Object() === 'boolean');
// Undefined
assertTrue(typeof void 0 == 'undefined');
assertTrue(typeof void 0 === 'undefined');
+assertFalse(typeof void 0 != 'undefined');
+assertFalse(typeof void 0 !== 'undefined');
+assertTrue(typeof 1 != 'undefined');
+assertTrue(typeof 1 !== 'undefined');
assertFalse(typeof 1 == 'undefined');
assertFalse(typeof 1 === 'undefined');
+assertTrue(typeof null != 'undefined');
+assertTrue(typeof null !== 'undefined');
+assertFalse(typeof null == 'undefined');
+assertFalse(typeof null === 'undefined');
+assertTrue(typeof Object() != 'undefined');
+assertTrue(typeof Object() !== 'undefined');
assertFalse(typeof Object() == 'undefined');
assertFalse(typeof Object() === 'undefined');
+assertTrue(typeof undetectable == 'undefined');
+assertTrue(typeof undetectable === 'undefined');
+assertFalse(typeof undetectable != 'undefined');
+assertFalse(typeof undetectable !== 'undefined');
// Function
assertTrue(typeof Object == 'function');
assertTrue(typeof Object === 'function');
+assertFalse(typeof Object != 'function');
+assertFalse(typeof Object !== 'function');
+assertTrue(typeof 1 != 'function');
+assertTrue(typeof 1 !== 'function');
assertFalse(typeof 1 == 'function');
assertFalse(typeof 1 === 'function');
+assertTrue(typeof Object() != 'function');
+assertTrue(typeof Object() !== 'function');
assertFalse(typeof Object() == 'function');
assertFalse(typeof Object() === 'function');
+assertTrue(typeof undetectable != 'function');
+assertTrue(typeof undetectable !== 'function');
+assertFalse(typeof undetectable == 'function');
+assertFalse(typeof undetectable === 'function');
// Object
assertTrue(typeof Object() == 'object');
assertTrue(typeof Object() === 'object');
+assertFalse(typeof Object() != 'object');
+assertFalse(typeof Object() !== 'object');
assertTrue(typeof new String('x') == 'object');
assertTrue(typeof new String('x') === 'object');
+assertFalse(typeof new String('x') != 'object');
+assertFalse(typeof new String('x') !== 'object');
assertTrue(typeof ['x'] == 'object');
assertTrue(typeof ['x'] === 'object');
+assertFalse(typeof ['x'] != 'object');
+assertFalse(typeof ['x'] !== 'object');
assertTrue(typeof null == 'object');
assertTrue(typeof null === 'object');
+assertFalse(typeof null != 'object');
+assertFalse(typeof null !== 'object');
+assertTrue(typeof 1 != 'object');
+assertTrue(typeof 1 !== 'object');
assertFalse(typeof 1 == 'object');
assertFalse(typeof 1 === 'object');
+assertTrue(typeof 'x' != 'object');
+assertTrue(typeof 'x' !== 'object');
assertFalse(typeof 'x' == 'object'); // bug #674753
assertFalse(typeof 'x' === 'object');
+assertTrue(typeof Object != 'object');
+assertTrue(typeof Object !== 'object');
assertFalse(typeof Object == 'object');
assertFalse(typeof Object === 'object');
+assertTrue(typeof undetectable != 'object');
+assertTrue(typeof undetectable !== 'object');
+assertFalse(typeof undetectable == 'object');
+assertFalse(typeof undetectable === 'object');
diff --git a/test/mjsunit/regress/regress-crbug-119800.js b/test/mjsunit/regress/regress-crbug-119800.js
index 3946fbb..85f28a7 100644
--- a/test/mjsunit/regress/regress-crbug-119800.js
+++ b/test/mjsunit/regress/regress-crbug-119800.js
@@ -5,9 +5,9 @@
// Flags: --expose-debug-as debug
function f() {
- 1;
- 2;
- 3;
+ print(1);
+ print(2);
+ print(3);
}
var Debug = debug.Debug;
@@ -34,4 +34,5 @@
Debug.debuggerFlags().breakPointsActive.setValue(true);
assertNull(exception);
-assertEquals(breaks, ["1;", "2;", "3;", "}", "Debug.setListener(null);"]);
+assertEquals(breaks, ["print(1);", "print(2);", "print(3);", "}",
+ "Debug.setListener(null);"]);
diff --git a/test/mjsunit/regress/regress-crbug-451770.js b/test/mjsunit/regress/regress-crbug-451770.js
index 770c807..b4f088d 100644
--- a/test/mjsunit/regress/regress-crbug-451770.js
+++ b/test/mjsunit/regress/regress-crbug-451770.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-sloppy
-
assertThrows(function f() {
var t = { toString: function() { throw new Error(); } };
var o = { [t]: 23 };
diff --git a/test/mjsunit/regress/regress-crbug-480807.js b/test/mjsunit/regress/regress-crbug-480807.js
index c273f20..a1448d6 100644
--- a/test/mjsunit/regress/regress-crbug-480807.js
+++ b/test/mjsunit/regress/regress-crbug-480807.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --use-osr --turbo-osr --noalways-opt
+// Flags: --allow-natives-syntax --use-osr --noalways-opt
function foo() {
var c = 0;
diff --git a/test/mjsunit/regress/regress-crbug-582048.js b/test/mjsunit/regress/regress-crbug-582048.js
new file mode 100644
index 0000000..6d98f48
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-582048.js
@@ -0,0 +1,31 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+var Debug = debug.Debug;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ var frame_count = exec_state.frameCount();
+ for (var i = 0; i < frame_count; i++) {
+ var frame = exec_state.frame(i);
+ var scope_count = frame.scopeCount();
+ for (var j = 0; j < scope_count; j++) {
+ var scope = frame.scope(j);
+ assertTrue(scope.scopeObject().property('').isUndefined());
+ }
+ }
+ } catch (e) {
+ print(e, e.stack);
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+
+(function(a = 1) { debugger; })();
+
+Debug.setListener(null);
diff --git a/test/mjsunit/regress/regress-crbug-600257.js b/test/mjsunit/regress/regress-crbug-600257.js
new file mode 100644
index 0000000..87bd2e3
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-600257.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --stack-size=100
+
+(function rec() {
+ try {
+ rec();
+ } catch (e) {
+ /{/;
+ }
+})();
diff --git a/test/mjsunit/regress/regress-crbug-602184.js b/test/mjsunit/regress/regress-crbug-602184.js
new file mode 100644
index 0000000..c7d793b
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-602184.js
@@ -0,0 +1,17 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function f(test, a) {
+ var v;
+ if (test) {
+ v = v|0;
+ }
+ a[v] = 1;
+}
+var v = new String();
+f(false, v);
+f(false, v);
+
+v = new Int32Array(10);
+f(true, v);
diff --git a/test/mjsunit/regress/regress-crbug-602595.js b/test/mjsunit/regress/regress-crbug-602595.js
new file mode 100644
index 0000000..7f6d478
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-602595.js
@@ -0,0 +1,12 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-escape
+
+function f(a) { return [a] }
+
+assertEquals([23], f(23));
+assertEquals([42], f(42));
+%OptimizeFunctionOnNextCall(f);
+assertEquals([65], f(65));
diff --git a/test/mjsunit/regress/regress-crbug-603463.js b/test/mjsunit/regress/regress-crbug-603463.js
new file mode 100644
index 0000000..20bfae6
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-603463.js
@@ -0,0 +1,16 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function load(a, i) {
+ return a[i];
+}
+
+function f() {
+ return load(new Proxy({}, {}), undefined);
+}
+
+f();
+f();
+load([11, 22, 33], 0);
+f();
diff --git a/test/mjsunit/regress/regress-crbug-604299.js b/test/mjsunit/regress/regress-crbug-604299.js
new file mode 100644
index 0000000..9908f2d
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-604299.js
@@ -0,0 +1,9 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+Array.prototype.__defineSetter__(0,function(value){});
+
+if (this.Intl) {
+ var o = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Katmandu'})
+}
diff --git a/test/mjsunit/regress/regress-crbug-605060.js b/test/mjsunit/regress/regress-crbug-605060.js
new file mode 100644
index 0000000..d2dc79a
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-605060.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+Array.prototype.__defineGetter__('map', function(){});
+Array.prototype.__defineGetter__('map', function(){});
+Array.prototype.__defineGetter__('map', function(){});
+assertTrue(%HasFastProperties(Array.prototype));
diff --git a/test/mjsunit/regress/regress-crbug-605581.js b/test/mjsunit/regress/regress-crbug-605581.js
new file mode 100644
index 0000000..0f1daab
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-605581.js
@@ -0,0 +1,28 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+var Debug = debug.Debug;
+var exception = null;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ assertThrows(() => exec_state.frame(0).evaluate("bar.baz"), ReferenceError);
+ } catch (e) {
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+
+(function() {
+ debugger; // bar is still in TDZ at this point.
+ let bar = 1;
+ (x => bar); // force bar to be context-allocated.
+})();
+
+Debug.setListener(null);
+assertNull(exception);
diff --git a/test/mjsunit/regress/regress-crbug-605862.js b/test/mjsunit/regress/regress-crbug-605862.js
new file mode 100644
index 0000000..3124c06
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-605862.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-unicode-regexps
+
+/[]*1/u.exec("\u1234");
+/[^\u0000-\u{10ffff}]*1/u.exec("\u1234");
diff --git a/test/mjsunit/regress/regress-crbug-608279.js b/test/mjsunit/regress/regress-crbug-608279.js
new file mode 100644
index 0000000..22c69f2
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-608279.js
@@ -0,0 +1,18 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --always-opt --no-lazy
+
+function __f_38() {
+ try {
+ throw 0;
+ } catch (e) {
+ eval();
+ var __v_38 = { a: 'hest' };
+ __v_38.m = function () { return __v_38.a; };
+ }
+ return __v_38;
+}
+var __v_40 = __f_38();
+__v_40.m();
diff --git a/test/mjsunit/regress/regress-crbug-609029.js b/test/mjsunit/regress/regress-crbug-609029.js
new file mode 100644
index 0000000..bd77de2
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-609029.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --always-opt --function-context-specialization --gc-interval=14
+// Flags: --turbo-filter=match --verify-heap
+"xxx".match();
diff --git a/test/mjsunit/regress/regress-crbug-609046.js b/test/mjsunit/regress/regress-crbug-609046.js
new file mode 100644
index 0000000..10b63af
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-609046.js
@@ -0,0 +1,36 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+// Test that hidden scopes are correctly walked in the scope chain.
+
+var Debug = debug.Debug;
+var exception = null;
+var delegate = null;
+var done = false;
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ assertEquals([ debug.ScopeType.Block,
+ debug.ScopeType.Script,
+ debug.ScopeType.Global ],
+ exec_state.frame(0).allScopes().map(s => s.scopeType()));
+ done = true;
+ } catch (e) {
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+
+for(let a = 0; a < 3; a++) {
+ debugger;
+ eval(); // Force context-allocation of everything.
+}
+
+Debug.setListener(null);
+assertNull(exception);
+assertTrue(done);
diff --git a/test/mjsunit/regress/regress-crbug-610207.js b/test/mjsunit/regress/regress-crbug-610207.js
new file mode 100644
index 0000000..4396a56
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-610207.js
@@ -0,0 +1,13 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+Error.prepareStackTrace = function(exception, frames) {
+ return frames[0].getEvalOrigin();
+}
+
+try {
+ Realm.eval(0, "throw new Error('boom');");
+} catch(e) {
+ print(e.stack);
+}
diff --git a/test/mjsunit/regress/regress-crbug-610228.js b/test/mjsunit/regress/regress-crbug-610228.js
deleted file mode 100644
index ca077d5..0000000
--- a/test/mjsunit/regress/regress-crbug-610228.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --allow-natives-syntax
-
-function foo() { return JSON.stringify({a: 0.1}); }
-assertEquals('{"a":0.1}', foo());
-assertEquals('{"a":0.1}', foo());
-%OptimizeFunctionOnNextCall(foo);
-assertEquals('{"a":0.1}', foo());
diff --git a/test/mjsunit/regress/regress-crbug-612142.js b/test/mjsunit/regress/regress-crbug-612142.js
new file mode 100644
index 0000000..de2dc8d
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-612142.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var thrower = {[Symbol.toPrimitive]: function(e) { throw e }};
+try {
+ for (var i = 0; i < 10; i++) { }
+ for (var i = 0.5; i < 100000; ++i) { }
+ for (var i = 16 | 0 || 0 || this || 1; i;) { String.fromCharCode(thrower); }
+} catch (e) { }
diff --git a/test/mjsunit/regress/regress-crbug-617524.js b/test/mjsunit/regress/regress-crbug-617524.js
new file mode 100644
index 0000000..b32eeef
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-617524.js
@@ -0,0 +1,18 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc --always-opt
+
+function f(a,b,c) {
+ a.a = b;
+ a[1] = c;
+ return a;
+}
+
+f(new Array(5),.5,0);
+var o1 = f(new Array(5),0,.5);
+gc();
+var o2 = f(new Array(5),0,0);
+var o3 = f(new Array(5),0);
+assertEquals(0, o3.a);
diff --git a/test/mjsunit/regress/regress-crbug-620119.js b/test/mjsunit/regress/regress-crbug-620119.js
new file mode 100644
index 0000000..cbe5a78
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-620119.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --no-lazy
+
+assertEquals(0, ((x, {[(x = function() { y = 0 }, "foo")]: y = eval(1)}) => { x(); return y })(42, {}));
+assertEquals(0, (function (x, {[(x = function() { y = 0 }, "foo")]: y = eval(1)}) { x(); return y })(42, {}));
diff --git a/test/mjsunit/regress/regress-object-assign-deprecated-2.js b/test/mjsunit/regress/regress-object-assign-deprecated-2.js
new file mode 100644
index 0000000..89693de
--- /dev/null
+++ b/test/mjsunit/regress/regress-object-assign-deprecated-2.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var x = {a:1, b:2};
+Object.defineProperty(x, "c", {set(v) {}})
+var y = {get c() { return {a:1, b:2.5} }};
+Object.assign(x, y, x);
diff --git a/test/mjsunit/regress/regress-object-assign-deprecated.js b/test/mjsunit/regress/regress-object-assign-deprecated.js
new file mode 100644
index 0000000..d2e60f9
--- /dev/null
+++ b/test/mjsunit/regress/regress-object-assign-deprecated.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var x = {a:1, b:2};
+var y = {a:1, b:2.5};
+Object.assign(x, x);
diff --git a/test/mjsunit/regress/regress-observe-map-cache.js b/test/mjsunit/regress/regress-observe-map-cache.js
deleted file mode 100644
index c71759c..0000000
--- a/test/mjsunit/regress/regress-observe-map-cache.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-object-observe
-// Flags: --allow-natives-syntax --enable-slow-asserts
-
-function f() {
- var x = new Array(0);
- x[-1] = -1;
- Object.observe(x, function() { });
-}
-
-f();
-f();
diff --git a/test/mjsunit/regress/regress-opt-typeof-null.js b/test/mjsunit/regress/regress-opt-typeof-null.js
new file mode 100644
index 0000000..e4721a1
--- /dev/null
+++ b/test/mjsunit/regress/regress-opt-typeof-null.js
@@ -0,0 +1,12 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+ return typeof null === "object";
+};
+
+%OptimizeFunctionOnNextCall(f);
+assertTrue(f());
diff --git a/test/mjsunit/regress/regress-recurse-patch-binary-op.js b/test/mjsunit/regress/regress-recurse-patch-binary-op.js
new file mode 100644
index 0000000..842cc79
--- /dev/null
+++ b/test/mjsunit/regress/regress-recurse-patch-binary-op.js
@@ -0,0 +1,10 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var i = 0
+function valueOf() {
+ while (true) return i++ < 4 ? 1 + this : 2
+}
+
+1 + ({valueOf})
diff --git a/test/mjsunit/regress/regress-v8-5009.js b/test/mjsunit/regress/regress-v8-5009.js
new file mode 100644
index 0000000..f499548
--- /dev/null
+++ b/test/mjsunit/regress/regress-v8-5009.js
@@ -0,0 +1,61 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function fn1() {
+}
+
+function fn2() {
+}
+
+function fn3() {
+}
+
+function create(id) {
+ // Just some `FunctionTemplate` to hang on
+ var o = new version();
+
+ o.id = id;
+ o[0] = null;
+
+ return o;
+}
+
+function setM1(o) {
+ o.m1 = fn1;
+}
+
+function setM2(o) {
+ o.m2 = fn2;
+}
+
+function setAltM2(o) {
+ // Failing StoreIC happens here
+ o.m2 = fn3;
+}
+
+function setAltM1(o) {
+ o.m1 = null;
+}
+
+function test(o) {
+ o.m2();
+ o.m1();
+}
+
+var p0 = create(0);
+var p1 = create(1);
+var p2 = create(2);
+
+setM1(p0);
+setM1(p1);
+setM1(p2);
+
+setM2(p0);
+setAltM2(p0);
+setAltM1(p0);
+
+setAltM2(p1);
+
+setAltM2(p2);
+test(p2);
diff --git a/test/mjsunit/stack-traces-overflow.js b/test/mjsunit/stack-traces-overflow.js
index e20c609..af81971 100644
--- a/test/mjsunit/stack-traces-overflow.js
+++ b/test/mjsunit/stack-traces-overflow.js
@@ -27,10 +27,22 @@
// Flags: --stack-size=100
+function overflow() {
+ var a, b, c, d, e; // Allocates some locals on the function's stack frame.
+ overflow();
+}
function rec1(a) { rec1(a+1); }
function rec2(a) { rec3(a+1); }
function rec3(a) { rec2(a+1); }
+// Test stack trace has correct function location at top of the stack.
+try {
+ overflow();
+} catch (e) {
+ var first_frame = e.stack.split("\n")[1]
+ assertTrue(first_frame.indexOf("stack-traces-overflow.js:30:18") > 0);
+}
+
// Test stack trace getter and setter.
try {
rec1(0);
diff --git a/test/mjsunit/string-wrapper.js b/test/mjsunit/string-wrapper.js
new file mode 100644
index 0000000..d4b6500
--- /dev/null
+++ b/test/mjsunit/string-wrapper.js
@@ -0,0 +1,62 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var limit = 10000;
+
+function testStringWrapper(string) {
+ assertEquals('a', string[0]);
+ assertEquals('b', string[1]);
+ assertEquals('c', string[2]);
+}
+
+(function testFastStringWrapperGrow() {
+ var string = new String("abc");
+ for (var i = 0; i < limit; i += 2) {
+ string[i] = {};
+ }
+ testStringWrapper(string);
+
+ for (var i = limit; i > 0; i -= 2) {
+ delete string[i];
+ }
+ testStringWrapper(string);
+})();
+
+(function testSlowStringWrapperGrow() {
+ var string = new String("abc");
+ // Force Slow String Wrapper Elements Kind
+ string[limit] = limit;
+ for (var i = 0; i < limit; i += 2) {
+ string[i] = {};
+ }
+ testStringWrapper(string);
+ assertEquals(limit, string[limit]);
+
+ for (var i = limit; i > 0; i -= 2) {
+ delete string[i];
+ }
+ testStringWrapper(string);
+ assertEquals(undefined, string[limit]);
+})();
+
+
+(function testReconfigureStringWrapperElements() {
+ var s = new String('abc');
+ // Can't reconfigure string contents.
+ assertThrows(() => Object.defineProperty(s, '1', {value: "value"}), TypeError);
+
+ // Configure a property outside the string range
+ var value = 'v1';
+ Object.defineProperty(s, '3', {
+ get: () => {return value},
+ configurable:true
+ });
+ assertEquals('v1', s[3]);
+ value = 'v2';
+ assertEquals('v2', s[3]);
+
+ Object.defineProperty(s, '3', {value: 'v3', configurable: false});
+ assertEquals('v3', s[3]);
+ assertThrows(() => Object.defineProperty(s, '3', {value:2}), TypeError);
+})();
diff --git a/test/mjsunit/tools/tickprocessor-test-func-info.log b/test/mjsunit/tools/tickprocessor-test-func-info.log
index 94aa56d..fcbf3b1 100644
--- a/test/mjsunit/tools/tickprocessor-test-func-info.log
+++ b/test/mjsunit/tools/tickprocessor-test-func-info.log
@@ -1,6 +1,6 @@
-shared-library,"shell",0x08048000,0x081ee000
-shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000
-shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000
+shared-library,"shell",0x08048000,0x081ee000,0
+shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000,0
+shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000,0
profiler,"begin",1
code-creation,Stub,0,0x424260,348,"CompareStub_GE"
code-creation,LazyCompile,0,0x2a8100,18535,"DrawQube 3d-cube.js:188",0xf43abcac,
diff --git a/test/mjsunit/tools/tickprocessor-test.log b/test/mjsunit/tools/tickprocessor-test.log
index cf8b90d..fbc868e 100644
--- a/test/mjsunit/tools/tickprocessor-test.log
+++ b/test/mjsunit/tools/tickprocessor-test.log
@@ -1,6 +1,6 @@
-shared-library,"shell",0x08048000,0x081ee000
-shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000
-shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000
+shared-library,"shell",0x08048000,0x081ee000,0
+shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000,0
+shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000,0
profiler,"begin",1
code-creation,Stub,0,0xf540a100,474,"CEntryStub"
code-creation,Script,0,0xf541cd80,736,"exp.js"
diff --git a/test/mjsunit/tools/tickprocessor.js b/test/mjsunit/tools/tickprocessor.js
index 73af098..804a85d 100644
--- a/test/mjsunit/tools/tickprocessor.js
+++ b/test/mjsunit/tools/tickprocessor.js
@@ -81,7 +81,7 @@
var shell_prov = new UnixCppEntriesProvider();
var shell_syms = [];
- shell_prov.parseVmSymbols('shell', 0x08048000, 0x081ee000,
+ shell_prov.parseVmSymbols('shell', 0x08048000, 0x081ee000, 0,
function (name, start, end) {
shell_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -107,7 +107,7 @@
};
var libc_prov = new UnixCppEntriesProvider();
var libc_syms = [];
- libc_prov.parseVmSymbols('libc', 0xf7c5c000, 0xf7da5000,
+ libc_prov.parseVmSymbols('libc', 0xf7c5c000, 0xf7da5000, 0,
function (name, start, end) {
libc_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -145,17 +145,17 @@
var shell_prov = new MacCppEntriesProvider();
var shell_syms = [];
- shell_prov.parseVmSymbols('shell', 0x00001b00, 0x00163156,
+ shell_prov.parseVmSymbols('shell', 0x00001c00, 0x00163256, 0x100,
function (name, start, end) {
shell_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
assertEquals(
- [['start', 0x00001b00, 0x00001b40],
- ['dyld_stub_binding_helper', 0x00001b40, 0x0011b710],
- ['v8::internal::RegExpMacroAssembler::CheckPosition', 0x0011b710, 0x00134250],
- ['v8::internal::Runtime_StringReplaceRegExpWithString', 0x00134250, 0x00137220],
- ['v8::internal::Runtime::GetElementOrCharAt', 0x00137220, 0x00137400],
- ['v8::internal::Runtime_DebugGetPropertyDetails', 0x00137400, 0x00163156]],
+ [['start', 0x00001c00, 0x00001c40],
+ ['dyld_stub_binding_helper', 0x00001c40, 0x0011b810],
+ ['v8::internal::RegExpMacroAssembler::CheckPosition', 0x0011b810, 0x00134350],
+ ['v8::internal::Runtime_StringReplaceRegExpWithString', 0x00134350, 0x00137320],
+ ['v8::internal::Runtime::GetElementOrCharAt', 0x00137320, 0x00137500],
+ ['v8::internal::Runtime_DebugGetPropertyDetails', 0x00137500, 0x00163256]],
shell_syms);
// stdc++ library
@@ -168,7 +168,7 @@
};
var stdc_prov = new MacCppEntriesProvider();
var stdc_syms = [];
- stdc_prov.parseVmSymbols('stdc++', 0x95728fb4, 0x95770005,
+ stdc_prov.parseVmSymbols('stdc++', 0x95728fb4, 0x95770005, 0,
function (name, start, end) {
stdc_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -211,7 +211,7 @@
};
var shell_prov = new WindowsCppEntriesProvider();
var shell_syms = [];
- shell_prov.parseVmSymbols('shell.exe', 0x00400000, 0x0057c000,
+ shell_prov.parseVmSymbols('shell.exe', 0x00400000, 0x0057c000, 0,
function (name, start, end) {
shell_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -252,7 +252,7 @@
read = exeSymbols;
var exe_exe_syms = [];
(new WindowsCppEntriesProvider()).parseVmSymbols(
- 'chrome.exe', 0x00400000, 0x00472000,
+ 'chrome.exe', 0x00400000, 0x00472000, 0,
function (name, start, end) {
exe_exe_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -264,7 +264,7 @@
read = dllSymbols;
var exe_dll_syms = [];
(new WindowsCppEntriesProvider()).parseVmSymbols(
- 'chrome.exe', 0x00400000, 0x00472000,
+ 'chrome.exe', 0x00400000, 0x00472000, 0,
function (name, start, end) {
exe_dll_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -275,7 +275,7 @@
read = dllSymbols;
var dll_dll_syms = [];
(new WindowsCppEntriesProvider()).parseVmSymbols(
- 'chrome.dll', 0x01c30000, 0x02b80000,
+ 'chrome.dll', 0x01c30000, 0x02b80000, 0,
function (name, start, end) {
dll_dll_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -287,7 +287,7 @@
read = exeSymbols;
var dll_exe_syms = [];
(new WindowsCppEntriesProvider()).parseVmSymbols(
- 'chrome.dll', 0x01c30000, 0x02b80000,
+ 'chrome.dll', 0x01c30000, 0x02b80000, 0,
function (name, start, end) {
dll_exe_syms.push(Array.prototype.slice.apply(arguments, [0]));
});
@@ -304,7 +304,7 @@
CppEntriesProviderMock.prototype.parseVmSymbols = function(
- name, startAddr, endAddr, symbolAdder) {
+ name, startAddr, endAddr, slideAddr, symbolAdder) {
var symbols = {
'shell':
[['v8::internal::JSObject::LookupOwnRealNamedProperty(v8::internal::String*, v8::internal::LookupResult*)', 0x080f8800, 0x080f8d90],
diff --git a/test/mjsunit/wasm/adapter-frame.js b/test/mjsunit/wasm/adapter-frame.js
index 0e5d4b8..39164c7 100644
--- a/test/mjsunit/wasm/adapter-frame.js
+++ b/test/mjsunit/wasm/adapter-frame.js
@@ -27,8 +27,10 @@
var builder = new WasmModuleBuilder();
var sig = new Array();
- sig.push(type);
+ sig.push(args);
for (var i = 0; i < args; i++) sig.push(type);
+ sig.push(1);
+ sig.push(type);
builder.addFunction("select", sig)
.addBody([kExprGetLocal, which])
.exportFunc();
diff --git a/test/mjsunit/wasm/asm-wasm-switch.js b/test/mjsunit/wasm/asm-wasm-switch.js
new file mode 100644
index 0000000..bbdb1a2
--- /dev/null
+++ b/test/mjsunit/wasm/asm-wasm-switch.js
@@ -0,0 +1,468 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+(function TestSwitch0() {
+ function asmModule() {
+ "use asm"
+
+ function caller() {
+ var ret = 0;
+ var x = 7;
+ switch (x) {
+ case 1: {
+ return 0;
+ }
+ case 7: {
+ ret = 5;
+ break;
+ }
+ default: return 0;
+ }
+ return ret|0;
+ }
+
+ return {caller:caller};
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(5, wasm.caller());
+})();
+
+(function TestSwitch() {
+ function asmModule() {
+ "use asm"
+
+ function caller() {
+ var ret = 0;
+ var x = 7;
+ switch (x) {
+ case 1: return 0;
+ case 7: {
+ ret = 12;
+ break;
+ }
+ default: return 0;
+ }
+ switch (x) {
+ case 1: return 0;
+ case 8: return 0;
+ default: ret = (ret + 11)|0;
+ }
+ return ret|0;
+ }
+
+ return {caller:caller};
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(23, wasm.caller());
+})();
+
+(function TestSwitchFallthrough() {
+ function asmModule() {
+ "use asm"
+
+ function caller() {
+ var x = 17;
+ var ret = 0;
+ switch (x) {
+ case 17:
+ case 14: ret = 39;
+ case 1: ret = (ret + 3)|0;
+ case 4: break;
+ default: ret = (ret + 1)|0;
+ }
+ return ret|0;
+ }
+
+ return {caller:caller};
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(42, wasm.caller());
+})();
+
+(function TestNestedSwitch() {
+ function asmModule() {
+ "use asm"
+
+ function caller() {
+ var x = 3;
+ var y = -13;
+ switch (x) {
+ case 1: return 0;
+ case 3: {
+ switch (y) {
+ case 2: return 0;
+ case -13: return 43;
+ default: return 0;
+ }
+ }
+ default: return 0;
+ }
+ return 0;
+ }
+
+ return {caller:caller};
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(43, wasm.caller());
+})();
+
+(function TestSwitchWithDefaultOnly() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ switch(x|0) {
+ default: return -10;
+ }
+ return 0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(-10, wasm.main(2));
+ assertEquals(-10, wasm.main(54));
+})();
+
+(function TestEmptySwitch() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ switch(x|0) {
+ }
+ return 73;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(73, wasm.main(7));
+})();
+
+(function TestSwitchWithBrTable() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ switch(x|0) {
+ case 14: return 23;
+ case 12: return 25;
+ case 15: return 29;
+ case 19: return 34;
+ case 18: return 17;
+ case 16: return 16;
+ default: return -1;
+ }
+ return 0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(25, wasm.main(12));
+ assertEquals(23, wasm.main(14));
+ assertEquals(29, wasm.main(15));
+ assertEquals(16, wasm.main(16));
+ assertEquals(17, wasm.main(18));
+ assertEquals(34, wasm.main(19));
+ assertEquals(-1, wasm.main(-1));
+})();
+
+(function TestSwitchWithBalancedTree() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ switch(x|0) {
+ case 5: return 52;
+ case 1: return 11;
+ case 6: return 63;
+ case 9: return 19;
+ case -4: return -4;
+ }
+ return 0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(-4, wasm.main(-4));
+ assertEquals(11, wasm.main(1));
+ assertEquals(52, wasm.main(5));
+ assertEquals(63, wasm.main(6));
+ assertEquals(19, wasm.main(9));
+ assertEquals(0, wasm.main(11));
+})();
+
+(function TestSwitchHybrid() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ switch(x|0) {
+ case 1: return -4;
+ case 2: return 23;
+ case 3: return 32;
+ case 4: return 14;
+ case 7: return 17;
+ case 10: return 10;
+ case 11: return 121;
+ case 12: return 112;
+ case 13: return 31;
+ case 16: return 16;
+ default: return -1;
+ }
+ return 0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(-4, wasm.main(1));
+ assertEquals(23, wasm.main(2));
+ assertEquals(32, wasm.main(3));
+ assertEquals(14, wasm.main(4));
+ assertEquals(17, wasm.main(7));
+ assertEquals(10, wasm.main(10));
+ assertEquals(121, wasm.main(11));
+ assertEquals(112, wasm.main(12));
+ assertEquals(31, wasm.main(13));
+ assertEquals(16, wasm.main(16));
+ assertEquals(-1, wasm.main(20));
+})();
+
+(function TestSwitchFallthroughWithBrTable() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ var ret = 0;
+ switch(x|0) {
+ case 1: {
+ ret = 21;
+ break;
+ }
+ case 2: {
+ ret = 12;
+ break;
+ }
+ case 3: {
+ ret = 43;
+ }
+ case 4: {
+ ret = 54;
+ break;
+ }
+ default: {
+ ret = 10;
+ break;
+ }
+ }
+ return ret|0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(12, wasm.main(2));
+ assertEquals(10, wasm.main(10));
+ assertEquals(54, wasm.main(3));
+})();
+
+(function TestSwitchFallthroughHybrid() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ var ret = 0;
+ switch(x|0) {
+ case 1: {
+ ret = 1;
+ break;
+ }
+ case 2: {
+ ret = 2;
+ break;
+ }
+ case 3: {
+ ret = 3;
+ break;
+ }
+ case 4: {
+ ret = 4;
+ }
+ case 7: {
+ ret = 7;
+ break;
+ }
+ case 10: {
+ ret = 10;
+ }
+ case 16: {
+ ret = 16;
+ break;
+ }
+ case 17: {
+ ret = 17;
+ break;
+ }
+ case 18: {
+ ret = 18;
+ break;
+ }
+ case 19: {
+ ret = 19;
+ }
+ default: {
+ ret = -1;
+ break;
+ }
+ }
+ return ret|0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(7, wasm.main(4));
+ assertEquals(16, wasm.main(10));
+ assertEquals(-1, wasm.main(19));
+ assertEquals(-1, wasm.main(23));
+})();
+
+(function TestSwitchHybridWithNoDefault() {
+ function asmModule() {
+ "use asm";
+ function main(x) {
+ x = x|0;
+ var ret = 19;
+ switch(x|0) {
+ case 1: {
+ ret = 1;
+ break;
+ }
+ case 2: {
+ ret = 2;
+ break;
+ }
+ case 3: {
+ ret = 3;
+ break;
+ }
+ case 4: {
+ ret = 4;
+ break;
+ }
+ case 7: {
+ ret = 7;
+ break;
+ }
+ }
+ return ret|0;
+ }
+ return {
+ main: main,
+ };
+ }
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
+ assertEquals(2, wasm.main(2));
+ assertEquals(7, wasm.main(7));
+ assertEquals(19, wasm.main(-1));
+})();
+
+(function TestLargeSwitch() {
+ function LargeSwitchGenerator(begin, end, gap, handle_case) {
+ var str = "function asmModule() {\
+ \"use asm\";\
+ function main(x) {\
+ x = x|0;\
+ switch(x|0) {";
+ for (var i = begin; i <= end; i = i + gap) {
+ str = str.concat("case ", i.toString(), ": ", handle_case(i));
+ }
+ str = str.concat("default: return -1;\
+ }\
+ return -2;\
+ }\
+ return {main: main}; }");
+
+ var wasm = Wasm.instantiateModuleFromAsm(str);
+ return wasm;
+ }
+
+ var handle_case = function(k) {
+ return "return ".concat(k, ";");
+ }
+ var wasm = LargeSwitchGenerator(0, 513, 1, handle_case);
+ for (var i = 0; i <= 513; i++) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+
+ wasm = LargeSwitchGenerator(0, 1024, 3, handle_case);
+ for (var i = 0; i <= 1024; i = i + 3) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+
+ wasm = LargeSwitchGenerator(-2147483648, -2147483000, 1, handle_case);
+ for (var i = -2147483648; i <= -2147483000; i++) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+ assertEquals(-1, wasm.main(214748647));
+
+ wasm = LargeSwitchGenerator(-2147483648, -2147483000, 3, handle_case);
+ for (var i = -2147483648; i <= -2147483000; i = i + 3) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+ assertEquals(-1, wasm.main(214748647));
+
+ wasm = LargeSwitchGenerator(2147483000, 2147483647, 1, handle_case);
+ for (var i = 2147483000; i <= 2147483647; i++) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+ assertEquals(-1, wasm.main(-214748647));
+
+ wasm = LargeSwitchGenerator(2147483000, 2147483647, 4, handle_case);
+ for (var i = 2147483000; i <= 2147483647; i = i + 4) {
+ assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+ assertEquals(-1, wasm.main(-214748647));
+
+ handle_case = function(k) {
+ if (k != 7) return "return ".concat(k, ";");
+ else return "break;";
+ }
+ wasm = LargeSwitchGenerator(0, 1499, 7, handle_case);
+ for (var i = 0; i <= 1499; i = i + 7) {
+ if (i == 7) assertEquals(-2, wasm.main(i));
+ else assertEquals(i, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+
+ handle_case = function(k) {
+ if (k != 56) return "break;";
+ else return "return 23;";
+ }
+ wasm = LargeSwitchGenerator(0, 638, 2, handle_case);
+ for (var i = 0; i <= 638; i = i + 2) {
+ if (i == 56) assertEquals(23, wasm.main(i));
+ else assertEquals(-2, wasm.main(i));
+ }
+ assertEquals(-1, wasm.main(-1));
+})();
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index 2efb006..54d7d7a 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -23,6 +23,20 @@
assertWasm(11, EmptyTest);
+function VoidReturnTest() {
+ "use asm";
+ function caller() {
+ empty();
+ return 19;
+ }
+ function empty() {
+ var x = 0;
+ if (x) return;
+ }
+ return {caller: caller};
+}
+
+assertWasm(19, VoidReturnTest);
function IntTest() {
"use asm";
@@ -193,6 +207,55 @@
assertWasm(7, TestReturnInWhileWithoutBraces);
+function TestBreakInIf() {
+ "use asm";
+
+ function caller() {
+ label: {
+ if(1) break label;
+ return 11;
+ }
+ return 12;
+ }
+
+ return {caller: caller};
+}
+
+assertWasm(12, TestBreakInIf);
+
+function TestBreakInIfInDoWhileFalse() {
+ "use asm";
+
+ function caller() {
+ do {
+ if(1) break;
+ return 11;
+ } while(0);
+ return 12;
+ }
+
+ return {caller: caller};
+}
+
+assertWasm(12, TestBreakInIfInDoWhileFalse);
+
+function TestBreakInElse() {
+ "use asm";
+
+ function caller() {
+ do {
+ if(0) ;
+ else break;
+ return 14;
+ } while(0);
+ return 15;
+ }
+
+ return {caller: caller};
+}
+
+assertWasm(15, TestBreakInElse);
+
function TestBreakInWhile() {
"use asm";
@@ -209,6 +272,22 @@
assertWasm(8, TestBreakInWhile);
+function TestBreakInIfInWhile() {
+ "use asm";
+
+ function caller() {
+ while(1) {
+ if (1) break;
+ else break;
+ }
+ return 8;
+ }
+
+ return {caller: caller};
+}
+
+assertWasm(8, TestBreakInIfInWhile);
+
function TestBreakInNestedWhile() {
"use asm";
@@ -769,82 +848,6 @@
assertWasm(41, TestConditional);
-function TestSwitch() {
- "use asm"
-
- function caller() {
- var ret = 0;
- var x = 7;
- switch (x) {
- case 1: return 0;
- case 7: {
- ret = 12;
- break;
- }
- default: return 0;
- }
- switch (x) {
- case 1: return 0;
- case 8: return 0;
- default: ret = (ret + 11)|0;
- }
- return ret|0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(23, TestSwitch);
-
-
-function TestSwitchFallthrough() {
- "use asm"
-
- function caller() {
- var x = 17;
- var ret = 0;
- switch (x) {
- case 17:
- case 14: ret = 39;
- case 1: ret = (ret + 3)|0;
- case 4: break;
- default: ret = (ret + 1)|0;
- }
- return ret|0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(42, TestSwitchFallthrough);
-
-
-function TestNestedSwitch() {
- "use asm"
-
- function caller() {
- var x = 3;
- var y = -13;
- switch (x) {
- case 1: return 0;
- case 3: {
- switch (y) {
- case 2: return 0;
- case -13: return 43;
- default: return 0;
- }
- }
- default: return 0;
- }
- return 0;
- }
-
- return {caller:caller};
-}
-
-assertWasm(43, TestNestedSwitch);
-
-
(function () {
function TestInitFunctionWithNoGlobals() {
"use asm";
diff --git a/test/mjsunit/wasm/calls.js b/test/mjsunit/wasm/calls.js
index 11cc92a..94e97e6 100644
--- a/test/mjsunit/wasm/calls.js
+++ b/test/mjsunit/wasm/calls.js
@@ -37,20 +37,42 @@
assertFalse(exp === null);
assertFalse(exp === 0);
assertEquals("function", typeof exp);
-
return exp;
}
+(function I64SubTest() {
+
+ var builder = new WasmModuleBuilder();
+
+ builder.addMemory(1, 1, true);
+ builder.addFunction("sub", kSig_l_ll)
+ .addBody([ // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprI64Sub]) // --
+ .exportFunc()
+
+ var module = builder.instantiate();
+ assertModule(module, kPageSize);
+
+ // Check the properties of the sub function.
+ var sub = assertFunction(module, "sub");
+ assertEquals(-55, sub(33, 88));
+ assertEquals(-55555, sub(33333, 88888));
+ assertEquals(-5555555, sub(3333333, 8888888));
+})();
+
(function SubTest() {
var builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
- builder.addFunction("sub", [kAstI32, kAstI32, kAstI32])
+ builder.addFunction("sub", kSig_i_ii)
.addBody([
- kExprI32Sub, // --
kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 1, // --
+ kExprI32Sub, // --
+ ])
.exportFunc()
var module = builder.instantiate();
@@ -70,7 +92,7 @@
var kPages = 2;
builder.addMemory(kPages, kPages, true);
- builder.addFunction("nop", [kAstStmt])
+ builder.addFunction("nop", kSig_v_v)
.addBody([kExprNop])
.exportFunc();
@@ -87,11 +109,12 @@
var kPages = 3;
builder.addMemory(kPages, kPages, true);
- builder.addFunction("flt", [kAstI32, kAstF64, kAstF64])
+ builder.addFunction("flt", kSig_i_dd)
.addBody([
- kExprF64Lt, // --
kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 1, // --
+ kExprF64Lt // --
+ ]) // --
.exportFunc();
var module = builder.instantiate();
diff --git a/test/mjsunit/wasm/divrem-trap.js b/test/mjsunit/wasm/divrem-trap.js
index 976e473..6f3ff5d 100644
--- a/test/mjsunit/wasm/divrem-trap.js
+++ b/test/mjsunit/wasm/divrem-trap.js
@@ -33,8 +33,12 @@
function makeBinop(opcode) {
var builder = new WasmModuleBuilder();
- builder.addFunction("main", [kAstI32, kAstI32, kAstI32])
- .addBody([opcode, kExprGetLocal, 0, kExprGetLocal, 1])
+ builder.addFunction("main", kSig_i_ii)
+ .addBody([
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ opcode, // --
+ ])
.exportFunc();
return builder.instantiate().exports.main;
diff --git a/test/mjsunit/wasm/export-table.js b/test/mjsunit/wasm/export-table.js
index e85da9b..a41d85d 100644
--- a/test/mjsunit/wasm/export-table.js
+++ b/test/mjsunit/wasm/export-table.js
@@ -11,11 +11,12 @@
var kReturnValue = 88;
var builder = new WasmModuleBuilder();
- builder.addFunction("main", [kAstI32])
+ builder.addFunction("main", kSig_i)
.addBody([
- kExprReturn,
kExprI8Const,
- kReturnValue])
+ kReturnValue,
+ kExprReturn, kArity1
+ ])
.exportFunc();
var module = builder.instantiate();
@@ -31,11 +32,12 @@
var builder = new WasmModuleBuilder();
- builder.addFunction("main", [kAstI32])
+ builder.addFunction("main", kSig_i)
.addBody([
- kExprReturn,
kExprI8Const,
- kReturnValue])
+ kReturnValue,
+ kExprReturn, kArity1
+ ])
.exportAs("blah")
.exportAs("foo");
@@ -48,3 +50,25 @@
assertEquals(kReturnValue, module.exports.foo());
assertEquals(kReturnValue, module.exports.blah());
})();
+
+
+(function testNumericName() {
+ var kReturnValue = 93;
+
+ var builder = new WasmModuleBuilder();
+
+ builder.addFunction("main", kSig_i)
+ .addBody([
+ kExprI8Const,
+ kReturnValue,
+ kExprReturn, kArity1
+ ])
+ .exportAs("0");
+
+ var module = builder.instantiate();
+
+ assertEquals("object", typeof module.exports);
+ assertEquals("function", typeof module.exports["0"]);
+
+ assertEquals(kReturnValue, module.exports["0"]());
+})();
diff --git a/test/mjsunit/wasm/ffi-error.js b/test/mjsunit/wasm/ffi-error.js
index 649ee27..b6474c6 100644
--- a/test/mjsunit/wasm/ffi-error.js
+++ b/test/mjsunit/wasm/ffi-error.js
@@ -10,13 +10,14 @@
function testCallFFI(ffi) {
var builder = new WasmModuleBuilder();
- var sig_index = [kAstI32, kAstF64, kAstF64];
+ var sig_index = kSig_i_dd;
builder.addImport("fun", sig_index);
builder.addFunction("main", sig_index)
.addBody([
- kExprCallImport, 0, // --
- kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallFunction, kArity2, 0, // --
+ ]) // --
.exportFunc();
var module = builder.instantiate(ffi);
diff --git a/test/mjsunit/wasm/ffi.js b/test/mjsunit/wasm/ffi.js
index 61fcf02..87dfe3b 100644
--- a/test/mjsunit/wasm/ffi.js
+++ b/test/mjsunit/wasm/ffi.js
@@ -10,13 +10,14 @@
function testCallFFI(func, check) {
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstI32, kAstF64, kAstF64]);
+ var sig_index = builder.addSignature(kSig_i_dd);
builder.addImport("func", sig_index);
builder.addFunction("main", sig_index)
.addBody([
- kExprCallImport, 0, // --
- kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallImport, kArity2, 0 // --
+ ]) // --
.exportFunc();
var main = builder.instantiate({func: func}).exports.main;
@@ -184,14 +185,14 @@
var builder = new WasmModuleBuilder();
- builder.addImport("func", [kAstStmt, type, type]);
- builder.addFunction("main", [kAstI32, type, type])
+ builder.addImport("func", makeSig_v_xx(type));
+ builder.addFunction("main", makeSig_r_xx(kAstI32, type))
.addBody([
- kExprBlock, 2, // --
- kExprCallImport, 0, // --
- kExprGetLocal, 0, // --
- kExprGetLocal, 1, // --
- kExprI8Const, 99]) // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallImport, kArity2, 0, // --
+ kExprI8Const, 99 // --
+ ]) // --
.exportFunc()
var main = builder.instantiate(ffi).exports.main;
@@ -240,15 +241,15 @@
function testCallPrint() {
var builder = new WasmModuleBuilder();
- builder.addImport("print", [kAstStmt, kAstI32]);
- builder.addImport("print", [kAstStmt, kAstF64]);
- builder.addFunction("main", [kAstStmt, kAstF64])
+ builder.addImport("print", makeSig_v_x(kAstI32));
+ builder.addImport("print", makeSig_v_x(kAstF64));
+ builder.addFunction("main", makeSig_v_x(kAstF64))
.addBody([
- kExprBlock, 2, // --
- kExprCallImport, 0, // --
- kExprI8Const, 97, // --
- kExprCallImport, 1, // --
- kExprGetLocal, 0]) // --
+ kExprI8Const, 97, // --
+ kExprCallImport, kArity1, 0, // --
+ kExprGetLocal, 0, // --
+ kExprCallImport, kArity1, 1 // --
+ ]) // --
.exportFunc()
var main = builder.instantiate({print: print}).exports.main;
diff --git a/test/mjsunit/wasm/function-prototype.js b/test/mjsunit/wasm/function-prototype.js
index db04b95..25339ad 100644
--- a/test/mjsunit/wasm/function-prototype.js
+++ b/test/mjsunit/wasm/function-prototype.js
@@ -10,7 +10,7 @@
(function TestFunctionPrototype() {
var builder = new WasmModuleBuilder();
- builder.addFunction("nine", [kAstI32])
+ builder.addFunction("nine", kSig_i)
.addBody([kExprI8Const, 9])
.exportFunc();
diff --git a/test/mjsunit/wasm/gc-frame.js b/test/mjsunit/wasm/gc-frame.js
index 8387d26..5fa9b05 100644
--- a/test/mjsunit/wasm/gc-frame.js
+++ b/test/mjsunit/wasm/gc-frame.js
@@ -10,14 +10,13 @@
function makeFFI(func, t) {
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([t,t,t,t,t,t,t,t,t,t,t]);
+ var sig_index = builder.addSignature([10,t,t,t,t,t,t,t,t,t,t,1,t]);
builder.addImport("func", sig_index);
// Try to create a frame with lots of spilled values and parameters
// on the stack to try to catch GC bugs in the reference maps for
// the different parts of the stack.
builder.addFunction("main", sig_index)
.addBody([
- kExprCallImport, 0, // --
kExprGetLocal, 0, // --
kExprGetLocal, 1, // --
kExprGetLocal, 2, // --
@@ -28,7 +27,7 @@
kExprGetLocal, 7, // --
kExprGetLocal, 8, // --
kExprGetLocal, 9, // --
- kExprCallImport, 0, // --
+ kExprCallImport, 10, 0, // --
kExprGetLocal, 0, // --
kExprGetLocal, 1, // --
kExprGetLocal, 2, // --
@@ -38,7 +37,8 @@
kExprGetLocal, 6, // --
kExprGetLocal, 7, // --
kExprGetLocal, 8, // --
- kExprGetLocal, 9 // --
+ kExprGetLocal, 9, // --
+ kExprCallImport, 10, 0 // --
]) // --
.exportFunc();
diff --git a/test/mjsunit/wasm/import-table.js b/test/mjsunit/wasm/import-table.js
index 7579901..c3f8cb9 100644
--- a/test/mjsunit/wasm/import-table.js
+++ b/test/mjsunit/wasm/import-table.js
@@ -10,13 +10,13 @@
function testCallImport(func, check) {
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstI32, kAstF64, kAstF64]);
+ var sig_index = builder.addSignature(kSig_i_dd);
builder.addImport("func", sig_index);
builder.addFunction("main", sig_index)
.addBody([
- kExprCallImport, 0, // --
kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 1, // --
+ kExprCallImport, 2, 0]) // --
.exportAs("main");
var main = builder.instantiate({func: func}).exports.main;
@@ -186,14 +186,14 @@
var builder = new WasmModuleBuilder();
- builder.addImport("func", [kAstStmt, type, type]);
- builder.addFunction("main", [kAstI32, type, type])
+ builder.addImport("func", makeSig_v_xx(type));
+ builder.addFunction("main", makeSig_r_xx(kAstI32, type))
.addBody([
- kExprBlock, 2, // --
- kExprCallImport, 0, // --
kExprGetLocal, 0, // --
kExprGetLocal, 1, // --
- kExprI8Const, 99])
+ kExprCallImport, 2, 0, // --
+ kExprI8Const, 99, // --
+ ])
.exportFunc("main");
var main = builder.instantiate(ffi).exports.main;
@@ -241,15 +241,15 @@
function testCallPrint() {
var builder = new WasmModuleBuilder();
- builder.addImport("print", [kAstStmt, kAstI32]);
- builder.addImport("print", [kAstStmt, kAstF64]);
- builder.addFunction("main", [kAstStmt, kAstF64])
+ builder.addImport("print", makeSig_v_x(kAstI32));
+ builder.addImport("print", makeSig_r_x(kAstF64, kAstF64));
+ builder.addFunction("main", makeSig_r_x(kAstF64, kAstF64))
.addBody([
- kExprBlock, 2, // --
- kExprCallImport, 0, // --
- kExprI8Const, 97, // --
- kExprCallImport, 1, // --
- kExprGetLocal, 0]) // --
+ kExprI8Const, 97, // --
+ kExprCallImport, kArity1, 0, // --
+ kExprGetLocal, 0, // --
+ kExprCallImport, kArity1, 1 // --
+ ])
.exportFunc();
var main = builder.instantiate({print: print}).exports.main;
@@ -266,13 +266,14 @@
function testCallImport2(foo, bar, expected) {
var builder = new WasmModuleBuilder();
- builder.addImport("foo", [kAstI32]);
- builder.addImport("bar", [kAstI32]);
- builder.addFunction("main", [kAstI32])
+ builder.addImport("foo", kSig_i);
+ builder.addImport("bar", kSig_i);
+ builder.addFunction("main", kSig_i)
.addBody([
+ kExprCallImport, kArity0, 0, // --
+ kExprCallImport, kArity0, 1, // --
kExprI32Add, // --
- kExprCallImport, 0, // --
- kExprCallImport, 1]) // --
+ ]) // --
.exportFunc();
var main = builder.instantiate({foo: foo, bar: bar}).exports.main;
diff --git a/test/mjsunit/wasm/indirect-calls.js b/test/mjsunit/wasm/indirect-calls.js
index 3258687..80bee41 100644
--- a/test/mjsunit/wasm/indirect-calls.js
+++ b/test/mjsunit/wasm/indirect-calls.js
@@ -10,22 +10,25 @@
var module = (function () {
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstI32, kAstI32, kAstI32]);
+ var sig_index = builder.addSignature(kSig_i_ii);
builder.addImport("add", sig_index);
builder.addFunction("add", sig_index)
.addBody([
- kExprCallImport, 0, kExprGetLocal, 0, kExprGetLocal, 1
+ kExprGetLocal, 0, kExprGetLocal, 1, kExprCallImport, kArity2, 0
]);
builder.addFunction("sub", sig_index)
.addBody([
- kExprI32Sub, kExprGetLocal, 0, kExprGetLocal, 1
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprI32Sub, // --
]);
- builder.addFunction("main", [kAstI32, kAstI32, kAstI32, kAstI32])
+ builder.addFunction("main", kSig_i_iii)
.addBody([
- kExprCallIndirect, sig_index,
kExprGetLocal, 0,
kExprGetLocal, 1,
- kExprGetLocal, 2])
+ kExprGetLocal, 2,
+ kExprCallIndirect, kArity2, sig_index
+ ])
.exportFunc()
builder.appendToFunctionTable([0, 1, 2]);
diff --git a/test/mjsunit/wasm/instantiate-module-basic.js b/test/mjsunit/wasm/instantiate-module-basic.js
index bc13122..800dcc1 100644
--- a/test/mjsunit/wasm/instantiate-module-basic.js
+++ b/test/mjsunit/wasm/instantiate-module-basic.js
@@ -13,7 +13,7 @@
var builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
- builder.addFunction("main", [kAstI32])
+ builder.addFunction("main", kSig_i)
.addBody([kExprI8Const, kReturnValue])
.exportFunc();
diff --git a/test/mjsunit/wasm/instantiate-run-basic.js b/test/mjsunit/wasm/instantiate-run-basic.js
index 2e649a0..fe6fc14 100644
--- a/test/mjsunit/wasm/instantiate-run-basic.js
+++ b/test/mjsunit/wasm/instantiate-run-basic.js
@@ -11,7 +11,7 @@
var kReturnValue = 107;
var builder = new WasmModuleBuilder();
- builder.addFunction("main", [kAstI32])
+ builder.addFunction("main", kSig_i_i)
.addBody([kExprI8Const, kReturnValue])
.exportFunc();
diff --git a/test/mjsunit/wasm/module-memory.js b/test/mjsunit/wasm/module-memory.js
index ef85eb2..a5e5f42 100644
--- a/test/mjsunit/wasm/module-memory.js
+++ b/test/mjsunit/wasm/module-memory.js
@@ -13,19 +13,27 @@
var builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
- builder.addFunction("main", [kAstI32, kAstI32])
+ builder.addFunction("main", kSig_i_i)
.addBody([
- kExprBlock,2,
- kExprLoop,1,
- kExprIf,
+ // main body: while(i) { if(mem[i]) return -1; i -= 4; } return 0;
+ kExprLoop,
+ kExprGetLocal,0,
+ kExprIf,
kExprGetLocal,0,
- kExprBr, 0,
- kExprIfElse,
- kExprI32LoadMem,0,0,kExprGetLocal,0,
- kExprBr,2, kExprI8Const, 255,
- kExprSetLocal,0,
- kExprI32Sub,kExprGetLocal,0,kExprI8Const,4,
- kExprI8Const,0])
+ kExprI32LoadMem,0,0,
+ kExprIf,
+ kExprI8Const,255,
+ kExprReturn, kArity1,
+ kExprEnd,
+ kExprGetLocal,0,
+ kExprI8Const,4,
+ kExprI32Sub,
+ kExprSetLocal,0,
+ kExprBr, kArity1, 1,
+ kExprEnd,
+ kExprEnd,
+ kExprI8Const,0
+ ])
.exportFunc();
return builder.instantiate(null, memory);
@@ -120,14 +128,16 @@
var builder = new WasmModuleBuilder();
builder.addMemory(1, 1, true);
- builder.addFunction("geti", [kAstI32, kAstI32, kAstI32])
+ builder.addFunction("geti", kSig_i_ii)
.addBody([
- kExprI32StoreMem, 0, 0, kExprGetLocal, 0, kExprI32LoadMem, 0, 0, kExprGetLocal, 1
+ kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kExprI32LoadMem, 0, 0,
+ kExprI32StoreMem, 0, 0
])
.exportFunc();
var module = builder.instantiate();
-
var offset;
function read() { return module.exports.geti(0, offset); }
diff --git a/test/mjsunit/wasm/parallel_compilation.js b/test/mjsunit/wasm/parallel_compilation.js
new file mode 100644
index 0000000..23c5658
--- /dev/null
+++ b/test/mjsunit/wasm/parallel_compilation.js
@@ -0,0 +1,100 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --wasm-num-compilation-tasks=10
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+function assertModule(module, memsize) {
+ // Check the module exists.
+ assertFalse(module === undefined);
+ assertFalse(module === null);
+ assertFalse(module === 0);
+ assertEquals("object", typeof module);
+
+ // Check the memory is an ArrayBuffer.
+ var mem = module.exports.memory;
+ assertFalse(mem === undefined);
+ assertFalse(mem === null);
+ assertFalse(mem === 0);
+ assertEquals("object", typeof mem);
+ assertTrue(mem instanceof ArrayBuffer);
+ for (var i = 0; i < 4; i++) {
+ module.exports.memory = 0; // should be ignored
+ assertEquals(mem, module.exports.memory);
+ }
+
+ assertEquals(memsize, module.exports.memory.byteLength);
+}
+
+function assertFunction(module, func) {
+ assertEquals("object", typeof module.exports);
+
+ var exp = module.exports[func];
+ assertFalse(exp === undefined);
+ assertFalse(exp === null);
+ assertFalse(exp === 0);
+ assertEquals("function", typeof exp);
+ return exp;
+}
+
+(function CompileFunctionsTest() {
+
+ var builder = new WasmModuleBuilder();
+
+ builder.addMemory(1, 1, true);
+ for (i = 0; i < 1000; i++) {
+ builder.addFunction("sub" + i, kSig_i_i)
+ .addBody([ // --
+ kExprGetLocal, 0, // --
+ kExprI32Const, i % 61, // --
+ kExprI32Sub]) // --
+ .exportFunc()
+ }
+
+ var module = builder.instantiate();
+ assertModule(module, kPageSize);
+
+ // Check the properties of the functions.
+ for (i = 0; i < 1000; i++) {
+ var sub = assertFunction(module, "sub" + i);
+ assertEquals(33 - (i % 61), sub(33));
+ }
+})();
+
+(function CallFunctionsTest() {
+
+ var builder = new WasmModuleBuilder();
+
+ var f = []
+
+ f[0] = builder.addFunction("add0", kSig_i_ii)
+ .addBody([
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprI32Add, // --
+ ])
+ .exportFunc()
+
+ builder.addMemory(1, 1, true);
+ for (i = 1; i < 256; i++) {
+ f[i] = builder.addFunction("add" + i, kSig_i_ii)
+ .addBody([ // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallFunction, kArity2, f[i >>> 1].index]) // --
+ .exportFunc()
+ }
+ var module = builder.instantiate();
+ assertModule(module, kPageSize);
+
+ // Check the properties of the functions.
+ for (i = 0; i < 256; i++) {
+ var add = assertFunction(module, "add" + i);
+ assertEquals(88, add(33, 55));
+ assertEquals(88888, add(33333, 55555));
+ assertEquals(8888888, add(3333333, 5555555));
+ }
+})();
diff --git a/test/mjsunit/wasm/params.js b/test/mjsunit/wasm/params.js
index 7c2b3d1..180ab1c 100644
--- a/test/mjsunit/wasm/params.js
+++ b/test/mjsunit/wasm/params.js
@@ -17,7 +17,7 @@
var builder = new WasmModuleBuilder();
- builder.addFunction("select", [type, type, type])
+ builder.addFunction("select", makeSig_r_xx(type, type))
.addBody([kExprGetLocal, which])
.exportFunc()
@@ -79,7 +79,7 @@
print("type = " + t + ", which = " + which);
var builder = new WasmModuleBuilder();
- builder.addFunction("select", [t,t,t,t,t,t,t,t,t,t,t])
+ builder.addFunction("select", [10,t,t,t,t,t,t,t,t,t,t,1,t])
.addBody([kExprGetLocal, which])
.exportFunc();
diff --git a/test/mjsunit/wasm/stack.js b/test/mjsunit/wasm/stack.js
index ed05517..a45db94 100644
--- a/test/mjsunit/wasm/stack.js
+++ b/test/mjsunit/wasm/stack.js
@@ -2,39 +2,129 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// clang-format off
// Flags: --expose-wasm
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
-var expected = "Error\n" +
- // The line numbers below will change as this test gains / loses lines..
- " at STACK (stack.js:24:11)\n" + // --
- " at <WASM> (<anonymous>)\n" + // TODO(jfb): wasm stack here.
- " at testStack (stack.js:38:18)\n" + // --
- " at stack.js:40:3"; // --
-
// The stack trace contains file path, only keep "stack.js".
function stripPath(s) {
return s.replace(/[^ (]*stack\.js/g, "stack.js");
}
+function verifyStack(frames, expected) {
+ assertEquals(expected.length, frames.length, "number of frames mismatch");
+ expected.forEach(function(exp, i) {
+ if (exp[1] != "?") {
+ assertEquals(exp[1], frames[i].getFunctionName(),
+ "["+i+"].getFunctionName()");
+ }
+ assertEquals(exp[2], frames[i].getLineNumber(), "["+i+"].getLineNumber()");
+ if (exp[0])
+ assertEquals(exp[3], frames[i].getPosition(),
+ "["+i+"].getPosition()");
+ assertContains(exp[4], frames[i].getFileName(), "["+i+"].getFileName()");
+ var toString;
+ if (exp[0]) {
+ var funName = exp[1] == "?" ? "" : exp[1];
+ toString = funName + " (<WASM>:" + exp[2] + ":" + exp[3] + ")";
+ } else {
+ toString = exp[4] + ":" + exp[2] + ":";
+ }
+ assertContains(toString, frames[i].toString(), "["+i+"].toString()");
+ });
+}
+
+
var stack;
function STACK() {
var e = new Error();
stack = e.stack;
}
-(function testStack() {
- var builder = new WasmModuleBuilder();
+var builder = new WasmModuleBuilder();
- builder.addImport("func", [kAstStmt]);
+builder.addImport("func", kSig_v_v);
- builder.addFunction(undefined, [kAstStmt])
- .addBody([kExprCallImport, 0])
- .exportAs("main");
+builder.addFunction("main", kSig_v_v)
+ .addBody([kExprCallImport, kArity0, 0])
+ .exportAs("main");
- var module = builder.instantiate({func: STACK});
+builder.addFunction("exec_unreachable", kSig_v_v)
+ .addBody([kExprUnreachable])
+ .exportAs("exec_unreachable");
+
+// Make this function unnamed, just to test also this case.
+var mem_oob_func = builder.addFunction(undefined, kSig_v_v)
+ // Access the memory at offset -1, to provoke a trap.
+ .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.
+builder.addFunction("call_mem_out_of_bounds", kSig_v_v)
+ .addBody([kExprCallFunction, kArity0, mem_oob_func.index])
+ .exportAs("call_mem_out_of_bounds");
+
+var module = builder.instantiate({func: STACK});
+
+(function testSimpleStack() {
+ var expected_string = "Error\n" +
+ // The line numbers below will change as this test gains / loses lines..
+ " at STACK (stack.js:42:11)\n" + // --
+ " at main (<WASM>:0:1)\n" + // --
+ " at testSimpleStack (stack.js:79:18)\n" + // --
+ " at stack.js:81:3"; // --
+
module.exports.main();
- assertEquals(expected, stripPath(stack));
+ assertEquals(expected_string, stripPath(stack));
+})();
+
+// For the remaining tests, collect the Callsite objects instead of just a
+// string:
+Error.prepareStackTrace = function(error, frames) {
+ return frames;
+};
+
+(function testStackFrames() {
+ module.exports.main();
+
+ verifyStack(stack, [
+ // isWasm function line pos file
+ [ false, "STACK", 42, 0, "stack.js"],
+ [ true, "main", 0, 1, null],
+ [ false, "testStackFrames", 90, 0, "stack.js"],
+ [ false, null, 99, 0, "stack.js"]
+ ]);
+})();
+
+(function testWasmUnreachable() {
+ try {
+ module.exports.exec_unreachable();
+ fail("expected wasm exception");
+ } catch (e) {
+ assertContains("unreachable", e.message);
+ verifyStack(e.stack, [
+ // isWasm function line pos file
+ [ true, "exec_unreachable", 1, 1, null],
+ [ false, "testWasmUnreachable", 103, 0, "stack.js"],
+ [ false, null, 114, 0, "stack.js"]
+ ]);
+ }
+})();
+
+(function testWasmMemOutOfBounds() {
+ try {
+ module.exports.call_mem_out_of_bounds();
+ fail("expected wasm exception");
+ } catch (e) {
+ assertContains("out of bounds", e.message);
+ verifyStack(e.stack, [
+ // isWasm function line pos file
+ [ true, "?", 2, 3, null],
+ [ true, "call_mem_out_of_bounds", 3, 1, null],
+ [ false, "testWasmMemOutOfBounds", 118, 0, "stack.js"],
+ [ false, null, 130, 0, "stack.js"]
+ ]);
+ }
})();
diff --git a/test/mjsunit/wasm/stackwalk.js b/test/mjsunit/wasm/stackwalk.js
index 8b8fb7e..5e5a1ef 100644
--- a/test/mjsunit/wasm/stackwalk.js
+++ b/test/mjsunit/wasm/stackwalk.js
@@ -10,13 +10,14 @@
function makeFFI(func) {
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstI32, kAstF64, kAstF64]);
+ var sig_index = builder.addSignature(kSig_i_dd);
builder.addImport("func", sig_index);
builder.addFunction("main", sig_index)
.addBody([
- kExprCallImport, 0, // --
- kExprGetLocal, 0, // --
- kExprGetLocal, 1]) // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallImport, kArity2, 0, // --
+ ])
.exportFunc()
return builder.instantiate({func: func}).exports.main;
diff --git a/test/mjsunit/wasm/start-function.js b/test/mjsunit/wasm/start-function.js
index bd4ccf2..3c5707a 100644
--- a/test/mjsunit/wasm/start-function.js
+++ b/test/mjsunit/wasm/start-function.js
@@ -37,19 +37,19 @@
return module;
}
-assertVerifies([kAstStmt], [kExprNop]);
-assertVerifies([kAstI32], [kExprI8Const, 0]);
+assertVerifies(kSig_v_v, [kExprNop]);
+assertVerifies(kSig_i, [kExprI8Const, 0]);
// Arguments aren't allow to start functions.
-assertFails([kAstI32, kAstI32], [kExprGetLocal, 0]);
-assertFails([kAstI32, kAstI32, kAstF32], [kExprGetLocal, 0]);
-assertFails([kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
+assertFails(kSig_i_i, [kExprGetLocal, 0]);
+assertFails(kSig_i_ii, [kExprGetLocal, 0]);
+assertFails(kSig_i_dd, [kExprGetLocal, 0]);
(function testInvalidIndex() {
print("testInvalidIndex");
var builder = new WasmModuleBuilder();
- var func = builder.addFunction("", [kAstStmt])
+ var func = builder.addFunction("", kSig_v_v)
.addBody([kExprNop]);
builder.addStart(func.index + 1);
@@ -62,7 +62,7 @@
print("testTwoStartFuncs");
var builder = new WasmModuleBuilder();
- var func = builder.addFunction("", [kAstStmt])
+ var func = builder.addFunction("", kSig_v_v)
.addBody([kExprNop]);
builder.addExplicitSection([kDeclStartFunction, 0]);
@@ -78,8 +78,8 @@
builder.addMemory(12, 12, true);
- var func = builder.addFunction("", [kAstStmt])
- .addBody([kExprI32StoreMem, 0, 0, kExprI8Const, 0, kExprI8Const, 77]);
+ var func = builder.addFunction("", kSig_v_v)
+ .addBody([kExprI8Const, 0, kExprI8Const, 77, kExprI32StoreMem, 0, 0]);
builder.addStart(func.index);
@@ -98,11 +98,11 @@
}};
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstStmt]);
+ var sig_index = builder.addSignature(kSig_v_v);
builder.addImport("foo", sig_index);
var func = builder.addFunction("", sig_index)
- .addBody([kExprCallImport, 0]);
+ .addBody([kExprCallImport, kArity0, 0]);
builder.addStart(func.index);
diff --git a/test/mjsunit/wasm/test-wasm-module-builder.js b/test/mjsunit/wasm/test-wasm-module-builder.js
index 50797d0..969b550 100644
--- a/test/mjsunit/wasm/test-wasm-module-builder.js
+++ b/test/mjsunit/wasm/test-wasm-module-builder.js
@@ -12,7 +12,7 @@
(function BasicTest() {
var module = new WasmModuleBuilder();
module.addMemory(1, 2, false);
- module.addFunction("foo", [kAstI32])
+ module.addFunction("foo", kSig_i)
.addBody([kExprI8Const, 11])
.exportAs("blarg");
@@ -23,9 +23,9 @@
(function ImportTest() {
var module = new WasmModuleBuilder();
- var index = module.addImport("print", [kAstStmt, kAstI32]);
- module.addFunction("foo", [kAstStmt])
- .addBody([kExprCallImport, index, kExprI8Const, 13])
+ var index = module.addImport("print", makeSig_v_x(kAstI32));
+ module.addFunction("foo", kSig_v_v)
+ .addBody([kExprI8Const, 13, kExprCallImport, kArity1, index])
.exportAs("main");
var buffer = module.toBuffer(debug);
@@ -36,9 +36,9 @@
(function LocalsTest() {
var module = new WasmModuleBuilder();
- module.addFunction(undefined, [kAstI32, kAstI32])
+ module.addFunction(undefined, kSig_i_i)
.addLocals({i32_count: 1})
- .addBody([kExprSetLocal, 1, kExprGetLocal, 0])
+ .addBody([kExprGetLocal, 0, kExprSetLocal, 1])
.exportAs("main");
var buffer = module.toBuffer(debug);
@@ -58,9 +58,9 @@
for (p of types) {
var module = new WasmModuleBuilder();
- module.addFunction(undefined, [p.type, p.type])
+ module.addFunction(undefined, makeSig_r_x(p.type, p.type))
.addLocals(p.locals)
- .addBody([kExprSetLocal, 1, kExprGetLocal, 0])
+ .addBody([kExprGetLocal, 0, kExprSetLocal, 1])
.exportAs("main");
var buffer = module.toBuffer(debug);
@@ -72,10 +72,10 @@
(function CallTest() {
var module = new WasmModuleBuilder();
- module.addFunction("add", [kAstI32, kAstI32, kAstI32])
- .addBody([kExprI32Add, kExprGetLocal, 0, kExprGetLocal, 1]);
- module.addFunction("main", [kAstI32, kAstI32, kAstI32])
- .addBody([kExprCallFunction, 0, kExprGetLocal, 0, kExprGetLocal, 1])
+ module.addFunction("add", kSig_i_ii)
+ .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add]);
+ module.addFunction("main", kSig_i_ii)
+ .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprCallFunction, kArity2, 0])
.exportAs("main");
var instance = module.instantiate();
@@ -85,11 +85,11 @@
(function IndirectCallTest() {
var module = new WasmModuleBuilder();
- module.addFunction("add", [kAstI32, kAstI32, kAstI32])
- .addBody([kExprI32Add, kExprGetLocal, 0, kExprGetLocal, 1]);
- module.addFunction("main", [kAstI32, kAstI32, kAstI32, kAstI32])
- .addBody([kExprCallIndirect, 0, kExprGetLocal,
- 0, kExprGetLocal, 1, kExprGetLocal, 2])
+ module.addFunction("add", kSig_i_ii)
+ .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add]);
+ module.addFunction("main", kSig_i_iii)
+ .addBody([kExprGetLocal,
+ 0, kExprGetLocal, 1, kExprGetLocal, 2, kExprCallIndirect, kArity2, 0])
.exportAs("main");
module.appendToFunctionTable([0]);
@@ -102,8 +102,8 @@
(function DataSegmentTest() {
var module = new WasmModuleBuilder();
module.addMemory(1, 1, false);
- module.addFunction("load", [kAstI32, kAstI32])
- .addBody([kExprI32LoadMem, 0, 0, kExprGetLocal, 0])
+ module.addFunction("load", kSig_i_i)
+ .addBody([kExprGetLocal, 0, kExprI32LoadMem, 0, 0])
.exportAs("load");
module.addDataSegment(0, [9, 9, 9, 9], true);
@@ -116,7 +116,7 @@
(function BasicTestWithUint8Array() {
var module = new WasmModuleBuilder();
module.addMemory(1, 2, false);
- module.addFunction("foo", [kAstI32])
+ module.addFunction("foo", kSig_i)
.addBody([kExprI8Const, 17])
.exportAs("blarg");
@@ -141,9 +141,9 @@
(function ImportTestTwoLevel() {
var module = new WasmModuleBuilder();
- var index = module.addImportWithModule("mod", "print", [kAstStmt, kAstI32]);
- module.addFunction("foo", [kAstStmt])
- .addBody([kExprCallImport, index, kExprI8Const, 19])
+ var index = module.addImportWithModule("mod", "print", makeSig_v_x(kAstI32));
+ module.addFunction("foo", kSig_v_v)
+ .addBody([kExprI8Const, 19, kExprCallImport, kArity1, index])
.exportAs("main");
var buffer = module.toBuffer(debug);
diff --git a/test/mjsunit/wasm/trap-location.js b/test/mjsunit/wasm/trap-location.js
new file mode 100644
index 0000000..5e3661d
--- /dev/null
+++ b/test/mjsunit/wasm/trap-location.js
@@ -0,0 +1,78 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+// Collect the Callsite objects instead of just a string:
+Error.prepareStackTrace = function(error, frames) {
+ return frames;
+};
+
+var builder = new WasmModuleBuilder();
+
+var sig_index = builder.addSignature(kSig_i_v)
+
+// Build a function to resemble this code:
+// if (idx < 2) {
+// return load(-2 / idx);
+// } else if (idx == 2) {
+// unreachable;
+// } else {
+// return call_indirect(idx);
+// }
+// There are four different traps which are triggered by different input values:
+// (0) division by zero; (1) mem oob; (2) unreachable; (3) invalid call target
+// Each of them also has a different location where it traps.
+builder.addFunction("main", kSig_i_i)
+ .addBody([
+ // offset 1
+ kExprBlock,
+ kExprGetLocal, 0,
+ kExprI32Const, 2,
+ kExprI32LtU,
+ kExprIf,
+ // offset 8
+ kExprI32Const, 0x7e /* -2 */,
+ kExprGetLocal, 0,
+ kExprI32DivU,
+ // offset 13
+ kExprI32LoadMem, 0, 0,
+ kExprBr, 1, 1,
+ kExprEnd,
+ // offset 20
+ kExprGetLocal, 0,
+ kExprI32Const, 2,
+ kExprI32Eq,
+ kExprIf,
+ kExprUnreachable,
+ kExprEnd,
+ // offset 28
+ kExprGetLocal, 0,
+ kExprCallIndirect, kArity0, sig_index,
+ kExprEnd,
+ ])
+ .exportAs("main");
+
+var module = builder.instantiate();
+
+function testWasmTrap(value, reason, position) {
+ try {
+ module.exports.main(value);
+ fail("expected wasm exception");
+ } catch (e) {
+ assertEquals(kTrapMsgs[reason], e.message, "trap reason");
+ assertEquals(3, e.stack.length, "number of frames");
+ assertEquals(0, e.stack[0].getLineNumber(), "wasmFunctionIndex");
+ assertEquals(position, e.stack[0].getPosition(), "position");
+ }
+}
+
+// The actual tests:
+testWasmTrap(0, kTrapDivByZero, 12);
+testWasmTrap(1, kTrapMemOutOfBounds, 13);
+testWasmTrap(2, kTrapUnreachable, 26);
+testWasmTrap(3, kTrapFuncInvalid, 30);
diff --git a/test/mjsunit/wasm/unicode-validation.js b/test/mjsunit/wasm/unicode-validation.js
new file mode 100644
index 0000000..b2e4603
--- /dev/null
+++ b/test/mjsunit/wasm/unicode-validation.js
@@ -0,0 +1,121 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+function toByteArray(s) {
+ var arr = [];
+ for (var i = 0; i < s.length; ++i) {
+ arr.push(s.charCodeAt(i) & 0xff);
+ }
+ return arr;
+}
+
+function toString(arr) {
+ if (typeof arr === "string") return arr;
+ var s = "";
+ for (var b of arr) s += String.fromCharCode(b);
+ return s;
+}
+
+function toUTF8(arr) {
+ if (typeof arr === "string" || arr === undefined) return arr;
+ return decodeURIComponent(escape(toString(arr)));
+}
+
+function isValidUtf8(arr) {
+ if (typeof arr === "string" || arr === undefined) return true;
+ try {
+ var s = toUTF8(arr);
+ for (var i = 0; i < s.length; ++i)
+ if ((s.charCodeAt(i) & 0xfffe) == 0xfffe)
+ return false;
+ return true;
+ } catch (e) {
+ if (e instanceof URIError) return false;
+ throw e;
+ }
+}
+
+function checkImportsAndExports(imported_module_name, imported_function_name,
+ internal_function_name, exported_function_name, shouldThrow) {
+ var builder = new WasmModuleBuilder();
+
+ builder.addImportWithModule(imported_module_name, imported_function_name,
+ kSig_v_v);
+
+ builder.addFunction(internal_function_name, kSig_v_v)
+ .addBody([kExprCallImport, kArity0, 0])
+ .exportAs(exported_function_name);
+
+ // sanity check: does javascript agree with out shouldThrow annotation?
+ assertEquals(shouldThrow,
+ !isValidUtf8(imported_module_name) ||
+ !isValidUtf8(imported_function_name) ||
+ !isValidUtf8(exported_function_name),
+ "JavaScript does not agree with our shouldThrow expectation");
+
+ if (!shouldThrow) {
+ imported_module_name = toUTF8(imported_module_name);
+ imported_function_name = toUTF8(imported_function_name);
+ }
+
+ var ffi = new Object();
+ if (imported_function_name === undefined) {
+ ffi[imported_module_name] = function() { };
+ } else {
+ ffi[imported_module_name] = new Object();
+ ffi[imported_module_name][imported_function_name] = function() { };
+ }
+
+ var hasThrown = true;
+ try {
+ builder.instantiate(ffi);
+ hasThrown = false;
+ } catch (err) {
+ if (!shouldThrow) print(err);
+ assertTrue(shouldThrow, "Should not throw error on valid names");
+ assertContains("UTF-8", err.toString());
+ }
+ assertEquals(shouldThrow, hasThrown,
+ "Should throw validation error on invalid names");
+}
+
+function checkImportedModuleName(name, shouldThrow) {
+ checkImportsAndExports(name, "imp", "func", undefined, shouldThrow);
+}
+
+function checkImportedFunctionName(name, shouldThrow) {
+ checkImportsAndExports("module", name, "func", "func", shouldThrow);
+}
+
+function checkExportedFunctionName(name, shouldThrow) {
+ checkImportsAndExports("module", "func", "func", name, shouldThrow);
+}
+
+function checkInternalFunctionName(name) {
+ checkImportsAndExports("module", "func", name, "func", false);
+}
+
+function checkAll(name, shouldThrow) {
+ checkImportedModuleName(name, shouldThrow);
+ checkImportedFunctionName(name, shouldThrow);
+ checkExportedFunctionName(name, shouldThrow);
+ checkInternalFunctionName(name);
+}
+
+checkAll("ascii", false);
+checkAll("some math: (½)² = ¼", false);
+checkAll("中国历史系列条目\n北", false);
+checkAll(toByteArray("\xef\xb7\x8f"), false);
+checkAll(toByteArray("a\xc2\x81\xe1\x80\xbf\xf1\x80\xa0\xbf"), false);
+checkAll(toByteArray("\xff"), true);
+checkAll(toByteArray("\xed\xa0\x8f"), true); // surrogate code points
+checkAll(toByteArray("\xe0\x82\x80"), true); // overlong sequence
+checkAll(toByteArray("\xf4\x90\x80\x80"), true); // beyond limit: U+110000
+checkAll(toByteArray("\xef\xbf\xbe"), true); // non-character; U+FFFE
+checkAll(toByteArray("with\x00null"), false);
diff --git a/test/mjsunit/wasm/unreachable.js b/test/mjsunit/wasm/unreachable.js
index 3e2dffb..d77b53e 100644
--- a/test/mjsunit/wasm/unreachable.js
+++ b/test/mjsunit/wasm/unreachable.js
@@ -9,7 +9,7 @@
var main = (function () {
var builder = new WasmModuleBuilder();
- builder.addFunction("main", [kAstStmt])
+ builder.addFunction("main", kSig_v_v)
.addBody([kExprUnreachable])
.exportAs("main");
@@ -23,4 +23,4 @@
print("correctly caught: " + e);
exception = e;
}
-assertEquals("unreachable", exception);
+assertEquals("unreachable", exception.message);
diff --git a/test/mjsunit/wasm/verify-function-simple.js b/test/mjsunit/wasm/verify-function-simple.js
index aa5c676..31c23a6 100644
--- a/test/mjsunit/wasm/verify-function-simple.js
+++ b/test/mjsunit/wasm/verify-function-simple.js
@@ -8,9 +8,9 @@
try {
var data = bytes(
- 0, kAstStmt, // signature
- kDeclNoLocals, // --
- kExprNop // body
+ kWasmFunctionTypeForm, 0, kAstStmt, // signature
+ kDeclNoLocals, // --
+ kExprNop // body
);
Wasm.verifyFunction(data);
@@ -23,9 +23,9 @@
var threw = false;
try {
var data = bytes(
- 0, kAstI32, // signature
- kDeclNoLocals, // --
- kExprBlock, 2, kExprNop, kExprNop // body
+ kWasmFunctionTypeForm, 0, 1, kAstI32, // signature
+ kDeclNoLocals, // --
+ kExprBlock, kExprNop, kExprNop, kExprEnd // body
);
Wasm.verifyFunction(data);
diff --git a/test/mjsunit/wasm/wasm-constants.js b/test/mjsunit/wasm/wasm-constants.js
index cc620bb..389383e 100644
--- a/test/mjsunit/wasm/wasm-constants.js
+++ b/test/mjsunit/wasm/wasm-constants.js
@@ -21,7 +21,7 @@
var kWasmH2 = 0x73;
var kWasmH3 = 0x6d;
-var kWasmV0 = 10;
+var kWasmV0 = 11;
var kWasmV1 = 0;
var kWasmV2 = 0;
var kWasmV3 = 0;
@@ -65,10 +65,16 @@
var kDeclFunctionBodies = 0x0b;
var kDeclNames = 0x0c;
+var kArity0 = 0;
+var kArity1 = 1;
+var kArity2 = 2;
+var kArity3 = 3;
+var kWasmFunctionTypeForm = 0x40;
+
var section_names = [
- "memory", "signatures", "functions", "globals", "data_segments",
- "function_table", "end", "start_function", "import_table", "export_table",
- "function_signatures", "function_bodies", "names"];
+ "memory", "type", "old_function", "global", "data",
+ "table", "end", "start", "import", "export",
+ "function", "code", "name"];
// Function declaration flags
var kDeclFunctionName = 0x01;
@@ -83,31 +89,60 @@
var kAstF32 = 3;
var kAstF64 = 4;
+// Useful signatures
+var kSig_i = [0, 1, kAstI32];
+var kSig_d = [0, 1, kAstF64];
+var kSig_i_i = [1, kAstI32, 1, kAstI32];
+var kSig_i_ii = [2, kAstI32, kAstI32, 1, kAstI32];
+var kSig_i_iii = [3, kAstI32, kAstI32, kAstI32, 1, kAstI32];
+var kSig_d_dd = [2, kAstF64, kAstF64, 1, kAstF64];
+var kSig_l_ll = [2, kAstI64, kAstI64, 1, kAstI64];
+var kSig_i_dd = [2, kAstF64, kAstF64, 1, kAstI32];
+var kSig_v_v = [0, 0];
+var kSig_i_v = [0, 1, kAstI32];
+
+function makeSig_v_xx(x) {
+ return [2, x, x, 0];
+}
+
+function makeSig_v_x(x) {
+ return [1, x, 0];
+}
+
+function makeSig_r_xx(r, x) {
+ return [2, x, x, 1, r];
+}
+
+function makeSig_r_x(r, x) {
+ return [1, x, 1, r];
+}
+
// Opcodes
var kExprNop = 0x00;
var kExprBlock = 0x01;
var kExprLoop = 0x02;
var kExprIf = 0x03;
-var kExprIfElse = 0x04;
+var kExprElse = 0x04;
var kExprSelect = 0x05;
var kExprBr = 0x06;
var kExprBrIf = 0x07;
-var kExprTableSwitch = 0x08;
-var kExprReturn = 0x14;
-var kExprUnreachable = 0x15;
+var kExprBrTable = 0x08;
+var kExprReturn = 0x09;
+var kExprUnreachable = 0x0a;
+var kExprEnd = 0x0f;
-var kExprI8Const = 0x09;
-var kExprI32Const = 0x0a;
-var kExprI64Const = 0x0b;
-var kExprF64Const = 0x0c;
-var kExprF32Const = 0x0d;
-var kExprGetLocal = 0x0e;
-var kExprSetLocal = 0x0f;
-var kExprLoadGlobal = 0x10;
-var kExprStoreGlobal = 0x11;
-var kExprCallFunction = 0x12;
-var kExprCallIndirect = 0x13;
-var kExprCallImport = 0x1F;
+var kExprI32Const = 0x10;
+var kExprI64Const = 0x11;
+var kExprF64Const = 0x12;
+var kExprF32Const = 0x13;
+var kExprGetLocal = 0x14;
+var kExprSetLocal = 0x15;
+var kExprCallFunction = 0x16;
+var kExprCallIndirect = 0x17;
+var kExprCallImport = 0x18;
+var kExprI8Const = 0xcb;
+var kExprLoadGlobal = 0xcc;
+var kExprStoreGlobal = 0xcd;
var kExprI32LoadMem8S = 0x20;
var kExprI32LoadMem8U = 0x21;
@@ -290,8 +325,8 @@
}
threwException = false;
} catch (e) {
- assertEquals("string", typeof e);
- assertEquals(kTrapMsgs[trap], e);
+ assertEquals("object", typeof e);
+ assertEquals(kTrapMsgs[trap], e.message);
// Success.
return;
}
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js
index e1d9963..bfc4460 100644
--- a/test/mjsunit/wasm/wasm-module-builder.js
+++ b/test/mjsunit/wasm/wasm-module-builder.js
@@ -53,7 +53,7 @@
return this;
}
-// Add a signature; format is [rettype, param0, param1, ...]
+// Add a signature; format is [param_count, param0, param1, ..., retcount, ret0]
WasmModuleBuilder.prototype.addSignature = function(sig) {
// TODO: canonicalize signatures?
this.signatures.push(sig);
@@ -75,9 +75,7 @@
}
WasmModuleBuilder.prototype.addImport = function(name, sig) {
- var sig_index = (typeof sig) == "number" ? sig : this.addSignature(sig);
- this.imports.push({module: name, name: undefined, sig_index: sig_index});
- return this.imports.length - 1;
+ this.addImportWithModule(name, undefined, sig);
}
WasmModuleBuilder.prototype.addDataSegment = function(addr, data, init) {
@@ -107,9 +105,19 @@
}
function emit_string(bytes, string) {
- emit_varint(bytes, string.length);
- for (var i = 0; i < string.length; i++) {
- emit_u8(bytes, string.charCodeAt(i));
+ // When testing illegal names, we pass a byte array directly.
+ if (string instanceof Array) {
+ emit_varint(bytes, string.length);
+ emit_bytes(bytes, string);
+ return;
+ }
+
+ // This is the hacky way to convert a JavaScript scring to a UTF8 encoded
+ // string only containing single-byte characters.
+ var string_utf8 = unescape(encodeURIComponent(string));
+ emit_varint(bytes, string_utf8.length);
+ for (var i = 0; i < string_utf8.length; i++) {
+ emit_u8(bytes, string_utf8.charCodeAt(i));
}
}
@@ -132,12 +140,14 @@
}
function emit_section(bytes, section_code, content_generator) {
- // Start the section in a temporary buffer: its full length isn't know yet.
+ // Emit section name.
+ emit_string(bytes, section_names[section_code]);
+ // Emit the section to a temporary buffer: its full length isn't know yet.
var tmp_bytes = [];
- emit_string(tmp_bytes, section_names[section_code]);
content_generator(tmp_bytes);
- // Now that we know the section length, emit it and copy the section.
+ // Emit section length.
emit_varint(bytes, tmp_bytes.length);
+ // Copy the temporary buffer.
Array.prototype.push.apply(bytes, tmp_bytes);
}
@@ -149,24 +159,13 @@
var wasm = this;
- // Add memory section
- if (wasm.memory != undefined) {
- if (debug) print("emitting memory @ " + bytes.length);
- emit_section(bytes, kDeclMemory, function(bytes) {
- emit_varint(bytes, wasm.memory.min);
- emit_varint(bytes, wasm.memory.max);
- emit_u8(bytes, wasm.memory.exp ? 1 : 0);
- });
- }
-
// Add signatures section
if (wasm.signatures.length > 0) {
if (debug) print("emitting signatures @ " + bytes.length);
emit_section(bytes, kDeclSignatures, function(bytes) {
emit_varint(bytes, wasm.signatures.length);
for (sig of wasm.signatures) {
- var params = sig.length - 1;
- emit_varint(bytes, params);
+ emit_u8(bytes, kWasmFunctionTypeForm);
for (var j = 0; j < sig.length; j++) {
emit_u8(bytes, sig[j]);
}
@@ -187,7 +186,7 @@
});
}
- // Add functions section
+ // Add functions declarations
var names = false;
var exports = 0;
if (wasm.functions.length > 0) {
@@ -206,6 +205,54 @@
}
});
+ }
+
+ // Add function table.
+ if (wasm.function_table.length > 0) {
+ if (debug) print("emitting function table @ " + bytes.length);
+ emit_section(bytes, kDeclFunctionTable, function(bytes) {
+ emit_varint(bytes, wasm.function_table.length);
+ for (index of wasm.function_table) {
+ emit_varint(bytes, index);
+ }
+ });
+ }
+
+ // Add memory section
+ if (wasm.memory != undefined) {
+ if (debug) print("emitting memory @ " + bytes.length);
+ emit_section(bytes, kDeclMemory, function(bytes) {
+ emit_varint(bytes, wasm.memory.min);
+ emit_varint(bytes, wasm.memory.max);
+ emit_u8(bytes, wasm.memory.exp ? 1 : 0);
+ });
+ }
+
+
+ // Add export table.
+ if (exports > 0) {
+ if (debug) print("emitting exports @ " + bytes.length);
+ emit_section(bytes, kDeclExportTable, function(bytes) {
+ emit_varint(bytes, exports);
+ for (func of wasm.functions) {
+ for (exp of func.exports) {
+ emit_varint(bytes, func.index);
+ emit_string(bytes, exp);
+ }
+ }
+ });
+ }
+
+ // Add start function section.
+ if (wasm.start_index != undefined) {
+ if (debug) print("emitting start function @ " + bytes.length);
+ emit_section(bytes, kDeclStartFunction, function(bytes) {
+ emit_varint(bytes, wasm.start_index);
+ });
+ }
+
+ // Add function bodies.
+ if (wasm.functions.length > 0) {
// emit function bodies
if (debug) print("emitting function bodies @ " + bytes.length);
emit_section(bytes, kDeclFunctionBodies, function(bytes) {
@@ -244,50 +291,7 @@
});
}
- // emit function names
- if (has_names) {
- if (debug) print("emitting names @ " + bytes.length);
- emit_section(bytes, kDeclNames, function(bytes) {
- emit_varint(bytes, wasm.functions.length);
- for (func of wasm.functions) {
- var name = func.name == undefined ? "" : func.name;
- emit_string(bytes, name);
- emit_u8(bytes, 0); // local names count == 0
- }
- });
- }
-
- // Add start function section.
- if (wasm.start_index != undefined) {
- if (debug) print("emitting start function @ " + bytes.length);
- emit_section(bytes, kDeclStartFunction, function(bytes) {
- emit_varint(bytes, wasm.start_index);
- });
- }
-
- if (wasm.function_table.length > 0) {
- if (debug) print("emitting function table @ " + bytes.length);
- emit_section(bytes, kDeclFunctionTable, function(bytes) {
- emit_varint(bytes, wasm.function_table.length);
- for (index of wasm.function_table) {
- emit_varint(bytes, index);
- }
- });
- }
-
- if (exports > 0) {
- if (debug) print("emitting exports @ " + bytes.length);
- emit_section(bytes, kDeclExportTable, function(bytes) {
- emit_varint(bytes, exports);
- for (func of wasm.functions) {
- for (exp of func.exports) {
- emit_varint(bytes, func.index);
- emit_string(bytes, exp);
- }
- }
- });
- }
-
+ // Add data segments.
if (wasm.data_segments.length > 0) {
if (debug) print("emitting data segments @ " + bytes.length);
emit_section(bytes, kDeclDataSegments, function(bytes) {
@@ -300,12 +304,25 @@
});
}
- // Emit any explicitly added sections
+ // Add any explicitly added sections
for (exp of wasm.explicit) {
if (debug) print("emitting explicit @ " + bytes.length);
emit_bytes(bytes, exp);
}
+ // Add function names.
+ if (has_names) {
+ if (debug) print("emitting names @ " + bytes.length);
+ emit_section(bytes, kDeclNames, function(bytes) {
+ emit_varint(bytes, wasm.functions.length);
+ for (func of wasm.functions) {
+ var name = func.name == undefined ? "" : func.name;
+ emit_string(bytes, name);
+ emit_u8(bytes, 0); // local names count == 0
+ }
+ });
+ }
+
// End the module.
if (debug) print("emitting end @ " + bytes.length);
emit_section(bytes, kDeclEnd, function(bytes) {});
diff --git a/test/mjsunit/wasm/wasm-object-api.js b/test/mjsunit/wasm/wasm-object-api.js
index 2f25c66..96088b8 100644
--- a/test/mjsunit/wasm/wasm-object-api.js
+++ b/test/mjsunit/wasm/wasm-object-api.js
@@ -10,3 +10,4 @@
assertEquals("function", typeof Wasm.verifyFunction);
assertEquals("function", typeof Wasm.instantiateModule);
assertEquals("function", typeof Wasm.instantiateModuleFromAsm);
+assertFalse(undefined == Wasm.experimentalVersion);
diff --git a/test/mozilla/mozilla.gyp b/test/mozilla/mozilla.gyp
index 1202d28..0327dd8 100644
--- a/test/mozilla/mozilla.gyp
+++ b/test/mozilla/mozilla.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'mozilla.isolate',
diff --git a/test/mozilla/mozilla.status b/test/mozilla/mozilla.status
index 0f7d4aa..d4eebee 100644
--- a/test/mozilla/mozilla.status
+++ b/test/mozilla/mozilla.status
@@ -59,11 +59,14 @@
# TODO(turbofan): Causes timeouts since top-level code is optimized.
'ecma_3/Statements/regress-324650': [PASS, NO_VARIANTS],
+ 'ecma_3/Statements/regress-444979': [PASS, NO_VARIANTS],
'ecma_3/Statements/regress-74474-002': [PASS, NO_VARIANTS],
'ecma_3/Statements/regress-74474-003': [PASS, NO_VARIANTS],
'js1_5/Regress/regress-111557': [PASS, NO_VARIANTS],
'js1_5/Regress/regress-155081': [PASS, NO_VARIANTS],
'js1_5/Regress/regress-155081-2': [PASS, NO_VARIANTS],
+ 'js1_5/Regress/regress-159334': [PASS, NO_VARIANTS],
+ 'js1_5/Regress/regress-321971': [PASS, NO_VARIANTS],
'js1_5/Regress/regress-451322': [PASS, NO_VARIANTS],
# TODO(turbofan): Large switch statements crash.
@@ -187,7 +190,7 @@
'ecma_3/RegExp/regress-209067': [PASS, ['mode == debug', FAIL]],
'js1_5/GC/regress-278725': [PASS, ['mode == debug', FAIL]],
# http://b/issue?id=1206983
- 'js1_5/Regress/regress-367561-03': [PASS, ['mode == debug', FAIL]],
+ 'js1_5/Regress/regress-367561-03': [PASS, ['mode == debug', FAIL], NO_VARIANTS],
'ecma/Date/15.9.5.10-2': [PASS, FAIL, ['mode == debug', TIMEOUT, NO_VARIANTS]],
# These tests create two Date objects just after each other and
@@ -239,7 +242,7 @@
'js1_5/Array/regress-99120-01': [PASS, FAIL, NO_VARIANTS],
'js1_5/Array/regress-99120-02': [PASS, FAIL],
'js1_5/Regress/regress-347306-01': [PASS, FAIL],
- 'js1_5/Regress/regress-416628': [PASS, FAIL, ['mode == debug', TIMEOUT, NO_VARIANTS]],
+ 'js1_5/Regress/regress-416628': [PASS, FAIL, ['mode == debug', TIMEOUT], NO_VARIANTS],
# The following two tests assume that daylight savings time starts first
diff --git a/test/optimize_for_size.gyp b/test/optimize_for_size.gyp
index ac40ba8..047e3d8 100644
--- a/test/optimize_for_size.gyp
+++ b/test/optimize_for_size.gyp
@@ -16,8 +16,8 @@
'webkit/webkit.gyp:webkit_run',
],
'includes': [
- '../build/features.gypi',
- '../build/isolate.gypi',
+ '../gypfiles/features.gypi',
+ '../gypfiles/isolate.gypi',
],
'sources': [
'optimize_for_size.isolate',
diff --git a/test/perf.gyp b/test/perf.gyp
index ff84606..4f024f7 100644
--- a/test/perf.gyp
+++ b/test/perf.gyp
@@ -14,8 +14,8 @@
'../src/d8.gyp:d8_run',
],
'includes': [
- '../build/features.gypi',
- '../build/isolate.gypi',
+ '../gypfiles/features.gypi',
+ '../gypfiles/isolate.gypi',
],
'sources': [
'perf.isolate',
diff --git a/test/preparser/preparser.gyp b/test/preparser/preparser.gyp
index cb763d6..8e944ed 100644
--- a/test/preparser/preparser.gyp
+++ b/test/preparser/preparser.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'preparser.isolate',
diff --git a/test/simdjs/simdjs.gyp b/test/simdjs/simdjs.gyp
index df0aa5e..c0c24dc 100644
--- a/test/simdjs/simdjs.gyp
+++ b/test/simdjs/simdjs.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'simdjs.isolate',
diff --git a/test/test262/detachArrayBuffer.js b/test/test262/detachArrayBuffer.js
new file mode 100644
index 0000000..adfece7
--- /dev/null
+++ b/test/test262/detachArrayBuffer.js
@@ -0,0 +1,7 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function $DETACHBUFFER(buffer) {
+ %ArrayBufferNeuter(buffer);
+}
diff --git a/test/test262/test262.gyp b/test/test262/test262.gyp
index 5d79add..2bdc6ce 100644
--- a/test/test262/test262.gyp
+++ b/test/test262/test262.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'test262.isolate',
diff --git a/test/test262/test262.isolate b/test/test262/test262.isolate
index 0ac045a..4e14190 100644
--- a/test/test262/test262.isolate
+++ b/test/test262/test262.isolate
@@ -5,6 +5,7 @@
'variables': {
'files': [
'data.tar',
+ 'detachArrayBuffer.js',
'harness-adapt.js',
'test262.status',
'testcfg.py',
diff --git a/test/test262/test262.status b/test/test262/test262.status
index 8cd4496..27b56d4 100644
--- a/test/test262/test262.status
+++ b/test/test262/test262.status
@@ -119,11 +119,7 @@
'built-ins/RegExp/prototype/exec/get-sticky-err': [FAIL],
'built-ins/RegExp/prototype/test/get-sticky-err': [FAIL],
- # Missing lastIndex support
- 'built-ins/RegExp/prototype/Symbol.split/str-result-coerce-length-err': [FAIL],
-
# Times out
- 'built-ins/RegExp/prototype/Symbol.split/str-coerce-lastindex': [SKIP],
'built-ins/RegExp/prototype/Symbol.match/coerce-global': [SKIP],
'built-ins/RegExp/prototype/Symbol.match/builtin-coerce-global': [SKIP],
@@ -131,6 +127,21 @@
'built-ins/RegExp/prototype/Symbol.replace/y-init-lastindex': [FAIL],
'built-ins/RegExp/prototype/Symbol.replace/y-set-lastindex': [FAIL],
+ # https://code.google.com/p/v8/issues/detail?id=4504
+ # https://bugs.chromium.org/p/chromium/issues/detail?id=624318
+ 'built-ins/RegExp/prototype/Symbol.match/builtin-failure-set-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.match/builtin-failure-y-set-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.match/builtin-success-y-set-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.match/g-init-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.match/g-match-empty-set-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.match/y-fail-lastindex-no-write': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.replace/g-init-lastindex-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.replace/y-fail-lastindex-no-write': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.search/set-lastindex-init-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/Symbol.search/set-lastindex-restore-err': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/exec/y-fail-lastindex-no-write': [PASS, FAIL],
+ 'built-ins/RegExp/prototype/test/y-fail-lastindex-no-write': [PASS, FAIL],
+
# SKIP rather than FAIL, as the test checks for an exception which
# happens to be thrown for some other reason.
'built-ins/RegExp/prototype/Symbol.split/str-result-get-length-err': [SKIP],
@@ -143,14 +154,16 @@
'intl402/NumberFormat/11.1.1_1': [FAIL],
# https://code.google.com/p/v8/issues/detail?id=4476
- 'built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional': [FAIL],
- 'built-ins/String/prototype/toLocaleLowerCase/supplementary_plane': [FAIL],
+ # The bug is fixed but behind a flag, --icu_case_mapping.
'built-ins/String/prototype/toLowerCase/special_casing_conditional': [FAIL],
'built-ins/String/prototype/toLowerCase/supplementary_plane': [FAIL],
- 'built-ins/String/prototype/toLocaleUpperCase/supplementary_plane': [FAIL],
'built-ins/String/prototype/toUpperCase/supplementary_plane': [FAIL],
# https://code.google.com/p/v8/issues/detail?id=4477
+ # The bug is fixed but behind a flag, --icu_case_mapping.
+ 'built-ins/String/prototype/toLocaleUpperCase/supplementary_plane': [FAIL],
+ 'built-ins/String/prototype/toLocaleLowerCase/supplementary_plane': [FAIL],
+ 'built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional': [FAIL],
'intl402/String/prototype/toLocaleLowerCase/special_casing_Azeri': [FAIL],
'intl402/String/prototype/toLocaleLowerCase/special_casing_Lithuanian': [FAIL],
'intl402/String/prototype/toLocaleLowerCase/special_casing_Turkish': [FAIL],
@@ -184,15 +197,6 @@
'built-ins/DataView/prototype/setUint8/index-check-before-value-conversion': [FAIL],
'built-ins/DataView/prototype/setInt8/index-check-before-value-conversion': [FAIL],
- # https://bugs.chromium.org/p/v8/issues/detail?id=4706
- 'language/statements/class/subclass/builtin-objects/NativeError/EvalError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/NativeError/RangeError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/NativeError/ReferenceError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/NativeError/SyntaxError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/NativeError/TypeError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/NativeError/URIError-message': [FAIL],
- 'language/statements/class/subclass/builtin-objects/Error/message-property-assignment': [FAIL],
-
# https://code.google.com/p/chromium/issues/detail?id=581577
'built-ins/RegExp/prototype/source/15.10.7.1-1': [FAIL],
'built-ins/RegExp/prototype/global/15.10.7.2-1': [FAIL],
@@ -208,6 +212,153 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=4784
'built-ins/TypedArrays/buffer-arg-defined-negative-length': [FAIL],
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4890
+ 'language/statements/class/subclass/default-constructor-spread-override': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4901
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-greater-than-last-index': [FAIL],
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-lower-than-zero': [FAIL],
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-minus-zero': [FAIL],
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-not-integer': [FAIL],
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/key-is-numericindex-desc-not-writable': [FAIL],
+ 'built-ins/TypedArrays/internals/Set/key-is-minus-zero': [FAIL],
+ 'built-ins/TypedArrays/internals/Set/key-is-not-integer': [FAIL],
+ 'built-ins/TypedArrays/internals/Set/key-is-out-of-bounds': [FAIL],
+ 'built-ins/TypedArrays/internals/Set/tonumber-value-throws': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4895
+ 'built-ins/TypedArrays/internals/HasProperty/detached-buffer': [FAIL],
+ 'built-ins/TypedArrays/internals/Set/detached-buffer': [FAIL],
+ 'built-ins/TypedArrays/internals/GetOwnProperty/detached-buffer': [FAIL],
+ 'built-ins/TypedArrays/internals/Get/detached-buffer': [FAIL],
+ 'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL],
+ # Some TypedArray methods throw due to the same bug, from Get
+ 'built-ins/TypedArray/prototype/every/callbackfn-detachbuffer': [FAIL],
+ 'built-ins/TypedArray/prototype/find/predicate-may-detach-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/findIndex/predicate-may-detach-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/forEach/callbackfn-detachbuffer': [FAIL],
+ 'built-ins/TypedArray/prototype/map/callbackfn-detachbuffer': [FAIL],
+ 'built-ins/TypedArray/prototype/some/callbackfn-detachbuffer': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4648
+ 'built-ins/TypedArray/prototype/copyWithin/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/entries/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/every/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/fill/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/filter/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/find/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/findIndex/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/forEach/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/includes/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/indexOf/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/join/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/keys/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/lastIndexOf/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/map/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/reverse/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/set/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/slice/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/some/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/sort/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/toLocaleString/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/toString/detached-buffer': [FAIL],
+ 'built-ins/TypedArray/prototype/values/detached-buffer': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4925
+ 'built-ins/ThrowTypeError/forbidden-arguments': [FAIL],
+ 'built-ins/ThrowTypeError/forbidden-caller': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4034
+ 'built-ins/ThrowTypeError/unique-per-realm-function-proto': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4902
+ 'built-ins/TypedArray/prototype/byteLength/prop-desc': [FAIL],
+ 'built-ins/TypedArray/prototype/byteOffset/prop-desc': [FAIL],
+ 'built-ins/TypedArray/prototype/copyWithin/get-length-ignores-length-prop': [FAIL],
+ 'built-ins/TypedArray/prototype/every/get-length-ignores-length-prop': [FAIL],
+ 'built-ins/TypedArray/prototype/every/get-length-uses-internal-arraylength': [FAIL],
+ 'built-ins/TypedArray/prototype/fill/get-length-ignores-length-prop': [FAIL],
+ 'built-ins/TypedArray/prototype/find/get-length-ignores-length-prop': [FAIL],
+ 'built-ins/TypedArray/prototype/findIndex/get-length-ignores-length-prop': [FAIL],
+ 'built-ins/TypedArray/prototype/indexOf/get-length-uses-internal-arraylength': [FAIL],
+ 'built-ins/TypedArray/prototype/lastIndexOf/get-length-uses-internal-arraylength': [FAIL],
+ 'built-ins/TypedArray/prototype/length/prop-desc': [FAIL],
+ 'built-ins/TypedArray/prototype/some/get-length-uses-internal-arraylength': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4231
+ 'language/eval-code/direct/var-env-lower-lex-catch-non-strict': [FAIL],
+ 'language/statements/try/early-catch-lex': [FAIL],
+ 'language/statements/try/early-catch-var': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4951
+ 'language/expressions/assignment/destructuring/array-elem-iter-rtrn-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-iter-rtrn-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-iter-rtrn-close-null': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-iter-thrw-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-iter-thrw-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-list-rtrn-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-list-rtrn-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-list-rtrn-close-null': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-list-thrw-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-list-thrw-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-rest-rtrn-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-rest-rtrn-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-rest-rtrn-close-null': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-rest-thrw-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-elem-trlg-iter-rest-thrw-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-iter-rtrn-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-iter-rtrn-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-iter-rtrn-close-null': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-iter-thrw-close': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-iter-thrw-close-err': [FAIL],
+ 'language/expressions/assignment/destructuring/array-rest-lref-err': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=896
+ 'language/literals/regexp/early-err-pattern': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4468
+ 'language/eval-code/direct/non-definable-function-with-function': [FAIL],
+ 'language/eval-code/direct/non-definable-function-with-variable': [FAIL],
+ 'language/eval-code/indirect/non-definable-function-with-function': [FAIL],
+ 'language/eval-code/indirect/non-definable-function-with-variable': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4955
+ 'language/eval-code/direct/var-env-global-lex-non-strict': [FAIL],
+ 'language/eval-code/direct/var-env-lower-lex-non-strict': [FAIL],
+ 'language/eval-code/indirect/var-env-global-lex-non-strict': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4124
+ 'built-ins/Simd/*': [SKIP],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4958
+ 'built-ins/Function/prototype/toString/Function': [FAIL],
+ 'built-ins/Function/prototype/toString/GeneratorFunction': [FAIL],
+ 'built-ins/Function/prototype/toString/function-declaration': [FAIL],
+ 'built-ins/Function/prototype/toString/function-declaration-non-simple-parameter-list': [FAIL],
+ 'built-ins/Function/prototype/toString/function-expression': [FAIL],
+ 'built-ins/Function/prototype/toString/generator-function-declaration': [FAIL],
+ 'built-ins/Function/prototype/toString/generator-function-expression': [FAIL],
+ 'built-ins/Function/prototype/toString/generator-method': [FAIL],
+ 'built-ins/Function/prototype/toString/getter-class': [FAIL],
+ 'built-ins/Function/prototype/toString/getter-class-static': [FAIL],
+ 'built-ins/Function/prototype/toString/getter-object': [FAIL],
+ 'built-ins/Function/prototype/toString/line-terminator-normalisation-CR': [FAIL],
+ 'built-ins/Function/prototype/toString/line-terminator-normalisation-CR-LF': [FAIL],
+ 'built-ins/Function/prototype/toString/line-terminator-normalisation-LF': [FAIL],
+ 'built-ins/Function/prototype/toString/method-class': [FAIL],
+ 'built-ins/Function/prototype/toString/method-class-static': [FAIL],
+ 'built-ins/Function/prototype/toString/method-computed-property-name': [FAIL],
+ 'built-ins/Function/prototype/toString/method-object': [FAIL],
+ 'built-ins/Function/prototype/toString/setter-class': [FAIL],
+ 'built-ins/Function/prototype/toString/setter-class-static': [FAIL],
+ 'built-ins/Function/prototype/toString/setter-object': [FAIL],
+ 'built-ins/Function/prototype/toString/unicode': [FAIL],
+
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4985
+ 'language/reserved-words/await-module': [SKIP],
+ 'language/module-code/strict-mode': [SKIP],
+
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation
@@ -215,8 +366,6 @@
# incompatibilities if the test cases turn out to be broken or ambiguous.
# Some of these are related to v8:4361 in being visible side effects from Intl.
'intl402/6.2.3': [FAIL],
- 'intl402/9.2.1_2': [FAIL],
- 'intl402/9.2.6_2': [FAIL],
'intl402/Collator/10.1.2.1_4': [FAIL],
'intl402/Collator/10.1.2_a': [PASS, FAIL],
'intl402/Collator/10.2.3_b': [PASS, FAIL],
@@ -239,37 +388,38 @@
# https://code.google.com/p/v8/issues/detail?id=4693
'language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration': [PASS, FAIL_SLOPPY],
- ############################ INVALID TESTS #############################
+ # https://bugs.chromium.org/p/v8/issues/detail?id=4953
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws': [FAIL],
+ 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws': [FAIL],
- # The reference value calculated by Test262 is incorrect if you run these
- # tests in PST/PDT between first Sunday in March and first Sunday in April.
- # The DST switch was moved in 2007 whereas Test262 bases the reference value
- # on 2000. Test262 Bug: https://bugs.ecmascript.org/show_bug.cgi?id=293
- 'built-ins/Date/S15.9.3.1_A5_T1': [PASS, FAIL_OK],
- 'built-ins/Date/S15.9.3.1_A5_T2': [PASS, FAIL_OK],
- 'built-ins/Date/S15.9.3.1_A5_T3': [PASS, FAIL_OK],
- 'built-ins/Date/S15.9.3.1_A5_T4': [PASS, FAIL_OK],
- 'built-ins/Date/S15.9.3.1_A5_T5': [PASS, FAIL_OK],
- 'built-ins/Date/S15.9.3.1_A5_T6': [PASS, FAIL_OK],
+ # We do not expose Array.prototype.values due to webcompat issues.
+ # Most recent incompatability: https://crbug.com/615873
+ # https://code.google.com/p/v8/issues/detail?id=4247
+ 'built-ins/Array/prototype/Symbol.iterator': [FAIL],
+ 'built-ins/Array/prototype/values/returns-iterator': [FAIL],
+ 'built-ins/Array/prototype/values/returns-iterator-from-object': [FAIL],
+ 'built-ins/Array/prototype/values/prop-desc': [FAIL],
+ 'built-ins/Array/prototype/values/name': [FAIL],
+ 'built-ins/Array/prototype/values/length': [FAIL],
+ 'built-ins/Array/prototype/values/iteration': [FAIL],
+ 'built-ins/Array/prototype/values/iteration-mutable': [FAIL],
+ 'built-ins/Array/prototype/Symbol.unscopables/value': [FAIL],
+
+ ############################ INVALID TESTS #############################
# Test makes unjustified assumptions about the number of calls to SortCompare.
# Test262 Bug: https://bugs.ecmascript.org/show_bug.cgi?id=596
'built-ins/Array/prototype/sort/bug_596_1': [PASS, FAIL_OK],
- # Test bug https://github.com/tc39/test262/issues/518
- 'built-ins/TypedArrays/object-arg-throws-setting-typedarray-property': [FAIL],
- 'built-ins/Object/getOwnPropertyDescriptors/duplicate-keys': [FAIL],
- 'built-ins/Object/getOwnPropertyDescriptors/symbols-included': [FAIL],
-
- # Test bug https://github.com/tc39/test262/issues/521
- 'built-ins/TypedArray/from/mapfn-is-not-callable': [FAIL],
-
- # Test bug https://github.com/tc39/test262/issues/529
- 'built-ins/Math/cos/S15.8.2.7_A7': [PASS, FAIL_OK],
- 'built-ins/Math/sin/S15.8.2.16_A7': [PASS, FAIL_OK],
- 'built-ins/Math/tan/S15.8.2.18_A7': [PASS, FAIL_OK],
- 'built-ins/Math/exp/S15.8.2.8_A6': [PASS, FAIL_OK], # Math.exp (less precise with --fast-math)
-
############################ SKIPPED TESTS #############################
# These tests take a looong time to run.
@@ -292,26 +442,6 @@
'built-ins/Array/prototype/slice/S15.4.4.10_A3_T2': [SKIP],
}], # ALWAYS
-['system == linux', {
- # BUG(v8:4437).
- 'intl402/Collator/10.1.1_19_c': [PASS, FAIL],
- 'intl402/Collator/9.2.5_11_g_ii_2': [PASS, FAIL],
- 'intl402/NumberFormat/11.1.1_17': [PASS, FAIL],
- 'intl402/NumberFormat/11.1.1_19': [PASS, FAIL],
- 'intl402/NumberFormat/prototype/format/11.3.2_TRF': [PASS, FAIL],
- 'intl402/NumberFormat/prototype/format/11.3.2_TRP': [PASS, FAIL],
-}], # system == linux
-
-['system == macos', {
- # BUG(v8:4437).
- 'intl402/Collator/10.1.1_19_c': [SKIP],
- 'intl402/Collator/9.2.5_11_g_ii_2': [SKIP],
- 'intl402/NumberFormat/11.1.1_17': [SKIP],
- 'intl402/NumberFormat/11.1.1_19': [SKIP],
- 'intl402/NumberFormat/prototype/format/11.3.2_TRF': [SKIP],
- 'intl402/NumberFormat/prototype/format/11.3.2_TRP': [SKIP],
-}], # system == macos
-
['no_i18n == True', {
# Unicode canonicalization is not available with i18n turned off.
'built-ins/String/prototype/localeCompare/15.5.4.9_CE': [SKIP],
@@ -323,8 +453,23 @@
'built-ins/String/prototype/normalize/return-normalized-string': [SKIP],
'built-ins/String/prototype/normalize/return-normalized-string-from-coerced-form': [SKIP],
'built-ins/String/prototype/normalize/return-normalized-string-using-default-parameter': [SKIP],
-}], # no_i18n == True
+ # Case-conversion is not fully compliant to the Unicode spec with i18n off.
+ 'built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional': [FAIL],
+ 'built-ins/String/prototype/toLocaleLowerCase/supplementary_plane': [FAIL],
+ 'built-ins/String/prototype/toLowerCase/special_casing_conditional': [FAIL],
+ 'built-ins/String/prototype/toLowerCase/supplementary_plane': [FAIL],
+ 'built-ins/String/prototype/toLocaleUpperCase/supplementary_plane': [FAIL],
+ 'built-ins/String/prototype/toUpperCase/supplementary_plane': [FAIL],
+
+ # Locale-sensitive case-conversion is not available with i18n off.
+ 'intl402/String/prototype/toLocaleLowerCase/special_casing_Azeri': [FAIL],
+ 'intl402/String/prototype/toLocaleLowerCase/special_casing_Lithuanian': [FAIL],
+ 'intl402/String/prototype/toLocaleLowerCase/special_casing_Turkish': [FAIL],
+ 'intl402/String/prototype/toLocaleUpperCase/special_casing_Azeri': [FAIL],
+ 'intl402/String/prototype/toLocaleUpperCase/special_casing_Lithuanian': [FAIL],
+ 'intl402/String/prototype/toLocaleUpperCase/special_casing_Turkish': [FAIL],
+}], # no_i18n == True
['arch == arm or arch == mipsel or arch == mips or arch == arm64 or arch == mips64 or arch == mips64el', {
diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py
index bf007bd..b62e9b0 100644
--- a/test/test262/testcfg.py
+++ b/test/test262/testcfg.py
@@ -43,6 +43,7 @@
ARCHIVE = DATA + ".tar"
TEST_262_HARNESS_FILES = ["sta.js", "assert.js"]
+TEST_262_NATIVE_FILES = ["detachArrayBuffer.js"]
TEST_262_SUITE_PATH = ["data", "test"]
TEST_262_HARNESS_PATH = ["data", "harness"]
@@ -129,8 +130,14 @@
def GetFlagsForTestCase(self, testcase, context):
return (testcase.flags + context.mode_flags + self.harness +
self.GetIncludesForTest(testcase) + ["--harmony"] +
+ (["--module"] if "module" in self.GetTestRecord(testcase) else []) +
[os.path.join(self.testroot, testcase.path + ".js")] +
- (["--throws"] if "negative" in self.GetTestRecord(testcase) else []))
+ (["--throws"] if "negative" in self.GetTestRecord(testcase)
+ else []) +
+ (["--allow-natives-syntax"]
+ if "detachArrayBuffer.js" in
+ self.GetTestRecord(testcase).get("includes", [])
+ else []))
def _VariantGeneratorFactory(self):
return Test262VariantGenerator
@@ -158,11 +165,14 @@
testcase.path)
return testcase.test_record
+ def BasePath(self, filename):
+ return self.root if filename in TEST_262_NATIVE_FILES else self.harnesspath
+
def GetIncludesForTest(self, testcase):
test_record = self.GetTestRecord(testcase)
if "includes" in test_record:
- includes = [os.path.join(self.harnesspath, f)
- for f in test_record["includes"]]
+ return [os.path.join(self.BasePath(filename), filename)
+ for filename in test_record.get("includes", [])]
else:
includes = []
return includes
diff --git a/test/unittests/atomic-utils-unittest.cc b/test/unittests/base/atomic-utils-unittest.cc
similarity index 98%
rename from test/unittests/atomic-utils-unittest.cc
rename to test/unittests/base/atomic-utils-unittest.cc
index ad33853..06079fe 100644
--- a/test/unittests/atomic-utils-unittest.cc
+++ b/test/unittests/base/atomic-utils-unittest.cc
@@ -4,11 +4,11 @@
#include <limits.h>
-#include "src/atomic-utils.h"
+#include "src/base/atomic-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
-namespace internal {
+namespace base {
TEST(AtomicNumber, Constructor) {
// Test some common types.
@@ -213,5 +213,5 @@
EXPECT_FALSE(a != b);
}
-} // namespace internal
+} // namespace base
} // namespace v8
diff --git a/test/unittests/base/platform/time-unittest.cc b/test/unittests/base/platform/time-unittest.cc
index b3bfbab..784fbf8 100644
--- a/test/unittests/base/platform/time-unittest.cc
+++ b/test/unittests/base/platform/time-unittest.cc
@@ -16,6 +16,7 @@
#endif
#include "src/base/platform/elapsed-timer.h"
+#include "src/base/platform/platform.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
@@ -182,5 +183,32 @@
}
}
+
+// Disable on windows until it is implemented.
+#if V8_OS_ANDROID || V8_OS_WIN
+#define MAYBE_ThreadNow DISABLED_ThreadNow
+#else
+#define MAYBE_ThreadNow ThreadNow
+#endif
+TEST(ThreadTicks, MAYBE_ThreadNow) {
+ if (ThreadTicks::IsSupported()) {
+ TimeTicks begin = TimeTicks::Now();
+ ThreadTicks begin_thread = ThreadTicks::Now();
+ // Make sure that ThreadNow value is non-zero.
+ EXPECT_GT(begin_thread, ThreadTicks());
+ // Sleep for 10 milliseconds to get the thread de-scheduled.
+ OS::Sleep(base::TimeDelta::FromMilliseconds(10));
+ ThreadTicks end_thread = ThreadTicks::Now();
+ TimeTicks end = TimeTicks::Now();
+ TimeDelta delta = end - begin;
+ TimeDelta delta_thread = end_thread - begin_thread;
+ // Make sure that some thread time have elapsed.
+ EXPECT_GT(delta_thread.InMicroseconds(), 0);
+ // But the thread time is at least 9ms less than clock time.
+ TimeDelta difference = delta - delta_thread;
+ EXPECT_GE(difference.InMicroseconds(), 9000);
+ }
+}
+
} // namespace base
} // namespace v8
diff --git a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
index 72cfc51..b088d8e 100644
--- a/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
+++ b/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
@@ -2954,6 +2954,78 @@
EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
}
+TEST_F(InstructionSelectorTest, Float32Max) {
+ StreamBuilder m(this, MachineType::Float32(), MachineType::Float32(),
+ MachineType::Float32());
+ Node* const p0 = m.Parameter(0);
+ Node* const p1 = m.Parameter(1);
+ Node* const n = m.Float32Max(p0, p1);
+ m.Return(n);
+ Stream s = m.Build(ARMv8);
+ // Float32Max is `(b < a) ? a : b`.
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArmFloat32Max, s[0]->arch_opcode());
+ ASSERT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
+ EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
+ ASSERT_EQ(1U, s[0]->OutputCount());
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
+}
+
+TEST_F(InstructionSelectorTest, Float32Min) {
+ StreamBuilder m(this, MachineType::Float32(), MachineType::Float32(),
+ MachineType::Float32());
+ Node* const p0 = m.Parameter(0);
+ Node* const p1 = m.Parameter(1);
+ Node* const n = m.Float32Min(p0, p1);
+ m.Return(n);
+ Stream s = m.Build(ARMv8);
+ // Float32Min is `(a < b) ? a : b`.
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArmFloat32Min, s[0]->arch_opcode());
+ ASSERT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
+ EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
+ ASSERT_EQ(1U, s[0]->OutputCount());
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
+}
+
+TEST_F(InstructionSelectorTest, Float64Max) {
+ StreamBuilder m(this, MachineType::Float64(), MachineType::Float64(),
+ MachineType::Float64());
+ Node* const p0 = m.Parameter(0);
+ Node* const p1 = m.Parameter(1);
+ Node* const n = m.Float64Max(p0, p1);
+ m.Return(n);
+ Stream s = m.Build(ARMv8);
+ // Float64Max is `(b < a) ? a : b`.
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArmFloat64Max, s[0]->arch_opcode());
+ ASSERT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
+ EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
+ ASSERT_EQ(1U, s[0]->OutputCount());
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
+}
+
+TEST_F(InstructionSelectorTest, Float64Min) {
+ StreamBuilder m(this, MachineType::Float64(), MachineType::Float64(),
+ MachineType::Float64());
+ Node* const p0 = m.Parameter(0);
+ Node* const p1 = m.Parameter(1);
+ Node* const n = m.Float64Min(p0, p1);
+ m.Return(n);
+ Stream s = m.Build(ARMv8);
+ // Float64Min is `(a < b) ? a : b`.
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArmFloat64Min, s[0]->arch_opcode());
+ ASSERT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
+ EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
+ ASSERT_EQ(1U, s[0]->OutputCount());
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
index 73532aa..1c638b2 100644
--- a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
+++ b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
@@ -326,6 +326,52 @@
kArm64Float64ToUint32, MachineType::Uint32()},
MachineType::Float64()}};
+// ARM64 instructions that clear the top 32 bits of the destination.
+const MachInst2 kCanElideChangeUint32ToUint64[] = {
+ {&RawMachineAssembler::Word32And, "Word32And", kArm64And32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Or, "Word32Or", kArm64Or32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Xor, "Word32Xor", kArm64Eor32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Shl, "Word32Shl", kArm64Lsl32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Shr, "Word32Shr", kArm64Lsr32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Sar, "Word32Sar", kArm64Asr32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Ror, "Word32Ror", kArm64Ror32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Word32Equal, "Word32Equal", kArm64Cmp32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Int32Add, "Int32Add", kArm64Add32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32AddWithOverflow, "Int32AddWithOverflow",
+ kArm64Add32, MachineType::Int32()},
+ {&RawMachineAssembler::Int32Sub, "Int32Sub", kArm64Sub32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32SubWithOverflow, "Int32SubWithOverflow",
+ kArm64Sub32, MachineType::Int32()},
+ {&RawMachineAssembler::Int32Mul, "Int32Mul", kArm64Mul32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32Div, "Int32Div", kArm64Idiv32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32Mod, "Int32Mod", kArm64Imod32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32LessThan, "Int32LessThan", kArm64Cmp32,
+ MachineType::Int32()},
+ {&RawMachineAssembler::Int32LessThanOrEqual, "Int32LessThanOrEqual",
+ kArm64Cmp32, MachineType::Int32()},
+ {&RawMachineAssembler::Uint32Div, "Uint32Div", kArm64Udiv32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Uint32LessThan, "Uint32LessThan", kArm64Cmp32,
+ MachineType::Uint32()},
+ {&RawMachineAssembler::Uint32LessThanOrEqual, "Uint32LessThanOrEqual",
+ kArm64Cmp32, MachineType::Uint32()},
+ {&RawMachineAssembler::Uint32Mod, "Uint32Mod", kArm64Umod32,
+ MachineType::Uint32()},
+};
+
} // namespace
@@ -2105,6 +2151,71 @@
InstructionSelectorConversionTest,
::testing::ValuesIn(kConversionInstructions));
+typedef InstructionSelectorTestWithParam<MachInst2>
+ InstructionSelectorElidedChangeUint32ToUint64Test;
+
+TEST_P(InstructionSelectorElidedChangeUint32ToUint64Test, Parameter) {
+ const MachInst2 binop = GetParam();
+ StreamBuilder m(this, MachineType::Uint64(), binop.machine_type,
+ binop.machine_type);
+ m.Return(m.ChangeUint32ToUint64(
+ (m.*binop.constructor)(m.Parameter(0), m.Parameter(1))));
+ Stream s = m.Build();
+ // Make sure the `ChangeUint32ToUint64` node turned into a no-op.
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(binop.arch_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+}
+
+INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
+ InstructionSelectorElidedChangeUint32ToUint64Test,
+ ::testing::ValuesIn(kCanElideChangeUint32ToUint64));
+
+TEST_F(InstructionSelectorTest, ChangeUint32ToUint64AfterLoad) {
+ // For each case, make sure the `ChangeUint32ToUint64` node turned into a
+ // no-op.
+
+ // Ldrb
+ {
+ StreamBuilder m(this, MachineType::Uint64(), MachineType::Pointer(),
+ MachineType::Int32());
+ m.Return(m.ChangeUint32ToUint64(
+ m.Load(MachineType::Uint8(), m.Parameter(0), m.Parameter(1))));
+ Stream s = m.Build();
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArm64Ldrb, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_MRR, s[0]->addressing_mode());
+ EXPECT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+ }
+ // Ldrh
+ {
+ StreamBuilder m(this, MachineType::Uint64(), MachineType::Pointer(),
+ MachineType::Int32());
+ m.Return(m.ChangeUint32ToUint64(
+ m.Load(MachineType::Uint16(), m.Parameter(0), m.Parameter(1))));
+ Stream s = m.Build();
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArm64Ldrh, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_MRR, s[0]->addressing_mode());
+ EXPECT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+ }
+ // LdrW
+ {
+ StreamBuilder m(this, MachineType::Uint64(), MachineType::Pointer(),
+ MachineType::Int32());
+ m.Return(m.ChangeUint32ToUint64(
+ m.Load(MachineType::Uint32(), m.Parameter(0), m.Parameter(1))));
+ Stream s = m.Build();
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(kArm64LdrW, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_MRR, s[0]->addressing_mode());
+ EXPECT_EQ(2U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+ }
+}
// -----------------------------------------------------------------------------
// Memory access instructions.
@@ -2244,12 +2355,131 @@
EXPECT_EQ(memacc.str_opcode, s[0]->arch_opcode());
EXPECT_EQ(kMode_MRI, s[0]->addressing_mode());
ASSERT_EQ(3U, s[0]->InputCount());
- ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
- EXPECT_EQ(index, s.ToInt32(s[0]->InputAt(1)));
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(2)->kind());
+ EXPECT_EQ(index, s.ToInt32(s[0]->InputAt(2)));
EXPECT_EQ(0U, s[0]->OutputCount());
}
}
+TEST_P(InstructionSelectorMemoryAccessTest, StoreZero) {
+ const MemoryAccess memacc = GetParam();
+ TRACED_FOREACH(int32_t, index, memacc.immediates) {
+ StreamBuilder m(this, MachineType::Int32(), MachineType::Pointer());
+ m.Store(memacc.type.representation(), m.Parameter(0),
+ m.Int32Constant(index), m.Int32Constant(0), kNoWriteBarrier);
+ m.Return(m.Int32Constant(0));
+ Stream s = m.Build();
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(memacc.str_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_MRI, s[0]->addressing_mode());
+ ASSERT_EQ(3U, s[0]->InputCount());
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(2)->kind());
+ EXPECT_EQ(index, s.ToInt32(s[0]->InputAt(2)));
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(0)->kind());
+ EXPECT_EQ(0, s.ToInt64(s[0]->InputAt(0)));
+ EXPECT_EQ(0U, s[0]->OutputCount());
+ }
+}
+
+TEST_P(InstructionSelectorMemoryAccessTest, LoadWithShiftedIndex) {
+ const MemoryAccess memacc = GetParam();
+ TRACED_FORRANGE(int, immediate_shift, 0, 4) {
+ // 32 bit shift
+ {
+ StreamBuilder m(this, memacc.type, MachineType::Pointer(),
+ MachineType::Int32());
+ Node* const index =
+ m.Word32Shl(m.Parameter(1), m.Int32Constant(immediate_shift));
+ m.Return(m.Load(memacc.type, m.Parameter(0), index));
+ Stream s = m.Build();
+ if (immediate_shift == ElementSizeLog2Of(memacc.type.representation())) {
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(memacc.ldr_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ EXPECT_EQ(3U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+ } else {
+ // Make sure we haven't merged the shift into the load instruction.
+ ASSERT_NE(1U, s.size());
+ EXPECT_NE(memacc.ldr_opcode, s[0]->arch_opcode());
+ EXPECT_NE(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ }
+ }
+ // 64 bit shift
+ {
+ StreamBuilder m(this, memacc.type, MachineType::Pointer(),
+ MachineType::Int64());
+ Node* const index =
+ m.Word64Shl(m.Parameter(1), m.Int64Constant(immediate_shift));
+ m.Return(m.Load(memacc.type, m.Parameter(0), index));
+ Stream s = m.Build();
+ if (immediate_shift == ElementSizeLog2Of(memacc.type.representation())) {
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(memacc.ldr_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ EXPECT_EQ(3U, s[0]->InputCount());
+ EXPECT_EQ(1U, s[0]->OutputCount());
+ } else {
+ // Make sure we haven't merged the shift into the load instruction.
+ ASSERT_NE(1U, s.size());
+ EXPECT_NE(memacc.ldr_opcode, s[0]->arch_opcode());
+ EXPECT_NE(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ }
+ }
+ }
+}
+
+TEST_P(InstructionSelectorMemoryAccessTest, StoreWithShiftedIndex) {
+ const MemoryAccess memacc = GetParam();
+ TRACED_FORRANGE(int, immediate_shift, 0, 4) {
+ // 32 bit shift
+ {
+ StreamBuilder m(this, MachineType::Int32(), MachineType::Pointer(),
+ MachineType::Int32(), memacc.type);
+ Node* const index =
+ m.Word32Shl(m.Parameter(1), m.Int32Constant(immediate_shift));
+ m.Store(memacc.type.representation(), m.Parameter(0), index,
+ m.Parameter(2), kNoWriteBarrier);
+ m.Return(m.Int32Constant(0));
+ Stream s = m.Build();
+ if (immediate_shift == ElementSizeLog2Of(memacc.type.representation())) {
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(memacc.str_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ EXPECT_EQ(4U, s[0]->InputCount());
+ EXPECT_EQ(0U, s[0]->OutputCount());
+ } else {
+ // Make sure we haven't merged the shift into the store instruction.
+ ASSERT_NE(1U, s.size());
+ EXPECT_NE(memacc.str_opcode, s[0]->arch_opcode());
+ EXPECT_NE(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ }
+ }
+ // 64 bit shift
+ {
+ StreamBuilder m(this, MachineType::Int64(), MachineType::Pointer(),
+ MachineType::Int64(), memacc.type);
+ Node* const index =
+ m.Word64Shl(m.Parameter(1), m.Int64Constant(immediate_shift));
+ m.Store(memacc.type.representation(), m.Parameter(0), index,
+ m.Parameter(2), kNoWriteBarrier);
+ m.Return(m.Int64Constant(0));
+ Stream s = m.Build();
+ if (immediate_shift == ElementSizeLog2Of(memacc.type.representation())) {
+ ASSERT_EQ(1U, s.size());
+ EXPECT_EQ(memacc.str_opcode, s[0]->arch_opcode());
+ EXPECT_EQ(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ EXPECT_EQ(4U, s[0]->InputCount());
+ EXPECT_EQ(0U, s[0]->OutputCount());
+ } else {
+ // Make sure we haven't merged the shift into the store instruction.
+ ASSERT_NE(1U, s.size());
+ EXPECT_NE(memacc.str_opcode, s[0]->arch_opcode());
+ EXPECT_NE(kMode_Operand2_R_LSL_I, s[0]->addressing_mode());
+ }
+ }
+ }
+}
INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
InstructionSelectorMemoryAccessTest,
diff --git a/test/unittests/compiler/change-lowering-unittest.cc b/test/unittests/compiler/change-lowering-unittest.cc
deleted file mode 100644
index fd0766c..0000000
--- a/test/unittests/compiler/change-lowering-unittest.cc
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/code-stubs.h"
-#include "src/compiler/change-lowering.h"
-#include "src/compiler/js-graph.h"
-#include "src/compiler/linkage.h"
-#include "src/compiler/node-properties.h"
-#include "src/compiler/simplified-operator.h"
-#include "test/unittests/compiler/compiler-test-utils.h"
-#include "test/unittests/compiler/graph-unittest.h"
-#include "test/unittests/compiler/node-test-utils.h"
-#include "testing/gmock-support.h"
-
-using testing::_;
-using testing::AllOf;
-using testing::BitEq;
-using testing::Capture;
-using testing::CaptureEq;
-
-namespace v8 {
-namespace internal {
-namespace compiler {
-
-class ChangeLoweringTest : public TypedGraphTest {
- public:
- ChangeLoweringTest() : simplified_(zone()) {}
-
- virtual MachineRepresentation WordRepresentation() const = 0;
-
- protected:
- bool Is32() const {
- return WordRepresentation() == MachineRepresentation::kWord32;
- }
- bool Is64() const {
- return WordRepresentation() == MachineRepresentation::kWord64;
- }
-
- Reduction Reduce(Node* node) {
- MachineOperatorBuilder machine(zone(), WordRepresentation());
- JSOperatorBuilder javascript(zone());
- JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr,
- &machine);
- ChangeLowering reducer(&jsgraph);
- return reducer.Reduce(node);
- }
-
- SimplifiedOperatorBuilder* simplified() { return &simplified_; }
-
- Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher) {
- return IsCall(
- _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()),
- IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher);
- }
- Matcher<Node*> IsChangeInt32ToSmi(const Matcher<Node*>& value_matcher) {
- return Is64() ? IsWord64Shl(IsChangeInt32ToInt64(value_matcher),
- IsSmiShiftBitsConstant())
- : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant());
- }
- Matcher<Node*> IsChangeSmiToInt32(const Matcher<Node*>& value_matcher) {
- return Is64() ? IsTruncateInt64ToInt32(
- IsWord64Sar(value_matcher, IsSmiShiftBitsConstant()))
- : IsWord32Sar(value_matcher, IsSmiShiftBitsConstant());
- }
- Matcher<Node*> IsChangeUint32ToSmi(const Matcher<Node*>& value_matcher) {
- return Is64() ? IsWord64Shl(IsChangeUint32ToUint64(value_matcher),
- IsSmiShiftBitsConstant())
- : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant());
- }
- Matcher<Node*> IsLoadHeapNumber(const Matcher<Node*>& value_matcher,
- const Matcher<Node*>& control_matcher) {
- return IsLoad(MachineType::Float64(), value_matcher,
- IsIntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag),
- graph()->start(), control_matcher);
- }
- Matcher<Node*> IsIntPtrConstant(int value) {
- return Is32() ? IsInt32Constant(value) : IsInt64Constant(value);
- }
- Matcher<Node*> IsSmiShiftBitsConstant() {
- return IsIntPtrConstant(kSmiShiftSize + kSmiTagSize);
- }
- Matcher<Node*> IsWordEqual(const Matcher<Node*>& lhs_matcher,
- const Matcher<Node*>& rhs_matcher) {
- return Is32() ? IsWord32Equal(lhs_matcher, rhs_matcher)
- : IsWord64Equal(lhs_matcher, rhs_matcher);
- }
-
- private:
- SimplifiedOperatorBuilder simplified_;
-};
-
-
-// -----------------------------------------------------------------------------
-// Common.
-
-
-class ChangeLoweringCommonTest
- : public ChangeLoweringTest,
- public ::testing::WithParamInterface<MachineRepresentation> {
- public:
- ~ChangeLoweringCommonTest() override {}
-
- MachineRepresentation WordRepresentation() const final { return GetParam(); }
-};
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeBitToBool) {
- Node* value = Parameter(Type::Boolean());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeBitToBool(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsSelect(MachineRepresentation::kTagged, value,
- IsTrueConstant(), IsFalseConstant()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeBoolToBit) {
- Node* value = Parameter(Type::Number());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeBoolToBit(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsWordEqual(value, IsTrueConstant()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeInt32ToTaggedWithSignedSmall) {
- Node* value = Parameter(Type::SignedSmall());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeInt32ToTagged(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeInt32ToSmi(value));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeUint32ToTaggedWithUnsignedSmall) {
- Node* value = Parameter(Type::UnsignedSmall());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeUint32ToTagged(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeUint32ToSmi(value));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToInt32WithTaggedSigned) {
- Node* value = Parameter(Type::TaggedSigned());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeTaggedToInt32(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeSmiToInt32(value));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToInt32WithTaggedPointer) {
- Node* value = Parameter(Type::TaggedPointer());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeTaggedToInt32(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeFloat64ToInt32(
- IsLoadHeapNumber(value, graph()->start())));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToUint32WithTaggedSigned) {
- Node* value = Parameter(Type::TaggedSigned());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeTaggedToUint32(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeSmiToInt32(value));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToUint32WithTaggedPointer) {
- Node* value = Parameter(Type::TaggedPointer());
- Reduction r =
- Reduce(graph()->NewNode(simplified()->ChangeTaggedToUint32(), value));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeFloat64ToUint32(
- IsLoadHeapNumber(value, graph()->start())));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, StoreFieldSmi) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::AnyTagged()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::TaggedSigned());
- Node* store = graph()->NewNode(simplified()->StoreField(access), p0, p1,
- graph()->start(), graph()->start());
- Reduction r = Reduce(store);
-
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsStore(StoreRepresentation(MachineRepresentation::kTagged,
- kNoWriteBarrier),
- p0, IsIntPtrConstant(access.offset - access.tag()), p1,
- graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, StoreFieldTagged) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::AnyTagged()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::Tagged());
- Node* store = graph()->NewNode(simplified()->StoreField(access), p0, p1,
- graph()->start(), graph()->start());
- Reduction r = Reduce(store);
-
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsStore(StoreRepresentation(MachineRepresentation::kTagged,
- kFullWriteBarrier),
- p0, IsIntPtrConstant(access.offset - access.tag()), p1,
- graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, LoadField) {
- FieldAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Handle<Name>::null(), Type::Any(),
- MachineType::AnyTagged()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* load = graph()->NewNode(simplified()->LoadField(access), p0,
- graph()->start(), graph()->start());
- Reduction r = Reduce(load);
-
- ASSERT_TRUE(r.Changed());
- Matcher<Node*> index_match = IsIntPtrConstant(access.offset - access.tag());
- EXPECT_THAT(r.replacement(),
- IsLoad(MachineType::AnyTagged(), p0,
- IsIntPtrConstant(access.offset - access.tag()),
- graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, StoreElementTagged) {
- ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::Signed32());
- Node* p2 = Parameter(Type::Tagged());
- Node* store = graph()->NewNode(simplified()->StoreElement(access), p0, p1, p2,
- graph()->start(), graph()->start());
- Reduction r = Reduce(store);
-
- const int element_size_shift =
- ElementSizeLog2Of(access.machine_type.representation());
- ASSERT_TRUE(r.Changed());
- Matcher<Node*> index_match =
- IsInt32Add(IsWord32Shl(p1, IsInt32Constant(element_size_shift)),
- IsInt32Constant(access.header_size - access.tag()));
- if (!Is32()) {
- index_match = IsChangeUint32ToUint64(index_match);
- }
-
- EXPECT_THAT(r.replacement(),
- IsStore(StoreRepresentation(MachineRepresentation::kTagged,
- kFullWriteBarrier),
- p0, index_match, p2, graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, StoreElementUint8) {
- ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Signed32(), MachineType::Uint8()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::Signed32());
- Node* p2 = Parameter(Type::Signed32());
- Node* store = graph()->NewNode(simplified()->StoreElement(access), p0, p1, p2,
- graph()->start(), graph()->start());
- Reduction r = Reduce(store);
-
- ASSERT_TRUE(r.Changed());
- Matcher<Node*> index_match =
- IsInt32Add(p1, IsInt32Constant(access.header_size - access.tag()));
- if (!Is32()) {
- index_match = IsChangeUint32ToUint64(index_match);
- }
-
- EXPECT_THAT(r.replacement(),
- IsStore(StoreRepresentation(MachineRepresentation::kWord8,
- kNoWriteBarrier),
- p0, index_match, p2, graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, LoadElementTagged) {
- ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::Signed32());
- Node* load = graph()->NewNode(simplified()->LoadElement(access), p0, p1,
- graph()->start(), graph()->start());
- Reduction r = Reduce(load);
-
- const int element_size_shift =
- ElementSizeLog2Of(access.machine_type.representation());
- ASSERT_TRUE(r.Changed());
- Matcher<Node*> index_match =
- IsInt32Add(IsWord32Shl(p1, IsInt32Constant(element_size_shift)),
- IsInt32Constant(access.header_size - access.tag()));
- if (!Is32()) {
- index_match = IsChangeUint32ToUint64(index_match);
- }
-
- EXPECT_THAT(r.replacement(), IsLoad(MachineType::AnyTagged(), p0, index_match,
- graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, LoadElementInt8) {
- ElementAccess access = {kTaggedBase, FixedArrayBase::kHeaderSize,
- Type::Signed32(), MachineType::Int8()};
- Node* p0 = Parameter(Type::TaggedPointer());
- Node* p1 = Parameter(Type::Signed32());
- Node* load = graph()->NewNode(simplified()->LoadElement(access), p0, p1,
- graph()->start(), graph()->start());
- Reduction r = Reduce(load);
-
- ASSERT_TRUE(r.Changed());
- Matcher<Node*> index_match =
- IsInt32Add(p1, IsInt32Constant(access.header_size - access.tag()));
- if (!Is32()) {
- index_match = IsChangeUint32ToUint64(index_match);
- }
-
- EXPECT_THAT(r.replacement(), IsLoad(MachineType::Int8(), p0, index_match,
- graph()->start(), graph()->start()));
-}
-
-
-TARGET_TEST_P(ChangeLoweringCommonTest, Allocate) {
- Node* p0 = Parameter(Type::Signed32());
- Node* alloc = graph()->NewNode(simplified()->Allocate(TENURED), p0,
- graph()->start(), graph()->start());
- Reduction r = Reduce(alloc);
-
- // Only check that we lowered, but do not specify the exact form since
- // this is subject to change.
- ASSERT_TRUE(r.Changed());
-}
-
-
-INSTANTIATE_TEST_CASE_P(ChangeLoweringTest, ChangeLoweringCommonTest,
- ::testing::Values(MachineRepresentation::kWord32,
- MachineRepresentation::kWord64));
-
-
-// -----------------------------------------------------------------------------
-// 32-bit
-
-
-class ChangeLowering32Test : public ChangeLoweringTest {
- public:
- ~ChangeLowering32Test() override {}
- MachineRepresentation WordRepresentation() const final {
- return MachineRepresentation::kWord32;
- }
-};
-
-
-TARGET_TEST_F(ChangeLowering32Test, ChangeInt32ToTagged) {
- Node* value = Parameter(Type::Integral32());
- Node* node = graph()->NewNode(simplified()->ChangeInt32ToTagged(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> add, branch, heap_number, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(MachineRepresentation::kTagged,
- IsFinishRegion(
- AllOf(CaptureEq(&heap_number),
- IsAllocateHeapNumber(_, CaptureEq(&if_true))),
- IsStore(
- StoreRepresentation(MachineRepresentation::kFloat64,
- kNoWriteBarrier),
- CaptureEq(&heap_number),
- IsIntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag),
- IsChangeInt32ToFloat64(value), CaptureEq(&heap_number),
- CaptureEq(&if_true))),
- IsProjection(0, AllOf(CaptureEq(&add),
- IsInt32AddWithOverflow(value, value))),
- IsMerge(AllOf(CaptureEq(&if_true), IsIfTrue(CaptureEq(&branch))),
- IsIfFalse(AllOf(CaptureEq(&branch),
- IsBranch(IsProjection(1, CaptureEq(&add)),
- graph()->start()))))));
-}
-
-
-TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToFloat64) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Number());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToFloat64(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(MachineRepresentation::kFloat64,
- IsLoadHeapNumber(value, CaptureEq(&if_true)),
- IsChangeInt32ToFloat64(IsWord32Sar(
- value, IsInt32Constant(kSmiTagSize + kSmiShiftSize))),
- IsMerge(AllOf(CaptureEq(&if_true),
- IsIfTrue(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord32And(
- value, IsInt32Constant(kSmiTagMask)),
- graph()->start())))),
- IsIfFalse(CaptureEq(&branch)))));
-}
-
-
-TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToInt32) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Signed32());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToInt32(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kWord32,
- IsChangeFloat64ToInt32(IsLoadHeapNumber(value, CaptureEq(&if_true))),
- IsWord32Sar(value, IsInt32Constant(kSmiTagSize + kSmiShiftSize)),
- IsMerge(AllOf(CaptureEq(&if_true), IsIfTrue(CaptureEq(&branch))),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord32And(value, IsInt32Constant(kSmiTagMask)),
- graph()->start()))))));
-}
-
-
-TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToUint32) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Unsigned32());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToUint32(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kWord32,
- IsChangeFloat64ToUint32(IsLoadHeapNumber(value, CaptureEq(&if_true))),
- IsWord32Sar(value, IsInt32Constant(kSmiTagSize + kSmiShiftSize)),
- IsMerge(AllOf(CaptureEq(&if_true), IsIfTrue(CaptureEq(&branch))),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord32And(value, IsInt32Constant(kSmiTagMask)),
- graph()->start()))))));
-}
-
-
-TARGET_TEST_F(ChangeLowering32Test, ChangeUint32ToTagged) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Number());
- Node* node = graph()->NewNode(simplified()->ChangeUint32ToTagged(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, heap_number, if_false;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kTagged,
- IsWord32Shl(value, IsInt32Constant(kSmiTagSize + kSmiShiftSize)),
- IsFinishRegion(
- AllOf(CaptureEq(&heap_number),
- IsAllocateHeapNumber(_, CaptureEq(&if_false))),
- IsStore(
- StoreRepresentation(MachineRepresentation::kFloat64,
- kNoWriteBarrier),
- CaptureEq(&heap_number),
- IsInt32Constant(HeapNumber::kValueOffset - kHeapObjectTag),
- IsChangeUint32ToFloat64(value), CaptureEq(&heap_number),
- CaptureEq(&if_false))),
- IsMerge(IsIfTrue(AllOf(
- CaptureEq(&branch),
- IsBranch(IsUint32LessThanOrEqual(
- value, IsInt32Constant(Smi::kMaxValue)),
- graph()->start()))),
- AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch))))));
-}
-
-
-// -----------------------------------------------------------------------------
-// 64-bit
-
-
-class ChangeLowering64Test : public ChangeLoweringTest {
- public:
- ~ChangeLowering64Test() override {}
- MachineRepresentation WordRepresentation() const final {
- return MachineRepresentation::kWord64;
- }
-};
-
-
-TARGET_TEST_F(ChangeLowering64Test, ChangeInt32ToTagged) {
- Node* value = Parameter(Type::Signed32());
- Node* node = graph()->NewNode(simplified()->ChangeInt32ToTagged(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsChangeInt32ToSmi(value));
-}
-
-
-TARGET_TEST_F(ChangeLowering64Test, ChangeTaggedToFloat64) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Number());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToFloat64(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(MachineRepresentation::kFloat64,
- IsLoadHeapNumber(value, CaptureEq(&if_true)),
- IsChangeInt32ToFloat64(IsTruncateInt64ToInt32(IsWord64Sar(
- value, IsInt64Constant(kSmiTagSize + kSmiShiftSize)))),
- IsMerge(AllOf(CaptureEq(&if_true),
- IsIfTrue(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord64And(
- value, IsInt64Constant(kSmiTagMask)),
- graph()->start())))),
- IsIfFalse(CaptureEq(&branch)))));
-}
-
-
-TARGET_TEST_F(ChangeLowering64Test, ChangeTaggedToInt32) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Signed32());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToInt32(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kWord32,
- IsChangeFloat64ToInt32(IsLoadHeapNumber(value, CaptureEq(&if_true))),
- IsTruncateInt64ToInt32(
- IsWord64Sar(value, IsInt64Constant(kSmiTagSize + kSmiShiftSize))),
- IsMerge(AllOf(CaptureEq(&if_true), IsIfTrue(CaptureEq(&branch))),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord64And(value, IsInt64Constant(kSmiTagMask)),
- graph()->start()))))));
-}
-
-
-TARGET_TEST_F(ChangeLowering64Test, ChangeTaggedToUint32) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Unsigned32());
- Node* node = graph()->NewNode(simplified()->ChangeTaggedToUint32(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, if_true;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kWord32,
- IsChangeFloat64ToUint32(IsLoadHeapNumber(value, CaptureEq(&if_true))),
- IsTruncateInt64ToInt32(
- IsWord64Sar(value, IsInt64Constant(kSmiTagSize + kSmiShiftSize))),
- IsMerge(AllOf(CaptureEq(&if_true), IsIfTrue(CaptureEq(&branch))),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsWord64And(value, IsInt64Constant(kSmiTagMask)),
- graph()->start()))))));
-}
-
-
-TARGET_TEST_F(ChangeLowering64Test, ChangeUint32ToTagged) {
- STATIC_ASSERT(kSmiTag == 0);
- STATIC_ASSERT(kSmiTagSize == 1);
-
- Node* value = Parameter(Type::Number());
- Node* node = graph()->NewNode(simplified()->ChangeUint32ToTagged(), value);
- Reduction r = Reduce(node);
- ASSERT_TRUE(r.Changed());
- Capture<Node*> branch, heap_number, if_false;
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kTagged,
- IsWord64Shl(IsChangeUint32ToUint64(value),
- IsInt64Constant(kSmiTagSize + kSmiShiftSize)),
- IsFinishRegion(
- AllOf(CaptureEq(&heap_number),
- IsAllocateHeapNumber(_, CaptureEq(&if_false))),
- IsStore(
- StoreRepresentation(MachineRepresentation::kFloat64,
- kNoWriteBarrier),
- CaptureEq(&heap_number),
- IsInt64Constant(HeapNumber::kValueOffset - kHeapObjectTag),
- IsChangeUint32ToFloat64(value), CaptureEq(&heap_number),
- CaptureEq(&if_false))),
- IsMerge(IsIfTrue(AllOf(
- CaptureEq(&branch),
- IsBranch(IsUint32LessThanOrEqual(
- value, IsInt32Constant(Smi::kMaxValue)),
- graph()->start()))),
- AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch))))));
-}
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
diff --git a/test/unittests/compiler/common-operator-reducer-unittest.cc b/test/unittests/compiler/common-operator-reducer-unittest.cc
index 1c16370..510eaad 100644
--- a/test/unittests/compiler/common-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/common-operator-reducer-unittest.cc
@@ -105,40 +105,6 @@
}
-TEST_F(CommonOperatorReducerTest, BranchWithInt64ZeroConstant) {
- TRACED_FOREACH(BranchHint, hint, kBranchHints) {
- Node* const control = graph()->start();
- Node* const branch =
- graph()->NewNode(common()->Branch(hint), Int64Constant(0), control);
- Node* const if_true = graph()->NewNode(common()->IfTrue(), branch);
- Node* const if_false = graph()->NewNode(common()->IfFalse(), branch);
- StrictMock<MockAdvancedReducerEditor> editor;
- EXPECT_CALL(editor, Replace(if_true, IsDead()));
- EXPECT_CALL(editor, Replace(if_false, control));
- Reduction const r = Reduce(&editor, branch);
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsDead());
- }
-}
-
-
-TEST_F(CommonOperatorReducerTest, BranchWithInt64OneConstant) {
- TRACED_FOREACH(BranchHint, hint, kBranchHints) {
- Node* const control = graph()->start();
- Node* const branch =
- graph()->NewNode(common()->Branch(hint), Int64Constant(1), control);
- Node* const if_true = graph()->NewNode(common()->IfTrue(), branch);
- Node* const if_false = graph()->NewNode(common()->IfFalse(), branch);
- StrictMock<MockAdvancedReducerEditor> editor;
- EXPECT_CALL(editor, Replace(if_true, control));
- EXPECT_CALL(editor, Replace(if_false, IsDead()));
- Reduction const r = Reduce(&editor, branch);
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsDead());
- }
-}
-
-
TEST_F(CommonOperatorReducerTest, BranchWithFalseConstant) {
TRACED_FOREACH(BranchHint, hint, kBranchHints) {
Node* const control = graph()->start();
@@ -500,30 +466,6 @@
}
-TEST_F(CommonOperatorReducerTest, SelectWithInt64ZeroConstant) {
- Node* p0 = Parameter(0);
- Node* p1 = Parameter(1);
- Node* select =
- graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
- Int64Constant(0), p0, p1);
- Reduction r = Reduce(select);
- ASSERT_TRUE(r.Changed());
- EXPECT_EQ(p1, r.replacement());
-}
-
-
-TEST_F(CommonOperatorReducerTest, SelectWithInt64OneConstant) {
- Node* p0 = Parameter(0);
- Node* p1 = Parameter(1);
- Node* select =
- graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
- Int64Constant(1), p0, p1);
- Reduction r = Reduce(select);
- ASSERT_TRUE(r.Changed());
- EXPECT_EQ(p0, r.replacement());
-}
-
-
TEST_F(CommonOperatorReducerTest, SelectWithFalseConstant) {
Node* p0 = Parameter(0);
Node* p1 = Parameter(1);
diff --git a/test/unittests/compiler/effect-control-linearizer-unittest.cc b/test/unittests/compiler/effect-control-linearizer-unittest.cc
new file mode 100644
index 0000000..417444e
--- /dev/null
+++ b/test/unittests/compiler/effect-control-linearizer-unittest.cc
@@ -0,0 +1,330 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/compiler/effect-control-linearizer.h"
+#include "src/compiler/access-builder.h"
+#include "src/compiler/js-graph.h"
+#include "src/compiler/linkage.h"
+#include "src/compiler/node-properties.h"
+#include "src/compiler/schedule.h"
+#include "src/compiler/simplified-operator.h"
+#include "test/unittests/compiler/graph-unittest.h"
+#include "test/unittests/compiler/node-test-utils.h"
+#include "test/unittests/test-utils.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class EffectControlLinearizerTest : public TypedGraphTest {
+ public:
+ EffectControlLinearizerTest()
+ : TypedGraphTest(3),
+ machine_(zone()),
+ javascript_(zone()),
+ simplified_(zone()),
+ jsgraph_(isolate(), graph(), common(), &javascript_, &simplified_,
+ &machine_) {}
+
+ JSGraph* jsgraph() { return &jsgraph_; }
+ SimplifiedOperatorBuilder* simplified() { return &simplified_; }
+
+ private:
+ MachineOperatorBuilder machine_;
+ JSOperatorBuilder javascript_;
+ SimplifiedOperatorBuilder simplified_;
+ JSGraph jsgraph_;
+};
+
+namespace {
+
+BasicBlock* AddBlockToSchedule(Schedule* schedule) {
+ BasicBlock* block = schedule->NewBasicBlock();
+ block->set_rpo_number(static_cast<int32_t>(schedule->rpo_order()->size()));
+ schedule->rpo_order()->push_back(block);
+ return block;
+}
+
+} // namespace
+
+TEST_F(EffectControlLinearizerTest, SimpleLoad) {
+ Schedule schedule(zone());
+
+ // Create the graph.
+ Node* heap_number = NumberConstant(0.5);
+ Node* load = graph()->NewNode(
+ simplified()->LoadField(AccessBuilder::ForHeapNumberValue()), heap_number,
+ graph()->start(), graph()->start());
+ Node* ret = graph()->NewNode(common()->Return(), load, graph()->start(),
+ graph()->start());
+
+ // Build the basic block structure.
+ BasicBlock* start = schedule.start();
+ schedule.rpo_order()->push_back(start);
+ start->set_rpo_number(0);
+
+ // Populate the basic blocks with nodes.
+ schedule.AddNode(start, graph()->start());
+ schedule.AddNode(start, heap_number);
+ schedule.AddNode(start, load);
+ schedule.AddReturn(start, ret);
+
+ // Run the state effect introducer.
+ EffectControlLinearizer introducer(jsgraph(), &schedule, zone());
+ introducer.Run();
+
+ EXPECT_THAT(load,
+ IsLoadField(AccessBuilder::ForHeapNumberValue(), heap_number,
+ graph()->start(), graph()->start()));
+ // The return should have reconnected effect edge to the load.
+ EXPECT_THAT(ret, IsReturn(load, load, graph()->start()));
+}
+
+TEST_F(EffectControlLinearizerTest, DiamondLoad) {
+ Schedule schedule(zone());
+
+ // Create the graph.
+ Node* branch =
+ graph()->NewNode(common()->Branch(), Int32Constant(0), graph()->start());
+
+ Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
+ Node* heap_number = NumberConstant(0.5);
+ Node* vtrue = graph()->NewNode(
+ simplified()->LoadField(AccessBuilder::ForHeapNumberValue()), heap_number,
+ graph()->start(), if_true);
+
+ Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
+ Node* vfalse = Float64Constant(2);
+
+ Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
+ Node* phi = graph()->NewNode(
+ common()->Phi(MachineRepresentation::kFloat64, 2), vtrue, vfalse, merge);
+
+ Node* ret =
+ graph()->NewNode(common()->Return(), phi, graph()->start(), merge);
+
+ // Build the basic block structure.
+ BasicBlock* start = schedule.start();
+ schedule.rpo_order()->push_back(start);
+ start->set_rpo_number(0);
+
+ BasicBlock* tblock = AddBlockToSchedule(&schedule);
+ BasicBlock* fblock = AddBlockToSchedule(&schedule);
+ BasicBlock* mblock = AddBlockToSchedule(&schedule);
+
+ // Populate the basic blocks with nodes.
+ schedule.AddNode(start, graph()->start());
+ schedule.AddBranch(start, branch, tblock, fblock);
+
+ schedule.AddNode(tblock, if_true);
+ schedule.AddNode(tblock, heap_number);
+ schedule.AddNode(tblock, vtrue);
+ schedule.AddGoto(tblock, mblock);
+
+ schedule.AddNode(fblock, if_false);
+ schedule.AddNode(fblock, vfalse);
+ schedule.AddGoto(fblock, mblock);
+
+ schedule.AddNode(mblock, merge);
+ schedule.AddNode(mblock, phi);
+ schedule.AddReturn(mblock, ret);
+
+ // Run the state effect introducer.
+ EffectControlLinearizer introducer(jsgraph(), &schedule, zone());
+ introducer.Run();
+
+ // The effect input to the return should be an effect phi with the
+ // newly introduced effectful change operators.
+ ASSERT_THAT(
+ ret, IsReturn(phi, IsEffectPhi(vtrue, graph()->start(), merge), merge));
+}
+
+TEST_F(EffectControlLinearizerTest, FloatingDiamondsControlWiring) {
+ Schedule schedule(zone());
+
+ // Create the graph and schedule. Roughly (omitting effects and unimportant
+ // nodes):
+ //
+ // BLOCK 0:
+ // r1: Start
+ // c1: Call
+ // b1: Branch(const0, s1)
+ // |
+ // +-------+------+
+ // | |
+ // BLOCK 1: BLOCK 2:
+ // t1: IfTrue(b1) f1: IfFalse(b1)
+ // | |
+ // +-------+------+
+ // |
+ // BLOCK 3:
+ // m1: Merge(t1, f1)
+ // c2: IfSuccess(c1)
+ // b2: Branch(const0 , s1)
+ // |
+ // +-------+------+
+ // | |
+ // BLOCK 4: BLOCK 5:
+ // t2: IfTrue(b2) f2:IfFalse(b2)
+ // | |
+ // +-------+------+
+ // |
+ // BLOCK 6:
+ // m2: Merge(t2, f2)
+ // r1: Return(c1, c2)
+ MachineType kMachineSignature[] = {MachineType::AnyTagged(),
+ MachineType::AnyTagged()};
+ LinkageLocation kLocationSignature[] = {LinkageLocation::ForRegister(0),
+ LinkageLocation::ForRegister(1)};
+ const CallDescriptor* kCallDescriptor = new (zone()) CallDescriptor(
+ CallDescriptor::kCallCodeObject, MachineType::AnyTagged(),
+ LinkageLocation::ForRegister(0),
+ new (zone()) MachineSignature(1, 1, kMachineSignature),
+ new (zone()) LocationSignature(1, 1, kLocationSignature), 0,
+ Operator::kNoProperties, 0, 0, CallDescriptor::kNoFlags);
+ Node* p0 = Parameter(0);
+ Node* p1 = Parameter(1);
+ Node* const0 = Int32Constant(0);
+ Node* call = graph()->NewNode(common()->Call(kCallDescriptor), p0, p1,
+ graph()->start(), graph()->start());
+ Node* if_success = graph()->NewNode(common()->IfSuccess(), call);
+
+ // First Floating diamond.
+ Node* branch1 =
+ graph()->NewNode(common()->Branch(), const0, graph()->start());
+ Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1);
+ Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1);
+ Node* merge1 = graph()->NewNode(common()->Merge(2), if_true1, if_false1);
+
+ // Second floating diamond.
+ Node* branch2 =
+ graph()->NewNode(common()->Branch(), const0, graph()->start());
+ Node* if_true2 = graph()->NewNode(common()->IfTrue(), branch2);
+ Node* if_false2 = graph()->NewNode(common()->IfFalse(), branch2);
+ Node* merge2 = graph()->NewNode(common()->Merge(2), if_true2, if_false2);
+
+ Node* ret =
+ graph()->NewNode(common()->Return(), call, graph()->start(), if_success);
+
+ // Build the basic block structure.
+ BasicBlock* start = schedule.start();
+ schedule.rpo_order()->push_back(start);
+ start->set_rpo_number(0);
+
+ BasicBlock* t1block = AddBlockToSchedule(&schedule);
+ BasicBlock* f1block = AddBlockToSchedule(&schedule);
+ BasicBlock* m1block = AddBlockToSchedule(&schedule);
+
+ BasicBlock* t2block = AddBlockToSchedule(&schedule);
+ BasicBlock* f2block = AddBlockToSchedule(&schedule);
+ BasicBlock* m2block = AddBlockToSchedule(&schedule);
+
+ // Populate the basic blocks with nodes.
+ schedule.AddNode(start, graph()->start());
+ schedule.AddNode(start, p0);
+ schedule.AddNode(start, p1);
+ schedule.AddNode(start, const0);
+ schedule.AddNode(start, call);
+ schedule.AddBranch(start, branch1, t1block, f1block);
+
+ schedule.AddNode(t1block, if_true1);
+ schedule.AddGoto(t1block, m1block);
+
+ schedule.AddNode(f1block, if_false1);
+ schedule.AddGoto(f1block, m1block);
+
+ schedule.AddNode(m1block, merge1);
+ // The scheduler does not always put the IfSuccess node to the corresponding
+ // call's block, simulate that here.
+ schedule.AddNode(m1block, if_success);
+ schedule.AddBranch(m1block, branch2, t2block, f2block);
+
+ schedule.AddNode(t2block, if_true2);
+ schedule.AddGoto(t2block, m2block);
+
+ schedule.AddNode(f2block, if_false2);
+ schedule.AddGoto(f2block, m2block);
+
+ schedule.AddNode(m2block, merge2);
+ schedule.AddReturn(m2block, ret);
+
+ // Run the state effect introducer.
+ EffectControlLinearizer introducer(jsgraph(), &schedule, zone());
+ introducer.Run();
+
+ // The effect input to the return should be an effect phi with the
+ // newly introduced effectful change operators.
+ ASSERT_THAT(ret, IsReturn(call, call, merge2));
+ ASSERT_THAT(branch2, IsBranch(const0, merge1));
+ ASSERT_THAT(branch1, IsBranch(const0, if_success));
+ ASSERT_THAT(if_success, IsIfSuccess(call));
+}
+
+TEST_F(EffectControlLinearizerTest, LoopLoad) {
+ Schedule schedule(zone());
+
+ // Create the graph.
+ Node* loop = graph()->NewNode(common()->Loop(1), graph()->start());
+ Node* effect_phi =
+ graph()->NewNode(common()->EffectPhi(1), graph()->start(), loop);
+
+ Node* cond = Int32Constant(0);
+ Node* branch = graph()->NewNode(common()->Branch(), cond, loop);
+
+ Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
+
+ Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
+
+ loop->AppendInput(zone(), if_false);
+ NodeProperties::ChangeOp(loop, common()->Loop(2));
+
+ effect_phi->InsertInput(zone(), 1, effect_phi);
+ NodeProperties::ChangeOp(effect_phi, common()->EffectPhi(2));
+
+ Node* heap_number = NumberConstant(0.5);
+ Node* load = graph()->NewNode(
+ simplified()->LoadField(AccessBuilder::ForHeapNumberValue()), heap_number,
+ graph()->start(), loop);
+
+ Node* ret = graph()->NewNode(common()->Return(), load, effect_phi, if_true);
+
+ // Build the basic block structure.
+ BasicBlock* start = schedule.start();
+ schedule.rpo_order()->push_back(start);
+ start->set_rpo_number(0);
+
+ BasicBlock* lblock = AddBlockToSchedule(&schedule);
+ BasicBlock* fblock = AddBlockToSchedule(&schedule);
+ BasicBlock* rblock = AddBlockToSchedule(&schedule);
+
+ // Populate the basic blocks with nodes.
+ schedule.AddNode(start, graph()->start());
+ schedule.AddGoto(start, lblock);
+
+ schedule.AddNode(lblock, loop);
+ schedule.AddNode(lblock, effect_phi);
+ schedule.AddNode(lblock, heap_number);
+ schedule.AddNode(lblock, load);
+ schedule.AddNode(lblock, cond);
+ schedule.AddBranch(lblock, branch, rblock, fblock);
+
+ schedule.AddNode(fblock, if_false);
+ schedule.AddGoto(fblock, lblock);
+
+ schedule.AddNode(rblock, if_true);
+ schedule.AddReturn(rblock, ret);
+
+ // Run the state effect introducer.
+ EffectControlLinearizer introducer(jsgraph(), &schedule, zone());
+ introducer.Run();
+
+ ASSERT_THAT(ret, IsReturn(load, load, if_true));
+ EXPECT_THAT(load, IsLoadField(AccessBuilder::ForHeapNumberValue(),
+ heap_number, effect_phi, loop));
+}
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/compiler/escape-analysis-unittest.cc b/test/unittests/compiler/escape-analysis-unittest.cc
index d5e12ba..4c17ef2 100644
--- a/test/unittests/compiler/escape-analysis-unittest.cc
+++ b/test/unittests/compiler/escape-analysis-unittest.cc
@@ -146,14 +146,18 @@
}
FieldAccess FieldAccessAtIndex(int offset) {
- FieldAccess access = {kTaggedBase, offset, MaybeHandle<Name>(), Type::Any(),
- MachineType::AnyTagged()};
+ FieldAccess access = {kTaggedBase,
+ offset,
+ MaybeHandle<Name>(),
+ Type::Any(),
+ MachineType::AnyTagged(),
+ kFullWriteBarrier};
return access;
}
ElementAccess MakeElementAccess(int header_size) {
ElementAccess access = {kTaggedBase, header_size, Type::Any(),
- MachineType::AnyTagged()};
+ MachineType::AnyTagged(), kFullWriteBarrier};
return access;
}
diff --git a/test/unittests/compiler/instruction-selector-unittest.cc b/test/unittests/compiler/instruction-selector-unittest.cc
index 16030f8..69ae768 100644
--- a/test/unittests/compiler/instruction-selector-unittest.cc
+++ b/test/unittests/compiler/instruction-selector-unittest.cc
@@ -199,11 +199,9 @@
// -----------------------------------------------------------------------------
// Conversions.
-
-TARGET_TEST_F(InstructionSelectorTest, TruncateFloat64ToInt32WithParameter) {
+TARGET_TEST_F(InstructionSelectorTest, TruncateFloat64ToWord32WithParameter) {
StreamBuilder m(this, MachineType::Int32(), MachineType::Float64());
- m.Return(
- m.TruncateFloat64ToInt32(TruncationMode::kJavaScript, m.Parameter(0)));
+ m.Return(m.TruncateFloat64ToWord32(m.Parameter(0)));
Stream s = m.Build(kAllInstructions);
ASSERT_EQ(4U, s.size());
EXPECT_EQ(kArchNop, s[0]->arch_opcode());
diff --git a/test/unittests/compiler/instruction-sequence-unittest.cc b/test/unittests/compiler/instruction-sequence-unittest.cc
index 51112a6..9360ca4 100644
--- a/test/unittests/compiler/instruction-sequence-unittest.cc
+++ b/test/unittests/compiler/instruction-sequence-unittest.cc
@@ -15,10 +15,9 @@
static const char*
general_register_names_[RegisterConfiguration::kMaxGeneralRegisters];
static const char*
- double_register_names_[RegisterConfiguration::kMaxDoubleRegisters];
+ double_register_names_[RegisterConfiguration::kMaxFPRegisters];
static char register_names_[10 * (RegisterConfiguration::kMaxGeneralRegisters +
- RegisterConfiguration::kMaxDoubleRegisters)];
-
+ RegisterConfiguration::kMaxFPRegisters)];
namespace {
static int allocatable_codes[InstructionSequenceTest::kDefaultNRegs] = {
@@ -35,7 +34,7 @@
loc += base::OS::SNPrintF(loc, 100, "gp_%d", i);
*loc++ = 0;
}
- for (int i = 0; i < RegisterConfiguration::kMaxDoubleRegisters; ++i) {
+ for (int i = 0; i < RegisterConfiguration::kMaxFPRegisters; ++i) {
double_register_names_[i] = loc;
loc += base::OS::SNPrintF(loc, 100, "fp_%d", i) + 1;
*loc++ = 0;
diff --git a/test/unittests/compiler/int64-lowering-unittest.cc b/test/unittests/compiler/int64-lowering-unittest.cc
index 08f3038..8bc02c5 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -301,9 +301,6 @@
wasm::ModuleEnv::GetI32WasmCallDescriptor(zone(), desc));
}
-// todo(ahaas): I added a list of missing instructions here to make merging
-// easier when I do them one by one.
-// kExprI64Add:
TEST_F(Int64LoweringTest, Int64Add) {
LowerGraph(graph()->NewNode(machine()->Int64Add(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -319,7 +316,7 @@
IsProjection(1, AllOf(CaptureEq(&add), add_matcher)),
start(), start()));
}
-// kExprI64Sub:
+
TEST_F(Int64LoweringTest, Int64Sub) {
LowerGraph(graph()->NewNode(machine()->Int64Sub(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -336,7 +333,6 @@
start(), start()));
}
-// kExprI64Mul:
TEST_F(Int64LoweringTest, Int64Mul) {
LowerGraph(graph()->NewNode(machine()->Int64Mul(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -354,11 +350,6 @@
start(), start()));
}
-// kExprI64DivS:
-// kExprI64DivU:
-// kExprI64RemS:
-// kExprI64RemU:
-// kExprI64Ior:
TEST_F(Int64LoweringTest, Int64Ior) {
LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -371,7 +362,6 @@
start(), start()));
}
-// kExprI64Xor:
TEST_F(Int64LoweringTest, Int64Xor) {
LowerGraph(graph()->NewNode(machine()->Word64Xor(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -383,7 +373,7 @@
IsInt32Constant(high_word_value(1))),
start(), start()));
}
-// kExprI64Shl:
+
TEST_F(Int64LoweringTest, Int64Shl) {
LowerGraph(graph()->NewNode(machine()->Word64Shl(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -399,7 +389,7 @@
IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)),
start(), start()));
}
-// kExprI64ShrU:
+
TEST_F(Int64LoweringTest, Int64ShrU) {
LowerGraph(graph()->NewNode(machine()->Word64Shr(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -415,7 +405,7 @@
IsProjection(1, AllOf(CaptureEq(&shr), shr_matcher)),
start(), start()));
}
-// kExprI64ShrS:
+
TEST_F(Int64LoweringTest, Int64ShrS) {
LowerGraph(graph()->NewNode(machine()->Word64Sar(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -431,7 +421,7 @@
IsProjection(1, AllOf(CaptureEq(&sar), sar_matcher)),
start(), start()));
}
-// kExprI64Eq:
+
TEST_F(Int64LoweringTest, Int64Eq) {
LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
Int64Constant(value(1))),
@@ -447,27 +437,25 @@
start(), start()));
}
-// kExprI64LtS:
TEST_F(Int64LoweringTest, Int64LtS) {
TestComparison(machine()->Int64LessThan(), IsInt32LessThan, IsUint32LessThan);
}
-// kExprI64LeS:
+
TEST_F(Int64LoweringTest, Int64LeS) {
TestComparison(machine()->Int64LessThanOrEqual(), IsInt32LessThan,
IsUint32LessThanOrEqual);
}
-// kExprI64LtU:
+
TEST_F(Int64LoweringTest, Int64LtU) {
TestComparison(machine()->Uint64LessThan(), IsUint32LessThan,
IsUint32LessThan);
}
-// kExprI64LeU:
+
TEST_F(Int64LoweringTest, Int64LeU) {
TestComparison(machine()->Uint64LessThanOrEqual(), IsUint32LessThan,
IsUint32LessThanOrEqual);
}
-// kExprI32ConvertI64:
TEST_F(Int64LoweringTest, I32ConvertI64) {
LowerGraph(graph()->NewNode(machine()->TruncateInt64ToInt32(),
Int64Constant(value(0))),
@@ -475,7 +463,7 @@
EXPECT_THAT(graph()->end()->InputAt(1),
IsReturn(IsInt32Constant(low_word_value(0)), start(), start()));
}
-// kExprI64SConvertI32:
+
TEST_F(Int64LoweringTest, I64SConvertI32) {
LowerGraph(graph()->NewNode(machine()->ChangeInt32ToInt64(),
Int32Constant(low_word_value(0))),
@@ -501,7 +489,7 @@
IsInt32Constant(31)),
start(), start()));
}
-// kExprI64UConvertI32:
+
TEST_F(Int64LoweringTest, I64UConvertI32) {
LowerGraph(graph()->NewNode(machine()->ChangeUint32ToUint64(),
Int32Constant(low_word_value(0))),
@@ -523,7 +511,7 @@
IsReturn2(IsInt32Constant(low_word_value(0)), IsInt32Constant(0),
start(), start()));
}
-// kExprF64ReinterpretI64:
+
TEST_F(Int64LoweringTest, F64ReinterpretI64) {
LowerGraph(graph()->NewNode(machine()->BitcastInt64ToFloat64(),
Int64Constant(value(0))),
@@ -554,7 +542,7 @@
AllOf(CaptureEq(&store_capture), store_matcher), start()),
start(), start()));
}
-// kExprI64ReinterpretF64:
+
TEST_F(Int64LoweringTest, I64ReinterpretF64) {
LowerGraph(graph()->NewNode(machine()->BitcastFloat64ToInt64(),
Float64Constant(bit_cast<double>(value(0)))),
@@ -583,7 +571,7 @@
AllOf(CaptureEq(&store), store_matcher), start()),
start(), start()));
}
-// kExprI64Clz:
+
TEST_F(Int64LoweringTest, I64Clz) {
LowerGraph(graph()->NewNode(machine()->Word64Clz(), Int64Constant(value(0))),
MachineRepresentation::kWord64);
@@ -606,7 +594,7 @@
AllOf(CaptureEq(&branch_capture), branch_matcher)))),
IsInt32Constant(0), start(), start()));
}
-// kExprI64Ctz:
+
TEST_F(Int64LoweringTest, I64Ctz) {
LowerGraph(graph()->NewNode(machine()->Word64CtzPlaceholder(),
Int64Constant(value(0))),
@@ -628,7 +616,6 @@
AllOf(CaptureEq(&branch_capture), branch_matcher)))),
IsInt32Constant(0), start(), start()));
}
-// kExprI64Popcnt:
TEST_F(Int64LoweringTest, Dfs) {
Node* common = Int64Constant(value(0));
diff --git a/test/unittests/compiler/js-create-lowering-unittest.cc b/test/unittests/compiler/js-create-lowering-unittest.cc
index 837c574..5d95d0d 100644
--- a/test/unittests/compiler/js-create-lowering-unittest.cc
+++ b/test/unittests/compiler/js-create-lowering-unittest.cc
@@ -80,95 +80,74 @@
// -----------------------------------------------------------------------------
// JSCreateArguments
-TEST_F(JSCreateLoweringTest, JSCreateArgumentsViaStub) {
- Node* const closure = Parameter(Type::Any());
- Node* const context = UndefinedConstant();
- Node* const effect = graph()->start();
- Node* const control = graph()->start();
- Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
- Node* const frame_state = FrameState(shared, graph()->start());
- Reduction r = Reduce(graph()->NewNode(
- javascript()->CreateArguments(CreateArgumentsType::kUnmappedArguments),
- closure, context, frame_state, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsCall(_, IsHeapConstant(
- CodeFactory::FastNewStrictArguments(isolate()).code()),
- closure, context, frame_state, effect, control));
-}
-
-TEST_F(JSCreateLoweringTest, JSCreateArgumentsRestParameterViaStub) {
- Node* const closure = Parameter(Type::Any());
- Node* const context = UndefinedConstant();
- Node* const effect = graph()->start();
- Node* const control = graph()->start();
- Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
- Node* const frame_state = FrameState(shared, graph()->start());
- Reduction r = Reduce(graph()->NewNode(
- javascript()->CreateArguments(CreateArgumentsType::kRestParameter),
- closure, context, frame_state, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsCall(_, IsHeapConstant(
- CodeFactory::FastNewRestParameter(isolate()).code()),
- closure, context, frame_state, effect, control));
-}
-
TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedMapped) {
Node* const closure = Parameter(Type::Any());
Node* const context = UndefinedConstant();
Node* const effect = graph()->start();
- Node* const control = graph()->start();
Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
Node* const frame_state_outer = FrameState(shared, graph()->start());
Node* const frame_state_inner = FrameState(shared, frame_state_outer);
Reduction r = Reduce(graph()->NewNode(
javascript()->CreateArguments(CreateArgumentsType::kMappedArguments),
- closure, context, frame_state_inner, effect, control));
+ closure, context, frame_state_inner, effect));
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsFinishRegion(
- IsAllocate(IsNumberConstant(JSSloppyArgumentsObject::kSize),
- _, control),
- _));
+ EXPECT_THAT(
+ r.replacement(),
+ IsFinishRegion(
+ IsAllocate(IsNumberConstant(JSSloppyArgumentsObject::kSize), _, _),
+ _));
}
TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedUnmapped) {
Node* const closure = Parameter(Type::Any());
Node* const context = UndefinedConstant();
Node* const effect = graph()->start();
- Node* const control = graph()->start();
Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
Node* const frame_state_outer = FrameState(shared, graph()->start());
Node* const frame_state_inner = FrameState(shared, frame_state_outer);
Reduction r = Reduce(graph()->NewNode(
javascript()->CreateArguments(CreateArgumentsType::kUnmappedArguments),
- closure, context, frame_state_inner, effect, control));
+ closure, context, frame_state_inner, effect));
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsFinishRegion(
- IsAllocate(IsNumberConstant(JSStrictArgumentsObject::kSize),
- _, control),
- _));
+ EXPECT_THAT(
+ r.replacement(),
+ IsFinishRegion(
+ IsAllocate(IsNumberConstant(JSStrictArgumentsObject::kSize), _, _),
+ _));
}
TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedRestArray) {
Node* const closure = Parameter(Type::Any());
Node* const context = UndefinedConstant();
Node* const effect = graph()->start();
- Node* const control = graph()->start();
Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
Node* const frame_state_outer = FrameState(shared, graph()->start());
Node* const frame_state_inner = FrameState(shared, frame_state_outer);
Reduction r = Reduce(graph()->NewNode(
javascript()->CreateArguments(CreateArgumentsType::kRestParameter),
- closure, context, frame_state_inner, effect, control));
+ closure, context, frame_state_inner, effect));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(
+ r.replacement(),
+ IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _));
+}
+
+// -----------------------------------------------------------------------------
+// JSCreateClosure
+
+TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) {
+ Node* const context = UndefinedConstant();
+ Node* const effect = graph()->start();
+ Node* const control = graph()->start();
+ Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
+ Reduction r =
+ Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED),
+ context, effect, control));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(),
- IsFinishRegion(
- IsAllocate(IsNumberConstant(JSArray::kSize), _, control), _));
+ IsFinishRegion(IsAllocate(IsNumberConstant(JSFunction::kSize),
+ IsBeginRegion(_), control),
+ _));
}
// -----------------------------------------------------------------------------
diff --git a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
index de0eefc..7c2f459 100644
--- a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
+++ b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
@@ -92,7 +92,7 @@
input, context, effect, control));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(),
- IsFloat64ExtractLowWord32(IsGuard(Type::Number(), input, _)));
+ IsFloat64ExtractLowWord32(IsTypeGuard(Type::Number(), input, _)));
}
@@ -109,8 +109,8 @@
graph()->NewNode(javascript()->CallRuntime(Runtime::kInlineDoubleHi, 1),
input, context, effect, control));
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsFloat64ExtractHighWord32(IsGuard(Type::Number(), input, _)));
+ EXPECT_THAT(r.replacement(), IsFloat64ExtractHighWord32(
+ IsTypeGuard(Type::Number(), input, _)));
}
@@ -284,23 +284,6 @@
AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0))))));
}
-// -----------------------------------------------------------------------------
-// %_GetOrdinaryHasInstance
-
-TEST_F(JSIntrinsicLoweringTest, InlineGetOrdinaryHasInstance) {
- Node* const context = Parameter(0);
- Node* const effect = graph()->start();
- Node* const control = graph()->start();
- Reduction const r = Reduce(graph()->NewNode(
- javascript()->CallRuntime(Runtime::kInlineGetOrdinaryHasInstance, 0),
- context, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsLoadContext(
- ContextAccess(0, Context::ORDINARY_HAS_INSTANCE_INDEX, true), _));
-}
-
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/test/unittests/compiler/js-operator-unittest.cc b/test/unittests/compiler/js-operator-unittest.cc
index 15b1427..28df6a9 100644
--- a/test/unittests/compiler/js-operator-unittest.cc
+++ b/test/unittests/compiler/js-operator-unittest.cc
@@ -42,8 +42,8 @@
}
SHARED(Equal, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
SHARED(NotEqual, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
- SHARED(StrictEqual, Operator::kNoThrow, 2, 0, 1, 1, 1, 1, 0),
- SHARED(StrictNotEqual, Operator::kNoThrow, 2, 0, 1, 1, 1, 1, 0),
+ SHARED(StrictEqual, Operator::kPure, 2, 0, 0, 0, 1, 0, 0),
+ SHARED(StrictNotEqual, Operator::kPure, 2, 0, 0, 0, 1, 0, 0),
SHARED(LessThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
SHARED(GreaterThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
SHARED(LessThanOrEqual, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
@@ -51,11 +51,10 @@
SHARED(ToNumber, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
SHARED(ToString, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
- SHARED(ToObject, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
- SHARED(Yield, Operator::kNoProperties, 1, 0, 1, 1, 1, 1, 2),
+ SHARED(ToObject, Operator::kFoldable, 1, 1, 1, 1, 1, 1, 2),
SHARED(Create, Operator::kEliminatable, 2, 1, 1, 0, 1, 1, 0),
SHARED(HasProperty, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
- SHARED(TypeOf, Operator::kEliminatable, 1, 0, 1, 0, 1, 1, 0),
+ SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0, 0),
SHARED(InstanceOf, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
SHARED(CreateWithContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
SHARED(CreateModuleContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
index 1adb5da..904d5f7 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -212,9 +212,8 @@
TEST_F(JSTypedLoweringTest, JSToBooleanWithBoolean) {
Node* input = Parameter(Type::Boolean(), 0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_EQ(input, r.replacement());
}
@@ -242,9 +241,8 @@
zone()),
0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsFalseConstant());
}
@@ -258,9 +256,8 @@
zone()),
0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsTrueConstant());
}
@@ -269,9 +266,8 @@
TEST_F(JSTypedLoweringTest, JSToBooleanWithNonZeroPlainNumber) {
Node* input = Parameter(Type::Range(1, V8_INFINITY, zone()), 0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsTrueConstant());
}
@@ -280,9 +276,8 @@
TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumber) {
Node* input = Parameter(Type::OrderedNumber(), 0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(),
IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0))));
@@ -292,9 +287,8 @@
TEST_F(JSTypedLoweringTest, JSToBooleanWithString) {
Node* input = Parameter(Type::String(), 0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(
r.replacement(),
@@ -307,9 +301,8 @@
TEST_F(JSTypedLoweringTest, JSToBooleanWithAny) {
Node* input = Parameter(Type::Any(), 0);
Node* context = Parameter(Type::Any(), 1);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
- input, context, graph()->start()));
+ Reduction r = Reduce(graph()->NewNode(
+ javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
ASSERT_FALSE(r.Changed());
}
@@ -391,9 +384,8 @@
Node* const context = UndefinedConstant();
TRACED_FOREACH(Type*, type, kJSTypes) {
Node* const lhs = Parameter(type);
- Reduction r =
- Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole,
- context, graph()->start(), graph()->start()));
+ Reduction r = Reduce(
+ graph()->NewNode(javascript()->StrictEqual(), lhs, the_hole, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsFalseConstant());
}
@@ -405,8 +397,7 @@
Node* const rhs = Parameter(Type::Unique(), 1);
Node* const context = Parameter(Type::Any(), 2);
Reduction r =
- Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context,
- graph()->start(), graph()->start()));
+ Reduce(graph()->NewNode(javascript()->StrictEqual(), lhs, rhs, context));
ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), IsReferenceEqual(Type::Unique(), lhs, rhs));
}
@@ -823,24 +814,6 @@
}
-TEST_F(JSTypedLoweringTest, JSLoadNamedFunctionPrototype) {
- VectorSlotPair feedback;
- Handle<Name> name = factory()->prototype_string();
- Handle<JSFunction> function = isolate()->object_function();
- Handle<JSObject> function_prototype(JSObject::cast(function->prototype()));
- Node* const receiver = Parameter(Type::Constant(function, zone()), 0);
- Node* const vector = Parameter(Type::Internal(), 1);
- Node* const context = Parameter(Type::Internal(), 2);
- Node* const effect = graph()->start();
- Node* const control = graph()->start();
- Reduction const r = Reduce(graph()->NewNode(
- javascript()->LoadNamed(name, feedback), receiver, vector, context,
- EmptyFrameState(), EmptyFrameState(), effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsHeapConstant(function_prototype));
-}
-
-
// -----------------------------------------------------------------------------
// JSAdd
diff --git a/test/unittests/compiler/load-elimination-unittest.cc b/test/unittests/compiler/load-elimination-unittest.cc
index 38bb151..721d6df 100644
--- a/test/unittests/compiler/load-elimination-unittest.cc
+++ b/test/unittests/compiler/load-elimination-unittest.cc
@@ -14,23 +14,20 @@
class LoadEliminationTest : public TypedGraphTest {
public:
- LoadEliminationTest()
- : TypedGraphTest(3), common_(zone()), simplified_(zone()) {}
+ LoadEliminationTest() : TypedGraphTest(3), simplified_(zone()) {}
~LoadEliminationTest() override {}
protected:
Reduction Reduce(Node* node) {
// TODO(titzer): mock the GraphReducer here for better unit testing.
GraphReducer graph_reducer(zone(), graph());
- LoadElimination reducer(&graph_reducer, graph(), common());
+ LoadElimination reducer(&graph_reducer, graph(), simplified());
return reducer.Reduce(node);
}
SimplifiedOperatorBuilder* simplified() { return &simplified_; }
- CommonOperatorBuilder* common() { return &common_; }
private:
- CommonOperatorBuilder common_;
SimplifiedOperatorBuilder simplified_;
};
diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc
index 2feba2e..8b65e04 100644
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc
@@ -236,10 +236,6 @@
0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff};
-const TruncationMode kTruncationModes[] = {TruncationMode::kJavaScript,
- TruncationMode::kRoundToZero};
-
-
struct ComparisonBinaryOperator {
const Operator* (MachineOperatorBuilder::*constructor)();
const char* constructor_name;
@@ -413,51 +409,28 @@
// -----------------------------------------------------------------------------
-// TruncateFloat64ToInt32
-
+// TruncateFloat64ToWord32
TEST_F(MachineOperatorReducerTest,
- TruncateFloat64ToInt32WithChangeInt32ToFloat64) {
- TRACED_FOREACH(TruncationMode, mode, kTruncationModes) {
- Node* value = Parameter(0);
- Reduction reduction = Reduce(graph()->NewNode(
- machine()->TruncateFloat64ToInt32(mode),
- graph()->NewNode(machine()->ChangeInt32ToFloat64(), value)));
- ASSERT_TRUE(reduction.Changed());
- EXPECT_EQ(value, reduction.replacement());
- }
+ TruncateFloat64ToWord32WithChangeInt32ToFloat64) {
+ Node* value = Parameter(0);
+ Reduction reduction = Reduce(graph()->NewNode(
+ machine()->TruncateFloat64ToWord32(),
+ graph()->NewNode(machine()->ChangeInt32ToFloat64(), value)));
+ ASSERT_TRUE(reduction.Changed());
+ EXPECT_EQ(value, reduction.replacement());
}
-
-TEST_F(MachineOperatorReducerTest, TruncateFloat64ToInt32WithConstant) {
+TEST_F(MachineOperatorReducerTest, TruncateFloat64ToWord32WithConstant) {
TRACED_FOREACH(double, x, kFloat64Values) {
Reduction reduction = Reduce(graph()->NewNode(
- machine()->TruncateFloat64ToInt32(TruncationMode::kJavaScript),
- Float64Constant(x)));
+ machine()->TruncateFloat64ToWord32(), Float64Constant(x)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsInt32Constant(DoubleToInt32(x)));
}
}
-TEST_F(MachineOperatorReducerTest, TruncateFloat64ToInt32WithPhi) {
- Node* const p0 = Parameter(0);
- Node* const p1 = Parameter(1);
- Node* const merge = graph()->start();
- TRACED_FOREACH(TruncationMode, mode, kTruncationModes) {
- Reduction reduction = Reduce(graph()->NewNode(
- machine()->TruncateFloat64ToInt32(mode),
- graph()->NewNode(common()->Phi(MachineRepresentation::kFloat64, 2), p0,
- p1, merge)));
- ASSERT_TRUE(reduction.Changed());
- EXPECT_THAT(
- reduction.replacement(),
- IsPhi(MachineRepresentation::kWord32, IsTruncateFloat64ToInt32(p0),
- IsTruncateFloat64ToInt32(p1), merge));
- }
-}
-
-
// -----------------------------------------------------------------------------
// TruncateInt64ToInt32
@@ -485,8 +458,30 @@
// -----------------------------------------------------------------------------
-// Word32And
+// RoundFloat64ToInt32
+TEST_F(MachineOperatorReducerTest,
+ RoundFloat64ToInt32WithChangeInt32ToFloat64) {
+ Node* value = Parameter(0);
+ Reduction reduction = Reduce(graph()->NewNode(
+ machine()->RoundFloat64ToInt32(),
+ graph()->NewNode(machine()->ChangeInt32ToFloat64(), value)));
+ ASSERT_TRUE(reduction.Changed());
+ EXPECT_EQ(value, reduction.replacement());
+}
+
+TEST_F(MachineOperatorReducerTest, RoundFloat64ToInt32WithConstant) {
+ TRACED_FOREACH(double, x, kFloat64Values) {
+ Reduction reduction = Reduce(
+ graph()->NewNode(machine()->RoundFloat64ToInt32(), Float64Constant(x)));
+ ASSERT_TRUE(reduction.Changed());
+ EXPECT_THAT(reduction.replacement(),
+ IsInt32Constant(static_cast<int32_t>(x)));
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Word32And
TEST_F(MachineOperatorReducerTest, Word32AndWithWord32ShlWithConstant) {
Node* const p0 = Parameter(0);
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
index 6e5d39f..6adacc1 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -612,49 +612,6 @@
};
-class IsEffectSetMatcher final : public NodeMatcher {
- public:
- IsEffectSetMatcher(const Matcher<Node*>& effect0_matcher,
- const Matcher<Node*>& effect1_matcher)
- : NodeMatcher(IrOpcode::kEffectSet),
- effect0_matcher_(effect0_matcher),
- effect1_matcher_(effect1_matcher) {}
-
- void DescribeTo(std::ostream* os) const final {
- NodeMatcher::DescribeTo(os);
- *os << "), effect0 (";
- effect0_matcher_.DescribeTo(os);
- *os << ") and effect1 (";
- effect1_matcher_.DescribeTo(os);
- *os << ")";
- }
-
- bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
- if (!NodeMatcher::MatchAndExplain(node, listener)) return false;
-
- Node* effect0 = NodeProperties::GetEffectInput(node, 0);
- Node* effect1 = NodeProperties::GetEffectInput(node, 1);
-
- {
- // Try matching in the reverse order first.
- StringMatchResultListener value_listener;
- if (effect0_matcher_.MatchAndExplain(effect1, &value_listener) &&
- effect1_matcher_.MatchAndExplain(effect0, &value_listener)) {
- return true;
- }
- }
-
- return PrintMatchAndExplain(effect0, "effect0", effect0_matcher_,
- listener) &&
- PrintMatchAndExplain(effect1, "effect1", effect1_matcher_, listener);
- }
-
- private:
- const Matcher<Node*> effect0_matcher_;
- const Matcher<Node*> effect1_matcher_;
-};
-
-
class IsProjectionMatcher final : public NodeMatcher {
public:
IsProjectionMatcher(const Matcher<size_t>& index_matcher,
@@ -1352,12 +1309,12 @@
const Matcher<MachineRepresentation> rep_matcher_;
};
-class IsGuardMatcher final : public NodeMatcher {
+class IsTypeGuardMatcher final : public NodeMatcher {
public:
- IsGuardMatcher(const Matcher<Type*>& type_matcher,
- const Matcher<Node*>& value_matcher,
- const Matcher<Node*>& control_matcher)
- : NodeMatcher(IrOpcode::kGuard),
+ IsTypeGuardMatcher(const Matcher<Type*>& type_matcher,
+ const Matcher<Node*>& value_matcher,
+ const Matcher<Node*>& control_matcher)
+ : NodeMatcher(IrOpcode::kTypeGuard),
type_matcher_(type_matcher),
value_matcher_(value_matcher),
control_matcher_(control_matcher) {}
@@ -1818,12 +1775,6 @@
}
-Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher,
- const Matcher<Node*>& effect1_matcher) {
- return MakeMatcher(new IsEffectSetMatcher(effect0_matcher, effect1_matcher));
-}
-
-
Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
const Matcher<Node*>& base_matcher) {
return MakeMatcher(new IsProjectionMatcher(index_matcher, base_matcher));
@@ -2064,11 +2015,11 @@
effect_matcher, control_matcher));
}
-Matcher<Node*> IsGuard(const Matcher<Type*>& type_matcher,
- const Matcher<Node*>& value_matcher,
- const Matcher<Node*>& control_matcher) {
+Matcher<Node*> IsTypeGuard(const Matcher<Type*>& type_matcher,
+ const Matcher<Node*>& value_matcher,
+ const Matcher<Node*>& control_matcher) {
return MakeMatcher(
- new IsGuardMatcher(type_matcher, value_matcher, control_matcher));
+ new IsTypeGuardMatcher(type_matcher, value_matcher, control_matcher));
}
Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
@@ -2204,6 +2155,10 @@
return MakeMatcher(new NodeMatcher(IrOpcode::kLoadFramePointer));
}
+Matcher<Node*> IsLoadParentFramePointer() {
+ return MakeMatcher(new NodeMatcher(IrOpcode::kLoadParentFramePointer));
+}
+
#define IS_QUADOP_MATCHER(Name) \
Matcher<Node*> Is##Name( \
const Matcher<Node*>& a_matcher, const Matcher<Node*>& b_matcher, \
@@ -2284,6 +2239,7 @@
return MakeMatcher(new IsUnopMatcher(IrOpcode::k##Name, input_matcher)); \
}
IS_UNOP_MATCHER(BooleanNot)
+IS_UNOP_MATCHER(TruncateFloat64ToWord32)
IS_UNOP_MATCHER(ChangeFloat64ToInt32)
IS_UNOP_MATCHER(ChangeFloat64ToUint32)
IS_UNOP_MATCHER(ChangeInt32ToFloat64)
@@ -2291,7 +2247,6 @@
IS_UNOP_MATCHER(ChangeUint32ToFloat64)
IS_UNOP_MATCHER(ChangeUint32ToUint64)
IS_UNOP_MATCHER(TruncateFloat64ToFloat32)
-IS_UNOP_MATCHER(TruncateFloat64ToInt32)
IS_UNOP_MATCHER(TruncateInt64ToInt32)
IS_UNOP_MATCHER(Float32Abs)
IS_UNOP_MATCHER(Float64Abs)
diff --git a/test/unittests/compiler/node-test-utils.h b/test/unittests/compiler/node-test-utils.h
index dd036c9..4979bd5 100644
--- a/test/unittests/compiler/node-test-utils.h
+++ b/test/unittests/compiler/node-test-utils.h
@@ -97,8 +97,6 @@
Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
const Matcher<Node*>& effect1_matcher,
const Matcher<Node*>& merge_matcher);
-Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher,
- const Matcher<Node*>& effect1_matcher);
Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
const Matcher<Node*>& base_matcher);
Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
@@ -315,6 +313,7 @@
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsJSAdd(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
+Matcher<Node*> IsTruncateFloat64ToWord32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
@@ -322,7 +321,6 @@
Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
-Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsFloat32Max(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
@@ -362,6 +360,7 @@
Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsParameter(const Matcher<int> index_matcher);
Matcher<Node*> IsLoadFramePointer();
+Matcher<Node*> IsLoadParentFramePointer();
Matcher<Node*> IsInt32PairAdd(const Matcher<Node*>& a_matcher,
const Matcher<Node*>& b_matcher,
@@ -388,9 +387,9 @@
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsStackSlot();
-Matcher<Node*> IsGuard(const Matcher<Type*>& type_matcher,
- const Matcher<Node*>& value_matcher,
- const Matcher<Node*>& control_matcher);
+Matcher<Node*> IsTypeGuard(const Matcher<Type*>& type_matcher,
+ const Matcher<Node*>& value_matcher,
+ const Matcher<Node*>& control_matcher);
} // namespace compiler
} // namespace internal
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc
index f571898..eec39ab 100644
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc
@@ -150,60 +150,54 @@
// -----------------------------------------------------------------------------
-// ChangeBoolToBit
+// ChangeTaggedToBit
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBitToBoolWithChangeBoolToBit) {
+TEST_F(SimplifiedOperatorReducerTest, ChangeBitToTaggedWithChangeTaggedToBit) {
Node* param0 = Parameter(0);
Reduction reduction = Reduce(graph()->NewNode(
- simplified()->ChangeBitToBool(),
- graph()->NewNode(simplified()->ChangeBoolToBit(), param0)));
+ simplified()->ChangeBitToTagged(),
+ graph()->NewNode(simplified()->ChangeTaggedToBit(), param0)));
ASSERT_TRUE(reduction.Changed());
EXPECT_EQ(param0, reduction.replacement());
}
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBitToBoolWithZeroConstant) {
+TEST_F(SimplifiedOperatorReducerTest, ChangeBitToTaggedWithZeroConstant) {
Reduction reduction = Reduce(
- graph()->NewNode(simplified()->ChangeBitToBool(), Int32Constant(0)));
+ graph()->NewNode(simplified()->ChangeBitToTagged(), Int32Constant(0)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsFalseConstant());
}
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBitToBoolWithOneConstant) {
+TEST_F(SimplifiedOperatorReducerTest, ChangeBitToTaggedWithOneConstant) {
Reduction reduction = Reduce(
- graph()->NewNode(simplified()->ChangeBitToBool(), Int32Constant(1)));
+ graph()->NewNode(simplified()->ChangeBitToTagged(), Int32Constant(1)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsTrueConstant());
}
// -----------------------------------------------------------------------------
-// ChangeBoolToBit
+// ChangeTaggedToBit
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBoolToBitWithFalseConstant) {
+TEST_F(SimplifiedOperatorReducerTest, ChangeTaggedToBitWithFalseConstant) {
Reduction reduction = Reduce(
- graph()->NewNode(simplified()->ChangeBoolToBit(), FalseConstant()));
+ graph()->NewNode(simplified()->ChangeTaggedToBit(), FalseConstant()));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsInt32Constant(0));
}
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBoolToBitWithTrueConstant) {
- Reduction reduction =
- Reduce(graph()->NewNode(simplified()->ChangeBoolToBit(), TrueConstant()));
+TEST_F(SimplifiedOperatorReducerTest, ChangeTaggedToBitWithTrueConstant) {
+ Reduction reduction = Reduce(
+ graph()->NewNode(simplified()->ChangeTaggedToBit(), TrueConstant()));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsInt32Constant(1));
}
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeBoolToBitWithChangeBitToBool) {
+TEST_F(SimplifiedOperatorReducerTest, ChangeTaggedToBitWithChangeBitToTagged) {
Node* param0 = Parameter(0);
Reduction reduction = Reduce(graph()->NewNode(
- simplified()->ChangeBoolToBit(),
- graph()->NewNode(simplified()->ChangeBitToBool(), param0)));
+ simplified()->ChangeTaggedToBit(),
+ graph()->NewNode(simplified()->ChangeBitToTagged(), param0)));
ASSERT_TRUE(reduction.Changed());
EXPECT_EQ(param0, reduction.replacement());
}
@@ -401,6 +395,28 @@
}
}
+// -----------------------------------------------------------------------------
+// TruncateTaggedToWord32
+
+TEST_F(SimplifiedOperatorReducerTest,
+ TruncateTaggedToWord3WithChangeFloat64ToTagged) {
+ Node* param0 = Parameter(0);
+ Reduction reduction = Reduce(graph()->NewNode(
+ simplified()->TruncateTaggedToWord32(),
+ graph()->NewNode(simplified()->ChangeFloat64ToTagged(), param0)));
+ ASSERT_TRUE(reduction.Changed());
+ EXPECT_THAT(reduction.replacement(), IsTruncateFloat64ToWord32(param0));
+}
+
+TEST_F(SimplifiedOperatorReducerTest, TruncateTaggedToWord32WithConstant) {
+ TRACED_FOREACH(double, n, kFloat64Values) {
+ Reduction reduction = Reduce(graph()->NewNode(
+ simplified()->TruncateTaggedToWord32(), NumberConstant(n)));
+ ASSERT_TRUE(reduction.Changed());
+ EXPECT_THAT(reduction.replacement(), IsInt32Constant(DoubleToInt32(n)));
+ }
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/test/unittests/compiler/simplified-operator-unittest.cc b/test/unittests/compiler/simplified-operator-unittest.cc
index bd8509f..ba404a9 100644
--- a/test/unittests/compiler/simplified-operator-unittest.cc
+++ b/test/unittests/compiler/simplified-operator-unittest.cc
@@ -31,7 +31,6 @@
return os << IrOpcode::Mnemonic(pop.opcode);
}
-
const PureOperator kPureOperators[] = {
#define PURE(Name, properties, input_count) \
{ \
@@ -56,15 +55,16 @@
PURE(NumberShiftRightLogical, Operator::kNoProperties, 2),
PURE(NumberToInt32, Operator::kNoProperties, 1),
PURE(NumberToUint32, Operator::kNoProperties, 1),
- PURE(PlainPrimitiveToNumber, Operator::kNoProperties, 1),
+ PURE(ChangeTaggedSignedToInt32, Operator::kNoProperties, 1),
PURE(ChangeTaggedToInt32, Operator::kNoProperties, 1),
PURE(ChangeTaggedToUint32, Operator::kNoProperties, 1),
PURE(ChangeTaggedToFloat64, Operator::kNoProperties, 1),
PURE(ChangeInt32ToTagged, Operator::kNoProperties, 1),
PURE(ChangeUint32ToTagged, Operator::kNoProperties, 1),
PURE(ChangeFloat64ToTagged, Operator::kNoProperties, 1),
- PURE(ChangeBoolToBit, Operator::kNoProperties, 1),
- PURE(ChangeBitToBool, Operator::kNoProperties, 1),
+ PURE(ChangeTaggedToBit, Operator::kNoProperties, 1),
+ PURE(ChangeBitToTagged, Operator::kNoProperties, 1),
+ PURE(TruncateTaggedToWord32, Operator::kNoProperties, 1),
PURE(ObjectIsNumber, Operator::kNoProperties, 1),
PURE(ObjectIsReceiver, Operator::kNoProperties, 1),
PURE(ObjectIsSmi, Operator::kNoProperties, 1)
@@ -203,39 +203,46 @@
const ElementAccess kElementAccesses[] = {
{kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
- MachineType::AnyTagged()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Int8()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Int16()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Int32()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Uint8()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Uint16()},
- {kUntaggedBase, 0, Type::Any(), MachineType::Uint32()},
- {kUntaggedBase, 0, Type::Signed32(), MachineType::Int8()},
- {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint8()},
- {kUntaggedBase, 0, Type::Signed32(), MachineType::Int16()},
- {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint16()},
- {kUntaggedBase, 0, Type::Signed32(), MachineType::Int32()},
- {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint32()},
+ MachineType::AnyTagged(), kFullWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Int8(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Int16(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Int32(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Uint8(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Uint16(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Any(), MachineType::Uint32(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Signed32(), MachineType::Int8(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint8(),
+ kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Signed32(), MachineType::Int16(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint16(),
+ kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Signed32(), MachineType::Int32(), kNoWriteBarrier},
+ {kUntaggedBase, 0, Type::Unsigned32(), MachineType::Uint32(),
+ kNoWriteBarrier},
{kUntaggedBase, 0, Type::Number(),
- MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone)},
+ MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone),
+ kNoWriteBarrier},
{kUntaggedBase, 0, Type::Number(),
- MachineType(MachineRepresentation::kFloat64, MachineSemantic::kNone)},
+ MachineType(MachineRepresentation::kFloat64, MachineSemantic::kNone),
+ kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Signed32(),
- MachineType::Int8()},
+ MachineType::Int8(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Unsigned32(),
- MachineType::Uint8()},
+ MachineType::Uint8(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Signed32(),
- MachineType::Int16()},
+ MachineType::Int16(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Unsigned32(),
- MachineType::Uint16()},
+ MachineType::Uint16(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Signed32(),
- MachineType::Int32()},
+ MachineType::Int32(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Unsigned32(),
- MachineType::Uint32()},
+ MachineType::Uint32(), kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Number(),
- MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone)},
+ MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone),
+ kNoWriteBarrier},
{kTaggedBase, FixedTypedArrayBase::kDataOffset, Type::Number(),
- MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone)}};
+ MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone),
+ kNoWriteBarrier}};
} // namespace
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 255d836..a569c94 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -22,11 +22,16 @@
TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
BytecodeArrayBuilder builder(isolate(), zone(), 0, 1, 131);
+ Factory* factory = isolate()->factory();
CHECK_EQ(builder.locals_count(), 131);
CHECK_EQ(builder.context_count(), 1);
CHECK_EQ(builder.fixed_register_count(), 132);
+ Register reg(0);
+ Register other(reg.index() + 1);
+ Register wide(128);
+
// Emit argument creation operations.
builder.CreateArguments(CreateArgumentsType::kMappedArguments)
.CreateArguments(CreateArgumentsType::kUnmappedArguments)
@@ -34,19 +39,27 @@
// Emit constant loads.
builder.LoadLiteral(Smi::FromInt(0))
+ .StoreAccumulatorInRegister(reg)
.LoadLiteral(Smi::FromInt(8))
+ .StoreAccumulatorInRegister(reg)
.LoadLiteral(Smi::FromInt(10000000))
+ .StoreAccumulatorInRegister(reg)
+ .LoadLiteral(factory->NewStringFromStaticChars("A constant"))
+ .StoreAccumulatorInRegister(reg)
.LoadUndefined()
+ .StoreAccumulatorInRegister(reg)
.LoadNull()
+ .StoreAccumulatorInRegister(reg)
.LoadTheHole()
+ .StoreAccumulatorInRegister(reg)
.LoadTrue()
- .LoadFalse();
+ .StoreAccumulatorInRegister(reg)
+ .LoadFalse()
+ .StoreAccumulatorInRegister(wide);
- Register reg(0);
- Register other(reg.index() + 1);
- Register wide(128);
-
- builder.LoadAccumulatorWithRegister(reg)
+ builder.StackCheck(0)
+ .LoadAccumulatorWithRegister(other)
+ .StoreAccumulatorInRegister(reg)
.LoadNull()
.StoreAccumulatorInRegister(reg);
@@ -55,7 +68,6 @@
builder.MoveRegister(reg, wide);
// Emit global load / store operations.
- Factory* factory = isolate()->factory();
Handle<String> name = factory->NewStringFromStaticChars("var_name");
builder.LoadGlobal(name, 1, TypeofMode::NOT_INSIDE_TYPEOF)
.LoadGlobal(name, 1, TypeofMode::INSIDE_TYPEOF)
@@ -126,7 +138,10 @@
builder.CountOperation(Token::Value::ADD).CountOperation(Token::Value::SUB);
// Emit unary operator invocations.
- builder.LogicalNot().TypeOf();
+ builder
+ .LogicalNot() // ToBooleanLogicalNot
+ .LogicalNot() // non-ToBoolean LogicalNot
+ .TypeOf();
// Emit delete
builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT);
@@ -208,7 +223,7 @@
.JumpIfFalse(&start);
// Emit stack check bytecode.
- builder.StackCheck();
+ builder.StackCheck(0);
// Emit throw and re-throw in it's own basic block so that the rest of the
// code isn't omitted due to being dead.
@@ -289,6 +304,10 @@
.BinaryOperation(Token::Value::ADD, reg)
.JumpIfFalse(&start);
+ // Emit generator operations
+ builder.SuspendGenerator(reg)
+ .ResumeGenerator(reg);
+
// Intrinsics handled by the interpreter.
builder.CallRuntime(Runtime::kInlineIsArray, reg, 1)
.CallRuntime(Runtime::kInlineIsArray, wide, 1);
@@ -327,6 +346,9 @@
// Insert entry for illegal bytecode as this is never willingly emitted.
scorecard[Bytecodes::ToByte(Bytecode::kIllegal)] = 1;
+ // Insert entry for nop bytecode as this often gets optimized out.
+ scorecard[Bytecodes::ToByte(Bytecode::kNop)] = 1;
+
// Check return occurs at the end and only once in the BytecodeArray.
CHECK_EQ(final_bytecode, Bytecode::kReturn);
CHECK_EQ(scorecard[Bytecodes::ToByte(final_bytecode)], 1);
@@ -364,14 +386,11 @@
TEST_F(BytecodeArrayBuilderTest, RegisterValues) {
int index = 1;
- int32_t operand = -index;
Register the_register(index);
CHECK_EQ(the_register.index(), index);
int actual_operand = the_register.ToOperand();
- CHECK_EQ(actual_operand, operand);
-
int actual_index = Register::FromOperand(actual_operand).index();
CHECK_EQ(actual_index, index);
}
@@ -461,7 +480,7 @@
.BinaryOperation(Token::Value::ADD, reg)
.JumpIfFalse(&far4);
for (int i = 0; i < kFarJumpDistance - 18; i++) {
- builder.LoadUndefined();
+ builder.Debugger();
}
builder.Bind(&far0).Bind(&far1).Bind(&far2).Bind(&far3).Bind(&far4);
builder.Return();
@@ -502,7 +521,6 @@
CHECK_EQ(iterator.GetImmediateOperand(0), 2);
iterator.Advance();
-
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJumpConstant);
CHECK_EQ(*iterator.GetConstantForIndexOperand(0),
Smi::FromInt(kFarJumpDistance));
@@ -568,7 +586,7 @@
// Add padding to force wide backwards jumps.
for (int i = 0; i < 256; i++) {
- builder.LoadTrue();
+ builder.Debugger();
}
builder.BinaryOperation(Token::Value::ADD, reg).JumpIfFalse(&label4);
@@ -615,7 +633,7 @@
}
// Check padding to force wide backwards jumps.
for (int i = 0; i < 256; i++) {
- CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaTrue);
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger);
iterator.Advance();
}
// Ignore binary operation.
@@ -706,85 +724,6 @@
CHECK(iterator.done());
}
-TEST_F(BytecodeArrayBuilderTest, OperandScales) {
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(OperandSize::kByte),
- OperandScale::kSingle);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(OperandSize::kShort),
- OperandScale::kDouble);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(OperandSize::kQuad),
- OperandScale::kQuadruple);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(
- OperandSize::kShort, OperandSize::kShort, OperandSize::kShort,
- OperandSize::kShort),
- OperandScale::kDouble);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(
- OperandSize::kQuad, OperandSize::kShort, OperandSize::kShort,
- OperandSize::kShort),
- OperandScale::kQuadruple);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(
- OperandSize::kShort, OperandSize::kQuad, OperandSize::kShort,
- OperandSize::kShort),
- OperandScale::kQuadruple);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(
- OperandSize::kShort, OperandSize::kShort, OperandSize::kQuad,
- OperandSize::kShort),
- OperandScale::kQuadruple);
- CHECK_EQ(BytecodeArrayBuilder::OperandSizesToScale(
- OperandSize::kShort, OperandSize::kShort, OperandSize::kShort,
- OperandSize::kQuad),
- OperandScale::kQuadruple);
-}
-
-TEST_F(BytecodeArrayBuilderTest, SizesForSignOperands) {
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(0) == OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMaxInt8) ==
- OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMinInt8) ==
- OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMaxInt8 + 1) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMinInt8 - 1) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMaxInt16) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMinInt16) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMaxInt16 + 1) ==
- OperandSize::kQuad);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMinInt16 - 1) ==
- OperandSize::kQuad);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMaxInt) ==
- OperandSize::kQuad);
- CHECK(BytecodeArrayBuilder::SizeForSignedOperand(kMinInt) ==
- OperandSize::kQuad);
-}
-
-TEST_F(BytecodeArrayBuilderTest, SizesForUnsignOperands) {
- // int overloads
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(0) == OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(kMaxUInt8) ==
- OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(kMaxUInt8 + 1) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(kMaxUInt16) ==
- OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(kMaxUInt16 + 1) ==
- OperandSize::kQuad);
- // size_t overloads
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(static_cast<size_t>(0)) ==
- OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
- static_cast<size_t>(kMaxUInt8)) == OperandSize::kByte);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
- static_cast<size_t>(kMaxUInt8 + 1)) == OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
- static_cast<size_t>(kMaxUInt16)) == OperandSize::kShort);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
- static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad);
- CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
- static_cast<size_t>(kMaxUInt32)) == OperandSize::kQuad);
-}
-
} // namespace interpreter
} // namespace internal
} // namespace v8
diff --git a/test/unittests/interpreter/bytecode-array-iterator-unittest.cc b/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
index 43c6caa..aa9effe 100644
--- a/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
@@ -37,11 +37,17 @@
int feedback_slot = 97;
builder.LoadLiteral(heap_num_0)
+ .StoreAccumulatorInRegister(reg_0)
.LoadLiteral(heap_num_1)
+ .StoreAccumulatorInRegister(reg_0)
.LoadLiteral(zero)
+ .StoreAccumulatorInRegister(reg_0)
.LoadLiteral(smi_0)
+ .StoreAccumulatorInRegister(reg_0)
.LoadLiteral(smi_1)
+ .StoreAccumulatorInRegister(reg_1)
.LoadAccumulatorWithRegister(reg_0)
+ .StoreAccumulatorInRegister(reg_1)
.LoadNamedProperty(reg_1, name, feedback_slot)
.StoreAccumulatorInRegister(param)
.CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, param, 1, reg_0)
@@ -64,6 +70,15 @@
offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaConstant);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
@@ -72,6 +87,15 @@
offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaZero);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
@@ -79,6 +103,15 @@
offset += Bytecodes::Size(Bytecode::kLdaZero, OperandScale::kSingle);
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaSmi);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
@@ -87,6 +120,15 @@
offset += Bytecodes::Size(Bytecode::kLdaSmi, OperandScale::kSingle);
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaSmi);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kQuadruple);
@@ -96,6 +138,15 @@
kPrefixByteSize;
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_1.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdar);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
@@ -104,6 +155,15 @@
offset += Bytecodes::Size(Bytecode::kLdar, OperandScale::kSingle);
iterator.Advance();
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar);
+ CHECK_EQ(iterator.current_offset(), offset);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_1.index());
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1);
+ CHECK(!iterator.done());
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
+ iterator.Advance();
+
CHECK_EQ(iterator.current_bytecode(), Bytecode::kLoadIC);
CHECK_EQ(iterator.current_offset(), offset);
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
diff --git a/test/unittests/interpreter/bytecode-array-writer-unittest.cc b/test/unittests/interpreter/bytecode-array-writer-unittest.cc
new file mode 100644
index 0000000..a1b4910
--- /dev/null
+++ b/test/unittests/interpreter/bytecode-array-writer-unittest.cc
@@ -0,0 +1,233 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#include "src/interpreter/bytecode-array-writer.h"
+#include "src/interpreter/source-position-table.h"
+#include "src/isolate.h"
+#include "src/utils.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace interpreter {
+
+class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
+ public:
+ BytecodeArrayWriterUnittest()
+ : source_position_builder_(isolate(), zone()),
+ bytecode_array_writer_(zone(), &source_position_builder_) {}
+ ~BytecodeArrayWriterUnittest() override {}
+
+ void Write(BytecodeNode* node, const BytecodeSourceInfo& info);
+ void Write(Bytecode bytecode,
+ const BytecodeSourceInfo& info = BytecodeSourceInfo());
+ void Write(Bytecode bytecode, uint32_t operand0, OperandScale operand_scale,
+ const BytecodeSourceInfo& info = BytecodeSourceInfo());
+ void Write(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
+ OperandScale operand_scale,
+ const BytecodeSourceInfo& info = BytecodeSourceInfo());
+ void Write(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
+ uint32_t operand2, OperandScale operand_scale,
+ const BytecodeSourceInfo& info = BytecodeSourceInfo());
+ void Write(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
+ uint32_t operand2, uint32_t operand3, OperandScale operand_scale,
+ const BytecodeSourceInfo& info = BytecodeSourceInfo());
+
+ SourcePositionTableBuilder* source_position_builder() {
+ return &source_position_builder_;
+ }
+ BytecodeArrayWriter* writer() { return &bytecode_array_writer_; }
+
+ private:
+ SourcePositionTableBuilder source_position_builder_;
+ BytecodeArrayWriter bytecode_array_writer_;
+};
+
+void BytecodeArrayWriterUnittest::Write(BytecodeNode* node,
+ const BytecodeSourceInfo& info) {
+ if (info.is_valid()) {
+ node->source_info().Update(info);
+ }
+ writer()->Write(node);
+}
+
+void BytecodeArrayWriterUnittest::Write(Bytecode bytecode,
+ const BytecodeSourceInfo& info) {
+ BytecodeNode node(bytecode);
+ Write(&node, info);
+}
+
+void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
+ OperandScale operand_scale,
+ const BytecodeSourceInfo& info) {
+ BytecodeNode node(bytecode, operand0, operand_scale);
+ Write(&node, info);
+}
+
+void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
+ uint32_t operand1,
+ OperandScale operand_scale,
+ const BytecodeSourceInfo& info) {
+ BytecodeNode node(bytecode, operand0, operand1, operand_scale);
+ Write(&node, info);
+}
+
+void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
+ uint32_t operand1, uint32_t operand2,
+ OperandScale operand_scale,
+ const BytecodeSourceInfo& info) {
+ BytecodeNode node(bytecode, operand0, operand1, operand2, operand_scale);
+ Write(&node, info);
+}
+
+void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
+ uint32_t operand1, uint32_t operand2,
+ uint32_t operand3,
+ OperandScale operand_scale,
+ const BytecodeSourceInfo& info) {
+ BytecodeNode node(bytecode, operand0, operand1, operand2, operand3,
+ operand_scale);
+ Write(&node, info);
+}
+
+TEST_F(BytecodeArrayWriterUnittest, SimpleExample) {
+ CHECK_EQ(writer()->bytecodes()->size(), 0);
+
+ Write(Bytecode::kStackCheck, {10, false});
+ CHECK_EQ(writer()->bytecodes()->size(), 1);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 0);
+
+ Write(Bytecode::kLdaSmi, 0xff, OperandScale::kSingle, {55, true});
+ CHECK_EQ(writer()->bytecodes()->size(), 3);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 0);
+
+ Write(Bytecode::kLdar, Register(1).ToOperand(), OperandScale::kDouble);
+ CHECK_EQ(writer()->bytecodes()->size(), 7);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 2 * kPointerSize);
+
+ Write(Bytecode::kReturn, {70, true});
+ CHECK_EQ(writer()->bytecodes()->size(), 8);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 2 * kPointerSize);
+
+ static const uint8_t bytes[] = {B(StackCheck), B(LdaSmi), U8(0xff), B(Wide),
+ B(Ldar), R16(1), B(Return)};
+ CHECK_EQ(writer()->bytecodes()->size(), arraysize(bytes));
+ for (size_t i = 0; i < arraysize(bytes); ++i) {
+ CHECK_EQ(writer()->bytecodes()->at(i), bytes[i]);
+ }
+
+ CHECK_EQ(writer()->FlushForOffset(), arraysize(bytes));
+ writer()->FlushBasicBlock();
+ CHECK_EQ(writer()->bytecodes()->size(), arraysize(bytes));
+
+ PositionTableEntry expected_positions[] = {
+ {0, 10, false}, {1, 55, true}, {7, 70, true}};
+ Handle<ByteArray> source_positions =
+ source_position_builder()->ToSourcePositionTable();
+ SourcePositionTableIterator source_iterator(*source_positions);
+ for (size_t i = 0; i < arraysize(expected_positions); ++i) {
+ const PositionTableEntry& expected = expected_positions[i];
+ CHECK_EQ(source_iterator.bytecode_offset(), expected.bytecode_offset);
+ CHECK_EQ(source_iterator.source_position(), expected.source_position);
+ CHECK_EQ(source_iterator.is_statement(), expected.is_statement);
+ source_iterator.Advance();
+ }
+ CHECK(source_iterator.done());
+}
+
+TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
+ static const uint8_t expected_bytes[] = {
+ // clang-format off
+ /* 0 30 E> */ B(StackCheck),
+ /* 1 42 S> */ B(LdaConstant), U8(0),
+ /* 3 42 E> */ B(Star), R8(1),
+ /* 5 68 S> */ B(JumpIfUndefined), U8(38),
+ /* 7 */ B(JumpIfNull), U8(36),
+ /* 9 */ B(ToObject),
+ /* 10 */ B(Star), R8(3),
+ /* 12 */ B(ForInPrepare), R8(4),
+ /* 14 */ B(LdaZero),
+ /* 15 */ B(Star), R8(7),
+ /* 17 63 S> */ B(ForInDone), R8(7), R8(6),
+ /* 20 */ B(JumpIfTrue), U8(23),
+ /* 22 */ B(ForInNext), R8(3), R8(7), R8(4), U8(1),
+ /* 27 */ B(JumpIfUndefined), U8(10),
+ /* 29 */ B(Star), R8(0),
+ /* 31 54 E> */ B(StackCheck),
+ /* 32 */ B(Ldar), R8(0),
+ /* 34 */ B(Star), R8(2),
+ /* 36 85 S> */ B(Return),
+ /* 37 */ B(ForInStep), R8(7),
+ /* 39 */ B(Star), R8(7),
+ /* 41 */ B(Jump), U8(-24),
+ /* 43 */ B(LdaUndefined),
+ /* 44 85 S> */ B(Return),
+ // clang-format on
+ };
+
+ static const PositionTableEntry expected_positions[] = {
+ {0, 30, false}, {1, 42, true}, {3, 42, false}, {5, 68, true},
+ {17, 63, true}, {31, 54, false}, {36, 85, true}, {44, 85, true}};
+
+#define R(i) static_cast<uint32_t>(Register(i).ToOperand())
+ Write(Bytecode::kStackCheck, {30, false});
+ Write(Bytecode::kLdaConstant, U8(0), OperandScale::kSingle, {42, true});
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 0 * kPointerSize);
+ Write(Bytecode::kStar, R(1), OperandScale::kSingle, {42, false});
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 2 * kPointerSize);
+ Write(Bytecode::kJumpIfUndefined, U8(38), OperandScale::kSingle, {68, true});
+ Write(Bytecode::kJumpIfNull, U8(36), OperandScale::kSingle);
+ Write(Bytecode::kToObject);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 2 * kPointerSize);
+ Write(Bytecode::kStar, R(3), OperandScale::kSingle);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 4 * kPointerSize);
+ Write(Bytecode::kForInPrepare, R(4), OperandScale::kSingle);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 7 * kPointerSize);
+ Write(Bytecode::kLdaZero);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 7 * kPointerSize);
+ Write(Bytecode::kStar, R(7), OperandScale::kSingle);
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 8 * kPointerSize);
+ Write(Bytecode::kForInDone, R(7), R(6), OperandScale::kSingle, {63, true});
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 8 * kPointerSize);
+ Write(Bytecode::kJumpIfTrue, U8(23), OperandScale::kSingle);
+ Write(Bytecode::kForInNext, R(3), R(7), R(4), U8(1), OperandScale::kSingle);
+ Write(Bytecode::kJumpIfUndefined, U8(10), OperandScale::kSingle);
+ Write(Bytecode::kStar, R(0), OperandScale::kSingle);
+ Write(Bytecode::kStackCheck, {54, false});
+ Write(Bytecode::kLdar, R(0), OperandScale::kSingle);
+ Write(Bytecode::kStar, R(2), OperandScale::kSingle);
+ Write(Bytecode::kReturn, {85, true});
+ Write(Bytecode::kForInStep, R(7), OperandScale::kSingle);
+ Write(Bytecode::kStar, R(7), OperandScale::kSingle);
+ Write(Bytecode::kJump, U8(-24), OperandScale::kSingle);
+ Write(Bytecode::kLdaUndefined);
+ Write(Bytecode::kReturn, {85, true});
+ CHECK_EQ(writer()->GetMaximumFrameSizeUsed(), 8 * kPointerSize);
+#undef R
+
+ CHECK_EQ(writer()->bytecodes()->size(), arraysize(expected_bytes));
+ for (size_t i = 0; i < arraysize(expected_bytes); ++i) {
+ CHECK_EQ(static_cast<int>(writer()->bytecodes()->at(i)),
+ static_cast<int>(expected_bytes[i]));
+ }
+
+ Handle<ByteArray> source_positions =
+ source_position_builder()->ToSourcePositionTable();
+ SourcePositionTableIterator source_iterator(*source_positions);
+ for (size_t i = 0; i < arraysize(expected_positions); ++i) {
+ const PositionTableEntry& expected = expected_positions[i];
+ CHECK_EQ(source_iterator.bytecode_offset(), expected.bytecode_offset);
+ CHECK_EQ(source_iterator.source_position(), expected.source_position);
+ CHECK_EQ(source_iterator.is_statement(), expected.is_statement);
+ source_iterator.Advance();
+ }
+ CHECK(source_iterator.done());
+}
+
+} // namespace interpreter
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
new file mode 100644
index 0000000..cf4a920
--- /dev/null
+++ b/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc
@@ -0,0 +1,385 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#include "src/factory.h"
+#include "src/interpreter/bytecode-peephole-optimizer.h"
+#include "src/interpreter/constant-array-builder.h"
+#include "src/objects-inl.h"
+#include "src/objects.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace interpreter {
+
+class BytecodePeepholeOptimizerTest : public BytecodePipelineStage,
+ public TestWithIsolateAndZone {
+ public:
+ BytecodePeepholeOptimizerTest()
+ : constant_array_builder_(isolate(), zone()),
+ peephole_optimizer_(&constant_array_builder_, this) {}
+ ~BytecodePeepholeOptimizerTest() override {}
+
+ size_t FlushForOffset() override {
+ flush_for_offset_count_++;
+ return 0;
+ };
+
+ void FlushBasicBlock() override { flush_basic_block_count_++; }
+
+ void Write(BytecodeNode* node) override {
+ write_count_++;
+ last_written_.Clone(node);
+ }
+
+ BytecodePeepholeOptimizer* optimizer() { return &peephole_optimizer_; }
+ ConstantArrayBuilder* constant_array() { return &constant_array_builder_; }
+
+ int flush_for_offset_count() const { return flush_for_offset_count_; }
+ int flush_basic_block_count() const { return flush_basic_block_count_; }
+ int write_count() const { return write_count_; }
+ const BytecodeNode& last_written() const { return last_written_; }
+
+ private:
+ ConstantArrayBuilder constant_array_builder_;
+ BytecodePeepholeOptimizer peephole_optimizer_;
+
+ int flush_for_offset_count_ = 0;
+ int flush_basic_block_count_ = 0;
+ int write_count_ = 0;
+ BytecodeNode last_written_;
+};
+
+// Sanity tests.
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushForOffsetPassThrough) {
+ CHECK_EQ(flush_for_offset_count(), 0);
+ CHECK_EQ(optimizer()->FlushForOffset(), 0);
+ CHECK_EQ(flush_for_offset_count(), 1);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushForOffsetRightSize) {
+ BytecodeNode node(Bytecode::kAdd, Register(0).ToOperand(),
+ OperandScale::kQuadruple);
+ optimizer()->Write(&node);
+ CHECK_EQ(optimizer()->FlushForOffset(), node.Size());
+ CHECK_EQ(flush_for_offset_count(), 1);
+ CHECK_EQ(write_count(), 0);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushForOffsetNop) {
+ BytecodeNode node(Bytecode::kNop);
+ optimizer()->Write(&node);
+ CHECK_EQ(optimizer()->FlushForOffset(), 0);
+ CHECK_EQ(flush_for_offset_count(), 1);
+ CHECK_EQ(write_count(), 0);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushForOffsetNopExpression) {
+ BytecodeNode node(Bytecode::kNop);
+ node.source_info().Update({3, false});
+ optimizer()->Write(&node);
+ CHECK_EQ(optimizer()->FlushForOffset(), 0);
+ CHECK_EQ(flush_for_offset_count(), 1);
+ CHECK_EQ(write_count(), 0);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushForOffsetNopStatement) {
+ BytecodeNode node(Bytecode::kNop);
+ node.source_info().Update({3, true});
+ optimizer()->Write(&node);
+ CHECK_EQ(optimizer()->FlushForOffset(), node.Size());
+ CHECK_EQ(flush_for_offset_count(), 1);
+ CHECK_EQ(write_count(), 0);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, FlushBasicBlockPassThrough) {
+ CHECK_EQ(flush_basic_block_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(flush_basic_block_count(), 1);
+ CHECK_EQ(write_count(), 0);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, WriteOneFlushBasicBlock) {
+ BytecodeNode node(Bytecode::kAdd, Register(0).ToOperand(),
+ OperandScale::kQuadruple);
+ optimizer()->Write(&node);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(node, last_written());
+}
+
+// Tests covering BytecodePeepholeOptimizer::UpdateCurrentBytecode().
+
+TEST_F(BytecodePeepholeOptimizerTest, KeepJumpIfToBooleanTrue) {
+ BytecodeNode first(Bytecode::kLdaNull);
+ BytecodeNode second(Bytecode::kJumpIfToBooleanTrue, 3, OperandScale::kSingle);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, ElideJumpIfToBooleanTrue) {
+ BytecodeNode first(Bytecode::kLdaTrue);
+ BytecodeNode second(Bytecode::kJumpIfToBooleanTrue, 3, OperandScale::kSingle);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written().bytecode(), Bytecode::kJumpIfTrue);
+ CHECK_EQ(last_written().operand(0), second.operand(0));
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, KeepToBooleanLogicalNot) {
+ BytecodeNode first(Bytecode::kLdaNull);
+ BytecodeNode second(Bytecode::kToBooleanLogicalNot);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, ElideToBooleanLogicalNot) {
+ BytecodeNode first(Bytecode::kLdaTrue);
+ BytecodeNode second(Bytecode::kToBooleanLogicalNot);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written().bytecode(), Bytecode::kLogicalNot);
+}
+
+// Tests covering BytecodePeepholeOptimizer::CanElideCurrent().
+
+TEST_F(BytecodePeepholeOptimizerTest, LdarRxLdarRy) {
+ BytecodeNode first(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kLdar, Register(1).ToOperand(),
+ OperandScale::kSingle);
+ optimizer()->Write(&first);
+ optimizer()->FlushForOffset(); // Prevent CanElideLast removing |first|.
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdarRxLdarRx) {
+ BytecodeNode first(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushForOffset(); // Prevent CanElideLast removing |first|.
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdarRxLdarRxStatement) {
+ BytecodeNode first(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ second.source_info().Update({0, true});
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushForOffset(); // Prevent CanElideLast removing |first|.
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written().bytecode(), Bytecode::kNop);
+ CHECK_EQ(last_written().source_info(), second.source_info());
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdarRxLdarRxStatementStarRy) {
+ BytecodeNode first(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode third(Bytecode::kStar, Register(3).ToOperand(),
+ OperandScale::kSingle);
+ second.source_info().Update({0, true});
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushForOffset(); // Prevent CanElideLast removing |first|.
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->Write(&third);
+ CHECK_EQ(write_count(), 1);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ // Source position should move |second| to |third| when |second| is elided.
+ third.source_info().Update(second.source_info());
+ CHECK_EQ(last_written(), third);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdarToName) {
+ BytecodeNode first(Bytecode::kLdar, Register(0).ToOperand(),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kToName);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, ToNameToName) {
+ BytecodeNode first(Bytecode::kToName);
+ BytecodeNode second(Bytecode::kToName);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, TypeOfToName) {
+ BytecodeNode first(Bytecode::kTypeOf);
+ BytecodeNode second(Bytecode::kToName);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdaConstantStringToName) {
+ Handle<Object> word =
+ isolate()->factory()->NewStringFromStaticChars("optimizing");
+ size_t index = constant_array()->Insert(word);
+ BytecodeNode first(Bytecode::kLdaConstant, static_cast<uint32_t>(index),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kToName);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdaConstantNumberToName) {
+ Handle<Object> word = isolate()->factory()->NewNumber(0.380);
+ size_t index = constant_array()->Insert(word);
+ BytecodeNode first(Bytecode::kLdaConstant, static_cast<uint32_t>(index),
+ OperandScale::kSingle);
+ BytecodeNode second(Bytecode::kToName);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+// Tests covering BytecodePeepholeOptimizer::CanElideLast().
+
+TEST_F(BytecodePeepholeOptimizerTest, LdaTrueLdaFalseNotDiscardable) {
+ BytecodeNode first(Bytecode::kLdaTrue);
+ BytecodeNode second(Bytecode::kLdaFalse);
+ optimizer()->Write(&first);
+ optimizer()->FlushForOffset(); // Prevent discarding of |first|.
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), first);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 2);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdaTrueLdaFalse) {
+ BytecodeNode first(Bytecode::kLdaTrue);
+ BytecodeNode second(Bytecode::kLdaFalse);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, LdaTrueStatementLdaFalse) {
+ BytecodeNode first(Bytecode::kLdaTrue);
+ first.source_info().Update({3, false});
+ BytecodeNode second(Bytecode::kLdaFalse);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+ second.source_info().Update(first.source_info());
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, NopStackCheck) {
+ BytecodeNode first(Bytecode::kNop);
+ BytecodeNode second(Bytecode::kStackCheck);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+ CHECK_EQ(last_written(), second);
+}
+
+TEST_F(BytecodePeepholeOptimizerTest, NopStatementStackCheck) {
+ BytecodeNode first(Bytecode::kNop);
+ first.source_info().Update({3, false});
+ BytecodeNode second(Bytecode::kStackCheck);
+ optimizer()->Write(&first);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->Write(&second);
+ CHECK_EQ(write_count(), 0);
+ optimizer()->FlushBasicBlock();
+ CHECK_EQ(write_count(), 1);
+ second.source_info().Update(first.source_info());
+ CHECK_EQ(last_written(), second);
+}
+
+} // namespace interpreter
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/interpreter/bytecode-pipeline-unittest.cc b/test/unittests/interpreter/bytecode-pipeline-unittest.cc
new file mode 100644
index 0000000..f12391c
--- /dev/null
+++ b/test/unittests/interpreter/bytecode-pipeline-unittest.cc
@@ -0,0 +1,198 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#include "src/interpreter/bytecode-pipeline.h"
+#include "src/interpreter/bytecode-register-allocator.h"
+#include "src/isolate.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace interpreter {
+
+using BytecodeNodeTest = TestWithIsolateAndZone;
+
+TEST(BytecodeSourceInfo, Operations) {
+ BytecodeSourceInfo x(0, true);
+ CHECK_EQ(x.source_position(), 0);
+ CHECK_EQ(x.is_statement(), true);
+ CHECK_EQ(x.is_valid(), true);
+ x.set_invalid();
+ CHECK_EQ(x.is_statement(), false);
+ CHECK_EQ(x.is_valid(), false);
+
+ x.Update({1, true});
+ BytecodeSourceInfo y(1, true);
+ CHECK(x == y);
+ CHECK(!(x != y));
+
+ x.set_invalid();
+ CHECK(!(x == y));
+ CHECK(x != y);
+
+ y.Update({2, false});
+ CHECK_EQ(y.source_position(), 1);
+ CHECK_EQ(y.is_statement(), true);
+
+ y.Update({2, true});
+ CHECK_EQ(y.source_position(), 2);
+ CHECK_EQ(y.is_statement(), true);
+
+ y.set_invalid();
+ y.Update({3, false});
+ CHECK_EQ(y.source_position(), 3);
+ CHECK_EQ(y.is_statement(), false);
+
+ y.Update({3, true});
+ CHECK_EQ(y.source_position(), 3);
+ CHECK_EQ(y.is_statement(), true);
+}
+
+TEST_F(BytecodeNodeTest, Constructor0) {
+ BytecodeNode node;
+ CHECK_EQ(node.bytecode(), Bytecode::kIllegal);
+ CHECK(!node.source_info().is_valid());
+}
+
+TEST_F(BytecodeNodeTest, Constructor1) {
+ BytecodeNode node(Bytecode::kLdaZero);
+ CHECK_EQ(node.bytecode(), Bytecode::kLdaZero);
+ CHECK_EQ(node.operand_count(), 0);
+ CHECK_EQ(node.operand_scale(), OperandScale::kSingle);
+ CHECK(!node.source_info().is_valid());
+ CHECK_EQ(node.Size(), 1);
+}
+
+TEST_F(BytecodeNodeTest, Constructor2) {
+ uint32_t operands[] = {0x11};
+ BytecodeNode node(Bytecode::kJumpIfTrue, operands[0], OperandScale::kDouble);
+ CHECK_EQ(node.bytecode(), Bytecode::kJumpIfTrue);
+ CHECK_EQ(node.operand_count(), 1);
+ CHECK_EQ(node.operand(0), operands[0]);
+ CHECK_EQ(node.operand_scale(), OperandScale::kDouble);
+ CHECK(!node.source_info().is_valid());
+ CHECK_EQ(node.Size(), 4);
+}
+
+TEST_F(BytecodeNodeTest, Constructor3) {
+ uint32_t operands[] = {0x11, 0x22};
+ BytecodeNode node(Bytecode::kLdaGlobal, operands[0], operands[1],
+ OperandScale::kQuadruple);
+ CHECK_EQ(node.bytecode(), Bytecode::kLdaGlobal);
+ CHECK_EQ(node.operand_count(), 2);
+ CHECK_EQ(node.operand(0), operands[0]);
+ CHECK_EQ(node.operand(1), operands[1]);
+ CHECK_EQ(node.operand_scale(), OperandScale::kQuadruple);
+ CHECK(!node.source_info().is_valid());
+ CHECK_EQ(node.Size(), 10);
+}
+
+TEST_F(BytecodeNodeTest, Constructor4) {
+ uint32_t operands[] = {0x11, 0x22, 0x33};
+ BytecodeNode node(Bytecode::kLoadIC, operands[0], operands[1], operands[2],
+ OperandScale::kSingle);
+ CHECK_EQ(node.operand_count(), 3);
+ CHECK_EQ(node.bytecode(), Bytecode::kLoadIC);
+ CHECK_EQ(node.operand(0), operands[0]);
+ CHECK_EQ(node.operand(1), operands[1]);
+ CHECK_EQ(node.operand(2), operands[2]);
+ CHECK_EQ(node.operand_scale(), OperandScale::kSingle);
+ CHECK(!node.source_info().is_valid());
+ CHECK_EQ(node.Size(), 4);
+}
+
+TEST_F(BytecodeNodeTest, Constructor5) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ CHECK_EQ(node.operand_count(), 4);
+ CHECK_EQ(node.bytecode(), Bytecode::kForInNext);
+ CHECK_EQ(node.operand(0), operands[0]);
+ CHECK_EQ(node.operand(1), operands[1]);
+ CHECK_EQ(node.operand(2), operands[2]);
+ CHECK_EQ(node.operand(3), operands[3]);
+ CHECK_EQ(node.operand_scale(), OperandScale::kDouble);
+ CHECK(!node.source_info().is_valid());
+ CHECK_EQ(node.Size(), 10);
+}
+
+TEST_F(BytecodeNodeTest, Equality) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ CHECK_EQ(node, node);
+ BytecodeNode other(Bytecode::kForInNext, operands[0], operands[1],
+ operands[2], operands[3], OperandScale::kDouble);
+ CHECK_EQ(node, other);
+}
+
+TEST_F(BytecodeNodeTest, EqualityWithSourceInfo) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ node.source_info().Update({3, true});
+ CHECK_EQ(node, node);
+ BytecodeNode other(Bytecode::kForInNext, operands[0], operands[1],
+ operands[2], operands[3], OperandScale::kDouble);
+ other.source_info().Update({3, true});
+ CHECK_EQ(node, other);
+}
+
+TEST_F(BytecodeNodeTest, NoEqualityWithDifferentSourceInfo) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ node.source_info().Update({3, true});
+ BytecodeNode other(Bytecode::kForInNext, operands[0], operands[1],
+ operands[2], operands[3], OperandScale::kDouble);
+ CHECK_NE(node, other);
+}
+
+TEST_F(BytecodeNodeTest, Clone) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ BytecodeNode clone;
+ clone.Clone(&node);
+ CHECK_EQ(clone, node);
+}
+
+TEST_F(BytecodeNodeTest, SetBytecode0) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ BytecodeSourceInfo source_info(77, false);
+ node.source_info().Update(source_info);
+
+ BytecodeNode clone;
+ clone.Clone(&node);
+ clone.set_bytecode(Bytecode::kNop);
+ CHECK_EQ(clone.bytecode(), Bytecode::kNop);
+ CHECK_EQ(clone.operand_count(), 0);
+ CHECK_EQ(clone.operand_scale(), OperandScale::kSingle);
+ CHECK_EQ(clone.source_info(), source_info);
+}
+
+TEST_F(BytecodeNodeTest, SetBytecode1) {
+ uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+ BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
+ operands[3], OperandScale::kDouble);
+ BytecodeSourceInfo source_info(77, false);
+ node.source_info().Update(source_info);
+
+ BytecodeNode clone;
+ clone.Clone(&node);
+ clone.set_bytecode(Bytecode::kJump, 0x01aabbcc, OperandScale::kQuadruple);
+ CHECK_EQ(clone.bytecode(), Bytecode::kJump);
+ CHECK_EQ(clone.operand_count(), 1);
+ CHECK_EQ(clone.operand(0), 0x01aabbcc);
+ CHECK_EQ(clone.operand_scale(), OperandScale::kQuadruple);
+ CHECK_EQ(clone.source_info(), source_info);
+}
+
+} // namespace interpreter
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/interpreter/bytecode-utils.h b/test/unittests/interpreter/bytecode-utils.h
new file mode 100644
index 0000000..fffb719
--- /dev/null
+++ b/test/unittests/interpreter/bytecode-utils.h
@@ -0,0 +1,37 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_UNITTESTS_INTERPRETER_BYTECODE_UTILS_H_
+#define V8_UNITTESTS_INTERPRETER_BYTECODE_UTILS_H_
+
+#include "src/frames.h"
+
+#if V8_TARGET_LITTLE_ENDIAN
+
+#define EXTRACT(x, n) static_cast<uint8_t>((x) >> (8 * n))
+#define U16(i) EXTRACT(i, 0), EXTRACT(i, 1)
+#define U32(i) EXTRACT(i, 0), EXTRACT(i, 1), EXTRACT(i, 2), EXTRACT(i, 3)
+
+#elif V8_TARGET_BIG_ENDIAN
+
+#define EXTRACT(x, n) static_cast<uint8_t>((x) >> (8 * n))
+
+#define U16(i) EXTRACT(i, 1), EXTRACT(i, 0)
+#define U32(i) EXTRACT(i, 3), EXTRACT(i, 2), EXTRACT(i, 1), EXTRACT(i, 0)
+
+#else
+
+#error "Unknown Architecture"
+
+#endif
+
+#define U8(i) static_cast<uint8_t>(i)
+#define B(Name) static_cast<uint8_t>(Bytecode::k##Name)
+#define REG_OPERAND(i) \
+ (InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize - (i))
+#define R8(i) static_cast<uint8_t>(REG_OPERAND(i))
+#define R16(i) U16(REG_OPERAND(i))
+#define R32(i) U32(REG_OPERAND(i))
+
+#endif // V8_UNITTESTS_INTERPRETER_BYTECODE_UTILS_H_
diff --git a/test/unittests/interpreter/bytecodes-unittest.cc b/test/unittests/interpreter/bytecodes-unittest.cc
index b3554c3..eebacb2 100644
--- a/test/unittests/interpreter/bytecodes-unittest.cc
+++ b/test/unittests/interpreter/bytecodes-unittest.cc
@@ -7,6 +7,7 @@
#include "src/v8.h"
#include "src/interpreter/bytecodes.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
#include "test/unittests/test-utils.h"
namespace v8 {
@@ -31,15 +32,6 @@
Register reg2 = Register::FromOperand(operand2);
CHECK_EQ(i, reg2.index());
}
-
- for (int i = 0; i <= kMaxUInt8; i++) {
- Register reg = Register::FromOperand(i);
- if (i > 0) {
- CHECK(reg.is_parameter());
- } else {
- CHECK(!reg.is_parameter());
- }
- }
}
TEST(OperandConversion, Parameters) {
@@ -85,9 +77,13 @@
}
TEST(OperandScaling, ScalableAndNonScalable) {
- for (OperandScale operand_scale = OperandScale::kSingle;
- operand_scale <= OperandScale::kMaxValid;
- operand_scale = Bytecodes::NextOperandScale(operand_scale)) {
+ const OperandScale kOperandScales[] = {
+#define VALUE(Name, _) OperandScale::k##Name,
+ OPERAND_SCALE_LIST(VALUE)
+#undef VALUE
+ };
+
+ for (OperandScale operand_scale : kOperandScales) {
int scale = static_cast<int>(operand_scale);
CHECK_EQ(Bytecodes::Size(Bytecode::kCallRuntime, operand_scale),
1 + 2 + 2 * scale);
@@ -185,23 +181,22 @@
const char* output;
};
-#define B(Name) static_cast<uint8_t>(Bytecode::k##Name)
const BytecodesAndResult cases[] = {
- {{B(LdaSmi), 0x01}, 2, 0, " LdaSmi [1]"},
- {{B(Wide), B(LdaSmi), 0xe8, 0x03}, 4, 0, " LdaSmi.Wide [1000]"},
- {{B(ExtraWide), B(LdaSmi), 0xa0, 0x86, 0x01, 0x00},
+ {{B(LdaSmi), U8(1)}, 2, 0, " LdaSmi [1]"},
+ {{B(Wide), B(LdaSmi), U16(1000)}, 4, 0, " LdaSmi.Wide [1000]"},
+ {{B(ExtraWide), B(LdaSmi), U32(100000)},
6,
0,
"LdaSmi.ExtraWide [100000]"},
- {{B(LdaSmi), 0xff}, 2, 0, " LdaSmi [-1]"},
- {{B(Wide), B(LdaSmi), 0x18, 0xfc}, 4, 0, " LdaSmi.Wide [-1000]"},
- {{B(ExtraWide), B(LdaSmi), 0x60, 0x79, 0xfe, 0xff},
+ {{B(LdaSmi), U8(-1)}, 2, 0, " LdaSmi [-1]"},
+ {{B(Wide), B(LdaSmi), U16(-1000)}, 4, 0, " LdaSmi.Wide [-1000]"},
+ {{B(ExtraWide), B(LdaSmi), U32(-100000)},
6,
0,
"LdaSmi.ExtraWide [-100000]"},
- {{B(Star), 0xfb}, 2, 0, " Star r5"},
- {{B(Wide), B(Star), 0x78, 0xff}, 4, 0, " Star.Wide r136"},
- {{B(Wide), B(Call), 0x7a, 0xff, 0x79, 0xff, 0x02, 0x00, 0xb1, 0x00},
+ {{B(Star), R8(5)}, 2, 0, " Star r5"},
+ {{B(Wide), B(Star), R16(136)}, 4, 0, " Star.Wide r136"},
+ {{B(Wide), B(Call), R16(134), R16(135), U16(2), U16(177)},
10,
0,
"Call.Wide r134, r135, #2, [177]"},
@@ -210,16 +205,15 @@
2,
3,
" Ldar a1"},
- {{B(Wide), B(CreateObjectLiteral), 0x01, 0x02, 0x03, 0x04, 0xa5},
+ {{B(Wide), B(CreateObjectLiteral), U16(513), U16(1027), U8(165)},
7,
0,
"CreateObjectLiteral.Wide [513], [1027], #165"},
- {{B(ExtraWide), B(JumpIfNull), 0x15, 0xcd, 0x5b, 0x07},
+ {{B(ExtraWide), B(JumpIfNull), U32(123456789)},
6,
0,
"JumpIfNull.ExtraWide [123456789]"},
};
-#undef B
for (size_t i = 0; i < arraysize(cases); ++i) {
// Generate reference string by prepending formatted bytes.
@@ -260,13 +254,71 @@
}
}
-TEST(OperandScale, PrefixesScale) {
- CHECK(Bytecodes::NextOperandScale(OperandScale::kSingle) ==
- OperandScale::kDouble);
- CHECK(Bytecodes::NextOperandScale(OperandScale::kDouble) ==
- OperandScale::kQuadruple);
- CHECK(Bytecodes::NextOperandScale(OperandScale::kQuadruple) ==
- OperandScale::kInvalid);
+TEST(Bytecodes, OperandScales) {
+ CHECK_EQ(Bytecodes::OperandSizesToScale(OperandSize::kByte),
+ OperandScale::kSingle);
+ CHECK_EQ(Bytecodes::OperandSizesToScale(OperandSize::kShort),
+ OperandScale::kDouble);
+ CHECK_EQ(Bytecodes::OperandSizesToScale(OperandSize::kQuad),
+ OperandScale::kQuadruple);
+ CHECK_EQ(
+ Bytecodes::OperandSizesToScale(OperandSize::kShort, OperandSize::kShort,
+ OperandSize::kShort, OperandSize::kShort),
+ OperandScale::kDouble);
+ CHECK_EQ(
+ Bytecodes::OperandSizesToScale(OperandSize::kQuad, OperandSize::kShort,
+ OperandSize::kShort, OperandSize::kShort),
+ OperandScale::kQuadruple);
+ CHECK_EQ(
+ Bytecodes::OperandSizesToScale(OperandSize::kShort, OperandSize::kQuad,
+ OperandSize::kShort, OperandSize::kShort),
+ OperandScale::kQuadruple);
+ CHECK_EQ(
+ Bytecodes::OperandSizesToScale(OperandSize::kShort, OperandSize::kShort,
+ OperandSize::kQuad, OperandSize::kShort),
+ OperandScale::kQuadruple);
+ CHECK_EQ(
+ Bytecodes::OperandSizesToScale(OperandSize::kShort, OperandSize::kShort,
+ OperandSize::kShort, OperandSize::kQuad),
+ OperandScale::kQuadruple);
+}
+
+TEST(Bytecodes, SizesForSignedOperands) {
+ CHECK(Bytecodes::SizeForSignedOperand(0) == OperandSize::kByte);
+ CHECK(Bytecodes::SizeForSignedOperand(kMaxInt8) == OperandSize::kByte);
+ CHECK(Bytecodes::SizeForSignedOperand(kMinInt8) == OperandSize::kByte);
+ CHECK(Bytecodes::SizeForSignedOperand(kMaxInt8 + 1) == OperandSize::kShort);
+ CHECK(Bytecodes::SizeForSignedOperand(kMinInt8 - 1) == OperandSize::kShort);
+ CHECK(Bytecodes::SizeForSignedOperand(kMaxInt16) == OperandSize::kShort);
+ CHECK(Bytecodes::SizeForSignedOperand(kMinInt16) == OperandSize::kShort);
+ CHECK(Bytecodes::SizeForSignedOperand(kMaxInt16 + 1) == OperandSize::kQuad);
+ CHECK(Bytecodes::SizeForSignedOperand(kMinInt16 - 1) == OperandSize::kQuad);
+ CHECK(Bytecodes::SizeForSignedOperand(kMaxInt) == OperandSize::kQuad);
+ CHECK(Bytecodes::SizeForSignedOperand(kMinInt) == OperandSize::kQuad);
+}
+
+TEST(Bytecodes, SizesForUnsignedOperands) {
+ // int overloads
+ CHECK(Bytecodes::SizeForUnsignedOperand(0) == OperandSize::kByte);
+ CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt8) == OperandSize::kByte);
+ CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt8 + 1) ==
+ OperandSize::kShort);
+ CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt16) == OperandSize::kShort);
+ CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt16 + 1) ==
+ OperandSize::kQuad);
+ // size_t overloads
+ CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(0)) ==
+ OperandSize::kByte);
+ CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8)) ==
+ OperandSize::kByte);
+ CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8 + 1)) ==
+ OperandSize::kShort);
+ CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt16)) ==
+ OperandSize::kShort);
+ CHECK(Bytecodes::SizeForUnsignedOperand(
+ static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad);
+ CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt32)) ==
+ OperandSize::kQuad);
}
TEST(OperandScale, PrefixesRequired) {
diff --git a/test/unittests/interpreter/interpreter-assembler-unittest.cc b/test/unittests/interpreter/interpreter-assembler-unittest.cc
index 0106c57..cd21f09 100644
--- a/test/unittests/interpreter/interpreter-assembler-unittest.cc
+++ b/test/unittests/interpreter/interpreter-assembler-unittest.cc
@@ -313,12 +313,7 @@
TARGET_TEST_F(InterpreterAssemblerTest, Dispatch) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
- m.Dispatch();
- Graph* graph = m.graph();
-
- Node* end = graph->end();
- EXPECT_EQ(1, end->InputCount());
- Node* tail_call_node = end->InputAt(0);
+ Node* tail_call_node = m.Dispatch();
OperandScale operand_scale = OperandScale::kSingle;
Matcher<Node*> next_bytecode_offset_matcher = IsIntPtrAdd(
@@ -342,12 +337,10 @@
IsTailCall(
_, code_target_matcher,
IsParameter(InterpreterDispatchDescriptor::kAccumulatorParameter),
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
next_bytecode_offset_matcher,
IsParameter(InterpreterDispatchDescriptor::kBytecodeArrayParameter),
IsParameter(InterpreterDispatchDescriptor::kDispatchTableParameter),
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
+ _, _));
}
}
@@ -359,11 +352,7 @@
TRACED_FOREACH(int, jump_offset, jump_offsets) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
- m.Jump(m.IntPtrConstant(jump_offset));
- Graph* graph = m.graph();
- Node* end = graph->end();
- EXPECT_EQ(1, end->InputCount());
- Node* tail_call_node = end->InputAt(0);
+ Node* tail_call_node = m.Jump(m.IntPtrConstant(jump_offset));
Matcher<Node*> next_bytecode_offset_matcher = IsIntPtrAdd(
IsParameter(InterpreterDispatchDescriptor::kBytecodeOffsetParameter),
@@ -385,100 +374,14 @@
IsTailCall(
_, code_target_matcher,
IsParameter(InterpreterDispatchDescriptor::kAccumulatorParameter),
- IsParameter(
- InterpreterDispatchDescriptor::kRegisterFileParameter),
next_bytecode_offset_matcher, _,
IsParameter(
InterpreterDispatchDescriptor::kDispatchTableParameter),
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
+ _, _));
}
}
}
-TARGET_TEST_F(InterpreterAssemblerTest, JumpIfWordEqual) {
- static const int kJumpIfTrueOffset = 73;
-
- // If debug code is enabled we emit extra code in Jump.
- if (FLAG_debug_code) return;
-
- MachineOperatorBuilder machine(zone());
-
- TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
- InterpreterAssemblerForTest m(this, bytecode);
- Node* lhs = m.IntPtrConstant(0);
- Node* rhs = m.IntPtrConstant(1);
- m.JumpIfWordEqual(lhs, rhs, m.IntPtrConstant(kJumpIfTrueOffset));
- Graph* graph = m.graph();
- Node* end = graph->end();
- EXPECT_EQ(2, end->InputCount());
-
- OperandScale operand_scale = OperandScale::kSingle;
- int jump_offsets[] = {kJumpIfTrueOffset, interpreter::Bytecodes::Size(
- bytecode, operand_scale)};
- for (int i = 0; i < static_cast<int>(arraysize(jump_offsets)); i++) {
- Matcher<Node*> next_bytecode_offset_matcher = IsIntPtrAdd(
- IsParameter(InterpreterDispatchDescriptor::kBytecodeOffsetParameter),
- IsIntPtrConstant(jump_offsets[i]));
- Matcher<Node*> target_bytecode_matcher =
- m.IsLoad(MachineType::Uint8(), _, next_bytecode_offset_matcher);
- if (kPointerSize == 8) {
- target_bytecode_matcher =
- IsChangeUint32ToUint64(target_bytecode_matcher);
- }
- Matcher<Node*> code_target_matcher = m.IsLoad(
- MachineType::Pointer(),
- IsParameter(InterpreterDispatchDescriptor::kDispatchTableParameter),
- IsWordShl(target_bytecode_matcher,
- IsIntPtrConstant(kPointerSizeLog2)));
- EXPECT_THAT(
- end->InputAt(i),
- IsTailCall(
- _, code_target_matcher,
- IsParameter(InterpreterDispatchDescriptor::kAccumulatorParameter),
- IsParameter(
- InterpreterDispatchDescriptor::kRegisterFileParameter),
- next_bytecode_offset_matcher, _,
- IsParameter(
- InterpreterDispatchDescriptor::kDispatchTableParameter),
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
- }
-
- // TODO(oth): test control flow paths.
- }
-}
-
-TARGET_TEST_F(InterpreterAssemblerTest, InterpreterReturn) {
- // If debug code is enabled we emit extra code in InterpreterReturn.
- if (FLAG_debug_code) return;
-
- TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
- InterpreterAssemblerForTest m(this, bytecode);
- m.InterpreterReturn();
- Graph* graph = m.graph();
-
- Node* end = graph->end();
- EXPECT_EQ(1, end->InputCount());
- Node* tail_call_node = end->InputAt(0);
-
- Handle<HeapObject> exit_trampoline =
- isolate()->builtins()->InterpreterExitTrampoline();
- EXPECT_THAT(
- tail_call_node,
- IsTailCall(
- _, IsHeapConstant(exit_trampoline),
- IsParameter(InterpreterDispatchDescriptor::kAccumulatorParameter),
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
- IsParameter(
- InterpreterDispatchDescriptor::kBytecodeOffsetParameter),
- _,
- IsParameter(InterpreterDispatchDescriptor::kDispatchTableParameter),
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
- }
-}
-
TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) {
static const OperandScale kOperandScales[] = {
OperandScale::kSingle, OperandScale::kDouble, OperandScale::kQuadruple};
@@ -555,24 +458,21 @@
EXPECT_THAT(m.GetAccumulator(), accumulator_value_2);
// Should be passed to next bytecode handler on dispatch.
- m.Dispatch();
- Graph* graph = m.graph();
-
- Node* end = graph->end();
- EXPECT_EQ(1, end->InputCount());
- Node* tail_call_node = end->InputAt(0);
+ Node* tail_call_node = m.Dispatch();
EXPECT_THAT(tail_call_node,
- IsTailCall(_, _, accumulator_value_2, _, _, _, _, _, _));
+ IsTailCall(_, _, accumulator_value_2, _, _, _, _));
}
}
-TARGET_TEST_F(InterpreterAssemblerTest, GetSetContext) {
+TARGET_TEST_F(InterpreterAssemblerTest, GetContext) {
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
- Node* context_node = m.Int32Constant(100);
- m.SetContext(context_node);
- EXPECT_THAT(m.GetContext(), context_node);
+ EXPECT_THAT(
+ m.GetContext(),
+ m.IsLoad(MachineType::AnyTagged(), IsLoadParentFramePointer(),
+ IsIntPtrConstant(Register::current_context().ToOperand()
+ << kPointerSizeLog2)));
}
}
@@ -581,11 +481,10 @@
InterpreterAssemblerForTest m(this, bytecode);
Node* reg_index_node = m.IntPtrConstant(44);
Node* reg_location_node = m.RegisterLocation(reg_index_node);
- EXPECT_THAT(
- reg_location_node,
- IsIntPtrAdd(
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
- IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2))));
+ EXPECT_THAT(reg_location_node,
+ IsIntPtrAdd(IsLoadParentFramePointer(),
+ IsWordShl(reg_index_node,
+ IsIntPtrConstant(kPointerSizeLog2))));
}
}
@@ -594,12 +493,10 @@
InterpreterAssemblerForTest m(this, bytecode);
Node* reg_index_node = m.IntPtrConstant(44);
Node* load_reg_node = m.LoadRegister(reg_index_node);
- EXPECT_THAT(
- load_reg_node,
- m.IsLoad(
- MachineType::AnyTagged(),
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
- IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2))));
+ EXPECT_THAT(load_reg_node,
+ m.IsLoad(MachineType::AnyTagged(), IsLoadParentFramePointer(),
+ IsWordShl(reg_index_node,
+ IsIntPtrConstant(kPointerSizeLog2))));
}
}
@@ -611,12 +508,11 @@
Node* store_reg_node = m.StoreRegister(store_value, reg_index_node);
EXPECT_THAT(
store_reg_node,
- m.IsStore(
- StoreRepresentation(MachineRepresentation::kTagged,
- kNoWriteBarrier),
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
- IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2)),
- store_value));
+ m.IsStore(StoreRepresentation(MachineRepresentation::kTagged,
+ kNoWriteBarrier),
+ IsLoadParentFramePointer(),
+ IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2)),
+ store_value));
}
}
@@ -624,9 +520,9 @@
TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
InterpreterAssemblerForTest m(this, bytecode);
Node* value = m.Int32Constant(44);
- EXPECT_THAT(
- m.SmiTag(value),
- IsWordShl(value, IsIntPtrConstant(kSmiShiftSize + kSmiTagSize)));
+ EXPECT_THAT(m.SmiTag(value),
+ IsIntPtrConstant(static_cast<intptr_t>(44)
+ << (kSmiShiftSize + kSmiTagSize)));
EXPECT_THAT(
m.SmiUntag(value),
IsWordSar(value, IsIntPtrConstant(kSmiShiftSize + kSmiTagSize)));
@@ -730,14 +626,10 @@
InterpreterAssemblerForTest m(this, bytecode);
Node* arg1 = m.Int32Constant(2);
Node* arg2 = m.Int32Constant(3);
- Node* context =
- m.Parameter(InterpreterDispatchDescriptor::kContextParameter);
+ Node* context = m.Int32Constant(4);
Node* call_runtime = m.CallRuntime(Runtime::kAdd, context, arg1, arg2);
- EXPECT_THAT(
- call_runtime,
- IsCall(_, _, arg1, arg2, _, IsInt32Constant(2),
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
+ EXPECT_THAT(call_runtime,
+ IsCall(_, _, arg1, arg2, _, IsInt32Constant(2), context, _, _));
}
}
@@ -751,8 +643,7 @@
Node* function_id = m.Int32Constant(0);
Node* first_arg = m.Int32Constant(1);
Node* arg_count = m.Int32Constant(2);
- Node* context =
- m.Parameter(InterpreterDispatchDescriptor::kContextParameter);
+ Node* context = m.Int32Constant(4);
Matcher<Node*> function_table = IsExternalConstant(
ExternalReference::runtime_function_table_address(isolate()));
@@ -765,12 +656,9 @@
Node* call_runtime = m.CallRuntimeN(function_id, context, first_arg,
arg_count, result_size);
- EXPECT_THAT(
- call_runtime,
- IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg,
- function_entry,
- IsParameter(InterpreterDispatchDescriptor::kContextParameter),
- _, _));
+ EXPECT_THAT(call_runtime,
+ IsCall(_, IsHeapConstant(builtin.code()), arg_count,
+ first_arg, function_entry, context, _, _));
}
}
}
@@ -786,16 +674,11 @@
Node* function = m.Int32Constant(0);
Node* first_arg = m.Int32Constant(1);
Node* arg_count = m.Int32Constant(2);
- Node* context =
- m.Parameter(InterpreterDispatchDescriptor::kContextParameter);
+ Node* context = m.Int32Constant(3);
Node* call_js =
m.CallJS(function, context, first_arg, arg_count, tail_call_mode);
- EXPECT_THAT(
- call_js,
- IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg,
- function,
- IsParameter(InterpreterDispatchDescriptor::kContextParameter),
- _, _));
+ EXPECT_THAT(call_js, IsCall(_, IsHeapConstant(builtin.code()), arg_count,
+ first_arg, function, context, _, _));
}
}
}
@@ -805,11 +688,10 @@
InterpreterAssemblerForTest m(this, bytecode);
Node* feedback_vector = m.LoadTypeFeedbackVector();
- Matcher<Node*> load_function_matcher = m.IsLoad(
- MachineType::AnyTagged(),
- IsParameter(InterpreterDispatchDescriptor::kRegisterFileParameter),
- IsIntPtrConstant(
- InterpreterFrameConstants::kFunctionFromRegisterPointer));
+ Matcher<Node*> load_function_matcher =
+ m.IsLoad(MachineType::AnyTagged(), IsLoadParentFramePointer(),
+ IsIntPtrConstant(Register::function_closure().ToOperand()
+ << kPointerSizeLog2));
Matcher<Node*> load_shared_function_info_matcher =
m.IsLoad(MachineType::AnyTagged(), load_function_matcher,
IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset -
diff --git a/test/unittests/interpreter/source-position-table-unittest.cc b/test/unittests/interpreter/source-position-table-unittest.cc
index d62302a..230e57d 100644
--- a/test/unittests/interpreter/source-position-table-unittest.cc
+++ b/test/unittests/interpreter/source-position-table-unittest.cc
@@ -25,7 +25,7 @@
TEST_F(SourcePositionTableTest, EncodeStatement) {
SourcePositionTableBuilder builder(isolate(), zone());
for (int i = 0; i < arraysize(offsets); i++) {
- builder.AddStatementPosition(offsets[i], offsets[i]);
+ builder.AddPosition(offsets[i], offsets[i], true);
}
// To test correctness, we rely on the assertions in ToSourcePositionTable().
@@ -36,8 +36,8 @@
TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
SourcePositionTableBuilder builder(isolate(), zone());
for (int i = 0; i < arraysize(offsets); i++) {
- builder.AddStatementPosition(offsets[i], offsets[i]);
- builder.AddStatementPosition(offsets[i], offsets[i] + 1);
+ builder.AddPosition(offsets[i], offsets[i], true);
+ builder.AddPosition(offsets[i], offsets[i] + 1, true);
}
// To test correctness, we rely on the assertions in ToSourcePositionTable().
@@ -48,7 +48,7 @@
TEST_F(SourcePositionTableTest, EncodeExpression) {
SourcePositionTableBuilder builder(isolate(), zone());
for (int i = 0; i < arraysize(offsets); i++) {
- builder.AddExpressionPosition(offsets[i], offsets[i]);
+ builder.AddPosition(offsets[i], offsets[i], false);
}
CHECK(!builder.ToSourcePositionTable().is_null());
}
@@ -60,9 +60,9 @@
for (int i = 0; i < arraysize(offsets); i++) {
accumulator += offsets[i];
if (i % 2) {
- builder.AddStatementPosition(accumulator, accumulator);
+ builder.AddPosition(accumulator, accumulator, true);
} else {
- builder.AddExpressionPosition(accumulator, accumulator);
+ builder.AddPosition(accumulator, accumulator, false);
}
}
@@ -70,9 +70,9 @@
for (int i = 0; i < arraysize(offsets); i++) {
accumulator -= offsets[i];
if (i % 2) {
- builder.AddStatementPosition(accumulator, accumulator);
+ builder.AddPosition(accumulator, accumulator, true);
} else {
- builder.AddExpressionPosition(accumulator, accumulator);
+ builder.AddPosition(accumulator, accumulator, false);
}
}
diff --git a/test/unittests/unittests.gyp b/test/unittests/unittests.gyp
index 003281b..e16ebeb 100644
--- a/test/unittests/unittests.gyp
+++ b/test/unittests/unittests.gyp
@@ -6,7 +6,7 @@
'variables': {
'v8_code': 1,
},
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
+ 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'unittests',
@@ -17,13 +17,13 @@
'dependencies': [
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
- '../../tools/gyp/v8.gyp:v8_libplatform',
+ '../../src/v8.gyp:v8_libplatform',
],
'include_dirs': [
'../..',
],
'sources': [ ### gcmole(all) ###
- 'atomic-utils-unittest.cc',
+ 'base/atomic-utils-unittest.cc',
'base/bits-unittest.cc',
'base/cpu-unittest.cc',
'base/division-by-constant-unittest.cc',
@@ -41,7 +41,6 @@
'cancelable-tasks-unittest.cc',
'char-predicates-unittest.cc',
'compiler/branch-elimination-unittest.cc',
- 'compiler/change-lowering-unittest.cc',
'compiler/coalesced-live-ranges-unittest.cc',
'compiler/common-operator-reducer-unittest.cc',
'compiler/common-operator-unittest.cc',
@@ -50,6 +49,7 @@
'compiler/control-flow-optimizer-unittest.cc',
'compiler/dead-code-elimination-unittest.cc',
'compiler/diamond-unittest.cc',
+ 'compiler/effect-control-linearizer-unittest.cc',
'compiler/escape-analysis-unittest.cc',
'compiler/graph-reducer-unittest.cc',
'compiler/graph-reducer-unittest.h',
@@ -96,7 +96,10 @@
'interpreter/bytecodes-unittest.cc',
'interpreter/bytecode-array-builder-unittest.cc',
'interpreter/bytecode-array-iterator-unittest.cc',
+ 'interpreter/bytecode-array-writer-unittest.cc',
+ 'interpreter/bytecode-peephole-optimizer-unittest.cc',
'interpreter/bytecode-register-allocator-unittest.cc',
+ 'interpreter/bytecode-pipeline-unittest.cc',
'interpreter/constant-array-builder-unittest.cc',
'interpreter/interpreter-assembler-unittest.cc',
'interpreter/interpreter-assembler-unittest.h',
@@ -118,8 +121,10 @@
'wasm/ast-decoder-unittest.cc',
'wasm/decoder-unittest.cc',
'wasm/encoder-unittest.cc',
+ 'wasm/leb-helper-unittest.cc',
'wasm/loop-assignment-analysis-unittest.cc',
'wasm/module-decoder-unittest.cc',
+ 'wasm/switch-logic-unittest.cc',
'wasm/wasm-macro-gen-unittest.cc',
],
'conditions': [
@@ -138,11 +143,21 @@
'compiler/ia32/instruction-selector-ia32-unittest.cc',
],
}],
+ ['v8_target_arch=="mips"', {
+ 'sources': [ ### gcmole(arch:mips) ###
+ 'compiler/mips/instruction-selector-mips-unittest.cc',
+ ],
+ }],
['v8_target_arch=="mipsel"', {
'sources': [ ### gcmole(arch:mipsel) ###
'compiler/mips/instruction-selector-mips-unittest.cc',
],
}],
+ ['v8_target_arch=="mips64"', {
+ 'sources': [ ### gcmole(arch:mips64) ###
+ 'compiler/mips64/instruction-selector-mips64-unittest.cc',
+ ],
+ }],
['v8_target_arch=="mips64el"', {
'sources': [ ### gcmole(arch:mips64el) ###
'compiler/mips64/instruction-selector-mips64-unittest.cc',
@@ -169,9 +184,9 @@
['component=="shared_library"', {
# compiler-unittests can't be built against a shared library, so we
# need to depend on the underlying static target in that case.
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
+ 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
}, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
+ 'dependencies': ['../../src/v8.gyp:v8'],
}],
['os_posix == 1', {
# TODO(svenpanne): This is a temporary work-around to fix the warnings
@@ -198,7 +213,7 @@
'unittests',
],
'includes': [
- '../../build/isolate.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'unittests.isolate',
diff --git a/test/unittests/unittests.status b/test/unittests/unittests.status
index 40b5754..84fd087 100644
--- a/test/unittests/unittests.status
+++ b/test/unittests/unittests.status
@@ -11,6 +11,5 @@
'WasmDecoderTest.AllLoadMemCombinations': [SKIP],
'AstDecoderTest.AllLoadMemCombinations': [SKIP],
'AstDecoderTest.AllStoreMemCombinations': [SKIP],
- 'Bytecodes.DecodeBytecodeAndOperands': [SKIP],
}], # 'byteorder == big'
]
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc
index 0b1b79e..fe10115 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -18,9 +18,13 @@
namespace internal {
namespace wasm {
+#define B1(a) kExprBlock, a, kExprEnd
+#define B2(a, b) kExprBlock, a, b, kExprEnd
+#define B3(a, b, c) kExprBlock, a, b, c, kExprEnd
+
static const byte kCodeGetLocal0[] = {kExprGetLocal, 0};
static const byte kCodeGetLocal1[] = {kExprGetLocal, 1};
-static const byte kCodeSetLocal0[] = {kExprSetLocal, 0, kExprI8Const, 0};
+static const byte kCodeSetLocal0[] = {WASM_SET_LOCAL(0, WASM_ZERO)};
static const LocalType kLocalTypes[] = {kAstI32, kAstI64, kAstF32, kAstF64};
static const MachineType machineTypes[] = {
@@ -36,7 +40,7 @@
kExprI32LeS, kExprI32LtU, kExprI32LeU};
#define WASM_BRV_IF_ZERO(depth, val) \
- kExprBrIf, static_cast<byte>(depth), val, WASM_ZERO
+ val, WASM_ZERO, kExprBrIf, ARITY_1, static_cast<byte>(depth)
#define EXPECT_VERIFIES(env, x) Verify(kSuccess, env, x, x + arraysize(x))
@@ -48,7 +52,6 @@
Verify(kSuccess, env, code, code + arraysize(code)); \
} while (false)
-
#define EXPECT_FAILURE_INLINE(env, ...) \
do { \
static byte code[] = {__VA_ARGS__}; \
@@ -65,7 +68,8 @@
public:
typedef std::pair<uint32_t, LocalType> LocalsDecl;
- AstDecoderTest() : module(nullptr) {}
+ AstDecoderTest() : module(nullptr), local_decls(zone()) {}
+
TestSignatures sigs;
ModuleEnv* module;
LocalDeclEncoder local_decls;
@@ -74,7 +78,7 @@
local_decls.AddLocals(count, type);
}
- // Preprends local variable declarations and renders nice error messages for
+ // Prepends local variable declarations and renders nice error messages for
// verification failures.
void Verify(ErrorCode expected, FunctionSig* sig, const byte* start,
const byte* end) {
@@ -107,8 +111,7 @@
void TestBinop(WasmOpcode opcode, FunctionSig* success) {
// op(local[0], local[1])
- byte code[] = {static_cast<byte>(opcode), kExprGetLocal, 0, kExprGetLocal,
- 1};
+ byte code[] = {WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
EXPECT_VERIFIES(success, code);
// Try all combinations of return and parameter types.
@@ -134,7 +137,7 @@
void TestUnop(WasmOpcode opcode, LocalType ret_type, LocalType param_type) {
// Return(op(local[0]))
- byte code[] = {static_cast<byte>(opcode), kExprGetLocal, 0};
+ byte code[] = {WASM_UNOP(opcode, WASM_GET_LOCAL(0))};
{
LocalType types[] = {ret_type, param_type};
FunctionSig sig(1, 1, types);
@@ -155,7 +158,6 @@
}
};
-
TEST_F(AstDecoderTest, Int8Const) {
byte code[] = {kExprI8Const, 0};
for (int i = -128; i < 128; i++) {
@@ -176,12 +178,6 @@
EXPECT_FAILURE(sigs.i_i(), code);
}
-TEST_F(AstDecoderTest, IncompleteIf2) {
- byte code[] = {kExprIf, kExprI8Const, 0};
- EXPECT_FAILURE(sigs.v_v(), code);
- EXPECT_FAILURE(sigs.i_i(), code);
-}
-
TEST_F(AstDecoderTest, Int8Const_fallthru) {
byte code[] = {kExprI8Const, 0, kExprI8Const, 1};
EXPECT_VERIFIES(sigs.i_i(), code);
@@ -303,199 +299,294 @@
EXPECT_FAILURE(sigs.i_i(), code1);
}
- byte code3[] = {0, kExprGetLocal, 0}; // [opcode] [expr]
+ byte code3[] = {kExprGetLocal, 0, 0}; // [expr] [opcode]
for (size_t i = 0; i < arraysize(kInt32BinopOpcodes); i++) {
- code3[0] = kInt32BinopOpcodes[i];
+ code3[2] = kInt32BinopOpcodes[i];
EXPECT_FAILURE(sigs.i_i(), code3);
}
- byte code4[] = {0, kExprGetLocal, 0, 0}; // [opcode] [expr] [opcode]
+ byte code4[] = {kExprGetLocal, 0, 0, 0}; // [expr] [opcode] [opcode]
for (size_t i = 0; i < arraysize(kInt32BinopOpcodes); i++) {
- code4[0] = kInt32BinopOpcodes[i];
+ code4[2] = kInt32BinopOpcodes[i];
code4[3] = kInt32BinopOpcodes[i];
EXPECT_FAILURE(sigs.i_i(), code4);
}
}
+TEST_F(AstDecoderTest, BinopsAcrossBlock1) {
+ static const byte code[] = {WASM_ZERO, kExprBlock, WASM_ZERO, kExprI32Add,
+ kExprEnd};
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
-//===================================================================
-//== Statements
-//===================================================================
+TEST_F(AstDecoderTest, BinopsAcrossBlock2) {
+ static const byte code[] = {WASM_ZERO, WASM_ZERO, kExprBlock, kExprI32Add,
+ kExprEnd};
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, BinopsAcrossBlock3) {
+ static const byte code[] = {WASM_ZERO, WASM_ZERO, kExprIf, kExprI32Add,
+ kExprElse, kExprI32Add, kExprEnd};
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
TEST_F(AstDecoderTest, Nop) {
static const byte code[] = {kExprNop};
EXPECT_VERIFIES(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, SetLocal0_param) {
- static const byte code[] = {kExprSetLocal, 0, kExprI8Const, 0};
- EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_VERIFIES(sigs.i_i(), kCodeSetLocal0);
+ EXPECT_FAILURE(sigs.f_ff(), kCodeSetLocal0);
+ EXPECT_FAILURE(sigs.d_dd(), kCodeSetLocal0);
}
TEST_F(AstDecoderTest, SetLocal0_local) {
- byte code[] = {kExprSetLocal, 0, kExprI8Const, 0};
+ EXPECT_FAILURE(sigs.i_v(), kCodeSetLocal0);
AddLocals(kAstI32, 1);
- EXPECT_VERIFIES(sigs.i_v(), code);
+ EXPECT_VERIFIES(sigs.i_v(), kCodeSetLocal0);
}
TEST_F(AstDecoderTest, SetLocalN_local) {
for (byte i = 1; i < 8; i++) {
AddLocals(kAstI32, 1);
for (byte j = 0; j < i; j++) {
- byte code[] = {kExprSetLocal, j, kExprI8Const, i};
- EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_SET_LOCAL(j, WASM_I8(i)));
}
}
}
+TEST_F(AstDecoderTest, BlockN) {
+ const int kMaxSize = 200;
+ byte buffer[kMaxSize + 2];
+
+ for (int i = 0; i <= kMaxSize; i++) {
+ memset(buffer, kExprNop, sizeof(buffer));
+ buffer[0] = kExprBlock;
+ buffer[i + 1] = kExprEnd;
+ Verify(kSuccess, sigs.v_i(), buffer, buffer + i + 2);
+ }
+}
+
TEST_F(AstDecoderTest, Block0) {
- static const byte code[] = {kExprBlock, 0};
+ static const byte code[] = {kExprBlock, kExprEnd};
EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
}
TEST_F(AstDecoderTest, Block0_fallthru1) {
- static const byte code[] = {kExprBlock, 0, kExprBlock, 0};
+ static const byte code[] = {kExprBlock, kExprBlock, kExprEnd, kExprEnd};
EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, Block0Block0) {
+ static const byte code[] = {kExprBlock, kExprEnd, kExprBlock, kExprEnd};
+ EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, Block0_end_end) {
+ static const byte code[] = {kExprBlock, kExprEnd, kExprEnd};
+ EXPECT_FAILURE(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, Block1) {
- static const byte code[] = {kExprBlock, 1, kExprSetLocal, 0, kExprI8Const, 0};
+ byte code[] = {B1(WASM_SET_LOCAL(0, WASM_ZERO))};
EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_FAILURE(sigs.d_dd(), code);
}
-TEST_F(AstDecoderTest, Block0_fallthru2) {
- static const byte code[] = {kExprBlock, 0, kExprSetLocal, 0, kExprI8Const, 0};
+TEST_F(AstDecoderTest, Block1_i) {
+ byte code[] = {B1(WASM_ZERO)};
EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_FAILURE(sigs.f_ff(), code);
+ EXPECT_FAILURE(sigs.d_dd(), code);
+ EXPECT_FAILURE(sigs.l_ll(), code);
}
-TEST_F(AstDecoderTest, Block2) {
- static const byte code[] = {kExprBlock, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprSetLocal, 0, kExprI8Const, 0}; // --
- EXPECT_VERIFIES(sigs.i_i(), code);
-}
-
-TEST_F(AstDecoderTest, Block2_fallthru) {
- static const byte code[] = {kExprBlock, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprI8Const, 11}; // --
- EXPECT_VERIFIES(sigs.i_i(), code);
-}
-
-TEST_F(AstDecoderTest, BlockN) {
- byte block[] = {kExprBlock, 2};
-
- for (size_t i = 0; i < 10; i++) {
- size_t total = sizeof(block) + sizeof(kCodeSetLocal0) * i;
- byte* code = reinterpret_cast<byte*>(malloc(total));
- memcpy(code, block, sizeof(block));
- code[1] = static_cast<byte>(i);
- for (size_t j = 0; j < i; j++) {
- memcpy(code + sizeof(block) + j * sizeof(kCodeSetLocal0), kCodeSetLocal0,
- sizeof(kCodeSetLocal0));
- }
- Verify(kSuccess, sigs.v_i(), code, code + total);
- free(code);
- }
-}
-
-TEST_F(AstDecoderTest, BlockN_off_end) {
- for (byte i = 2; i < 10; i++) {
- byte code[] = {kExprBlock, i, kExprNop};
- EXPECT_FAILURE(sigs.v_v(), code);
- }
-}
-
-TEST_F(AstDecoderTest, Block1_break) {
- static const byte code[] = {kExprBlock, 1, kExprBr, 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_v(), code);
-}
-
-TEST_F(AstDecoderTest, Block2_break) {
- static const byte code[] = {kExprBlock, 2, kExprNop, kExprBr, 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_v(), code);
+TEST_F(AstDecoderTest, Block1_f) {
+ byte code[] = {B1(WASM_F32(0))};
+ EXPECT_FAILURE(sigs.i_i(), code);
+ EXPECT_VERIFIES(sigs.f_ff(), code);
+ EXPECT_FAILURE(sigs.d_dd(), code);
+ EXPECT_FAILURE(sigs.l_ll(), code);
}
TEST_F(AstDecoderTest, Block1_continue) {
- static const byte code[] = {kExprBlock, 1, kExprBr, 1, kExprNop};
- EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B1(WASM_BR(0)));
+ EXPECT_FAILURE_INLINE(sigs.v_v(), B1(WASM_BR(1)));
+ EXPECT_FAILURE_INLINE(sigs.v_v(), B1(WASM_BR(2)));
+ EXPECT_FAILURE_INLINE(sigs.v_v(), B1(WASM_BR(3)));
}
-TEST_F(AstDecoderTest, Block2_continue) {
- static const byte code[] = {kExprBlock, 2, kExprNop, kExprBr, 1, kExprNop};
- EXPECT_FAILURE(sigs.v_v(), code);
+TEST_F(AstDecoderTest, Block1_br) {
+ EXPECT_FAILURE_INLINE(sigs.v_v(), kExprBlock, kExprBr, ARITY_1, DEPTH_0,
+ kExprEnd);
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), kExprBlock, kExprBr, ARITY_0, DEPTH_0,
+ kExprEnd);
}
-TEST_F(AstDecoderTest, ExprBlock0) {
- static const byte code[] = {kExprBlock, 0};
- EXPECT_VERIFIES(sigs.v_v(), code);
+TEST_F(AstDecoderTest, Block2_br) {
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B2(WASM_NOP, WASM_BR(0)));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B2(WASM_BR(0), WASM_NOP));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B2(WASM_BR(0), WASM_BR(0)));
}
-TEST_F(AstDecoderTest, ExprBlock1a) {
- static const byte code[] = {kExprBlock, 1, kExprI8Const, 0};
+TEST_F(AstDecoderTest, Block2) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ B2(WASM_NOP, WASM_SET_LOCAL(0, WASM_ZERO)));
+ EXPECT_FAILURE_INLINE(sigs.i_i(), B2(WASM_SET_LOCAL(0, WASM_ZERO), WASM_NOP));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), B2(WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_ZERO)));
+}
+
+TEST_F(AstDecoderTest, Block2b) {
+ byte code[] = {B2(WASM_SET_LOCAL(0, WASM_ZERO), WASM_ZERO)};
EXPECT_VERIFIES(sigs.i_i(), code);
-}
-
-TEST_F(AstDecoderTest, ExprBlock1b) {
- static const byte code[] = {kExprBlock, 1, kExprI8Const, 0};
+ EXPECT_FAILURE(sigs.v_v(), code);
EXPECT_FAILURE(sigs.f_ff(), code);
}
-TEST_F(AstDecoderTest, ExprBlock1c) {
- static const byte code[] = {kExprBlock, 1, kExprF32Const, 0, 0, 0, 0};
+TEST_F(AstDecoderTest, Block2_fallthru) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), B2(WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_ZERO)),
+ WASM_I8(23));
+}
+
+TEST_F(AstDecoderTest, Block3) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.i_i(), B3(WASM_SET_LOCAL(0, WASM_ZERO), WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_I8(11)));
+}
+
+TEST_F(AstDecoderTest, Block5) {
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), B1(WASM_GET_LOCAL(0)));
+
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), B2(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), B3(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+
+ EXPECT_VERIFIES_INLINE(sigs.v_i(),
+ WASM_BLOCK(4, WASM_GET_LOCAL(0), WASM_GET_LOCAL(0),
+ WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(),
+ WASM_BLOCK(5, WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_GET_LOCAL(0),
+ WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+}
+
+TEST_F(AstDecoderTest, BlockF32) {
+ static const byte code[] = {kExprBlock, kExprF32Const, 0, 0, 0, 0, kExprEnd};
EXPECT_VERIFIES(sigs.f_ff(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+ EXPECT_FAILURE(sigs.d_dd(), code);
+}
+
+TEST_F(AstDecoderTest, BlockN_off_end) {
+ byte code[] = {kExprBlock, kExprNop, kExprNop, kExprNop, kExprNop, kExprEnd};
+ EXPECT_VERIFIES(sigs.v_v(), code);
+ for (size_t i = 1; i < arraysize(code); i++) {
+ Verify(kError, sigs.v_v(), code, code + i);
+ }
+}
+
+TEST_F(AstDecoderTest, Block2_continue) {
+ static const byte code[] = {kExprBlock, kExprBr, ARITY_0,
+ DEPTH_1, kExprNop, kExprEnd};
+ EXPECT_FAILURE(sigs.v_v(), code);
+}
+
+TEST_F(AstDecoderTest, NestedBlock_return) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), B1(B1(WASM_RETURN1(WASM_ZERO))));
+}
+
+TEST_F(AstDecoderTest, BlockBinop) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_I32_AND(B1(WASM_I8(1)), WASM_I8(2)));
+}
+
+TEST_F(AstDecoderTest, BlockBrBinop) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ WASM_I32_AND(B1(WASM_BRV(0, WASM_I8(1))), WASM_I8(2)));
+}
+
+TEST_F(AstDecoderTest, If_empty1) {
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_ZERO, kExprIf, kExprEnd);
+}
+
+TEST_F(AstDecoderTest, If_empty2) {
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_ZERO, kExprIf, kExprElse, kExprEnd);
+}
+
+TEST_F(AstDecoderTest, If_empty3) {
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_ZERO, kExprIf, WASM_ZERO, kExprElse,
+ kExprEnd);
+}
+
+TEST_F(AstDecoderTest, If_empty4) {
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_ZERO, kExprIf, kExprElse, WASM_ZERO,
+ kExprEnd);
+}
+
+TEST_F(AstDecoderTest, If_empty_stack) {
+ byte code[] = {kExprIf};
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, If_incomplete1) {
+ byte code[] = {kExprI8Const, 0, kExprIf};
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, If_incomplete2) {
+ byte code[] = {kExprI8Const, 0, kExprIf, kExprNop};
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, If_else_else) {
+ byte code[] = {kExprI8Const, 0, kExprIf, kExprElse, kExprElse, kExprEnd};
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
}
TEST_F(AstDecoderTest, IfEmpty) {
- static const byte code[] = {kExprIf, kExprGetLocal, 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), kExprGetLocal, 0, kExprIf, kExprEnd);
}
TEST_F(AstDecoderTest, IfSet) {
- static const byte code[] = {kExprIfElse, kExprGetLocal, 0, kExprSetLocal,
- 0, kExprI8Const, 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_i(), code);
-}
-
-TEST_F(AstDecoderTest, IfBlock1) {
- static const byte code[] = {kExprIfElse, kExprGetLocal, 0, kExprBlock,
- 1, kExprSetLocal, 0, kExprI8Const,
- 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_i(), code);
-}
-
-TEST_F(AstDecoderTest, IfBlock2) {
- static const byte code[] = {kExprIf, kExprGetLocal, 0, kExprBlock,
- 2, kExprSetLocal, 0, kExprI8Const,
- 0, kExprSetLocal, 0, kExprI8Const,
- 0};
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), WASM_SET_LOCAL(0, WASM_ZERO)));
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_SET_LOCAL(0, WASM_ZERO), WASM_NOP));
}
TEST_F(AstDecoderTest, IfElseEmpty) {
- static const byte code[] = {kExprIfElse, kExprGetLocal, 0, kExprNop,
- kExprNop};
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), WASM_GET_LOCAL(0), kExprIf, kExprElse,
+ kExprEnd);
+ EXPECT_VERIFIES_INLINE(sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_NOP));
}
-TEST_F(AstDecoderTest, IfElseSet) {
- static const byte code[] = {kExprIfElse,
- kExprGetLocal,
- 0, // --
- kExprSetLocal,
- 0,
- kExprI8Const,
- 0, // --
- kExprSetLocal,
- 0,
- kExprI8Const,
- 1}; // --
- EXPECT_VERIFIES(sigs.v_i(), code);
+TEST_F(AstDecoderTest, IfElseUnreachable1) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.i_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_UNREACHABLE, WASM_GET_LOCAL(0)));
+ EXPECT_VERIFIES_INLINE(
+ sigs.i_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_UNREACHABLE));
}
-TEST_F(AstDecoderTest, IfElseUnreachable) {
- static const byte code[] = {kExprIfElse, kExprI8Const, 0,
- kExprUnreachable, kExprGetLocal, 0};
+TEST_F(AstDecoderTest, IfElseUnreachable2) {
+ static const byte code[] = {
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_UNREACHABLE, WASM_GET_LOCAL(0))};
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalType types[] = {kAstI32, kLocalTypes[i]};
@@ -509,66 +600,136 @@
}
}
+TEST_F(AstDecoderTest, IfBreak) {
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), WASM_BR(0)));
+ EXPECT_FAILURE_INLINE(sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), WASM_BR(1)));
+}
+
+TEST_F(AstDecoderTest, IfElseBreak) {
+ EXPECT_VERIFIES_INLINE(sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_BR(0)));
+ EXPECT_FAILURE_INLINE(sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_BR(1)));
+}
+
+TEST_F(AstDecoderTest, Block_else) {
+ byte code[] = {kExprI8Const, 0, kExprBlock, kExprElse, kExprEnd};
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.i_i(), code);
+}
+
+TEST_F(AstDecoderTest, IfNop) {
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), WASM_NOP));
+}
+
+TEST_F(AstDecoderTest, IfNopElseNop) {
+ EXPECT_VERIFIES_INLINE(sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_NOP));
+}
+
+TEST_F(AstDecoderTest, If_end_end) {
+ static const byte code[] = {kExprGetLocal, 0, kExprIf, kExprEnd, kExprEnd};
+ EXPECT_FAILURE(sigs.v_i(), code);
+}
+
+TEST_F(AstDecoderTest, If_falloff) {
+ static const byte code[] = {kExprGetLocal, 0, kExprIf};
+ EXPECT_FAILURE(sigs.v_i(), code);
+}
+
+TEST_F(AstDecoderTest, IfElse_falloff) {
+ static const byte code[] = {kExprGetLocal, 0, kExprIf, kExprNop, kExprElse};
+ EXPECT_FAILURE(sigs.v_i(), code);
+}
+
+TEST_F(AstDecoderTest, IfElseNop) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_SET_LOCAL(0, WASM_ZERO), WASM_NOP));
+}
+
+TEST_F(AstDecoderTest, IfBlock1) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_IF_ELSE(WASM_GET_LOCAL(0),
+ B1(WASM_SET_LOCAL(0, WASM_ZERO)), WASM_NOP));
+}
+
+TEST_F(AstDecoderTest, IfBlock1b) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), B1(WASM_SET_LOCAL(0, WASM_ZERO))));
+}
+
+TEST_F(AstDecoderTest, IfBlock2a) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_IF(WASM_GET_LOCAL(0), B2(WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_ZERO))));
+}
+
+TEST_F(AstDecoderTest, IfBlock2b) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), B2(WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_ZERO)),
+ WASM_NOP));
+}
+
+TEST_F(AstDecoderTest, IfElseSet) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_I8(1))));
+}
+
TEST_F(AstDecoderTest, Loop0) {
- static const byte code[] = {kExprLoop, 0};
+ static const byte code[] = {kExprLoop, kExprEnd};
EXPECT_VERIFIES(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, Loop1) {
- static const byte code[] = {kExprLoop, 1, kExprSetLocal, 0, kExprI8Const, 0};
+ static const byte code[] = {WASM_LOOP(1, WASM_SET_LOCAL(0, WASM_ZERO))};
EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_FAILURE(sigs.v_v(), code);
+ EXPECT_FAILURE(sigs.f_ff(), code);
}
TEST_F(AstDecoderTest, Loop2) {
- static const byte code[] = {kExprLoop, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprSetLocal, 0, kExprI8Const, 0}; // --
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), WASM_LOOP(2, WASM_SET_LOCAL(0, WASM_ZERO),
+ WASM_SET_LOCAL(0, WASM_ZERO)));
}
TEST_F(AstDecoderTest, Loop1_continue) {
- static const byte code[] = {kExprLoop, 1, kExprBr, 0, kExprNop};
- EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(1, WASM_BR(0)));
}
TEST_F(AstDecoderTest, Loop1_break) {
- static const byte code[] = {kExprLoop, 1, kExprBr, 1, kExprNop};
- EXPECT_VERIFIES(sigs.v_v(), code);
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(1, WASM_BR(1)));
}
TEST_F(AstDecoderTest, Loop2_continue) {
- static const byte code[] = {kExprLoop, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprBr, 0, kExprNop}; // --
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_LOOP(2, WASM_SET_LOCAL(0, WASM_ZERO), WASM_BR(0)));
}
TEST_F(AstDecoderTest, Loop2_break) {
- static const byte code[] = {kExprLoop, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprBr, 1, kExprNop}; // --
- EXPECT_VERIFIES(sigs.v_i(), code);
+ EXPECT_VERIFIES_INLINE(
+ sigs.v_i(), WASM_LOOP(2, WASM_SET_LOCAL(0, WASM_ZERO), WASM_BR(1)));
}
TEST_F(AstDecoderTest, ExprLoop0) {
- static const byte code[] = {kExprLoop, 0};
+ static const byte code[] = {kExprLoop, kExprEnd};
EXPECT_VERIFIES(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, ExprLoop1a) {
- static const byte code[] = {kExprLoop, 1, kExprBr, 0, kExprI8Const, 0};
- EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_LOOP(1, WASM_BRV(0, WASM_ZERO)));
}
TEST_F(AstDecoderTest, ExprLoop1b) {
- static const byte code[] = {kExprLoop, 1, kExprBr, 0, kExprI8Const, 0};
- EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_LOOP(1, WASM_BRV(1, WASM_ZERO)));
+ EXPECT_FAILURE_INLINE(sigs.f_ff(), WASM_LOOP(1, WASM_BRV(1, WASM_ZERO)));
}
TEST_F(AstDecoderTest, ExprLoop2_unreachable) {
- static const byte code[] = {kExprLoop, 2, kExprBr, 0,
- kExprI8Const, 0, kExprNop};
- EXPECT_VERIFIES(sigs.i_i(), code);
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_LOOP(2, WASM_BR(0), WASM_NOP));
}
TEST_F(AstDecoderTest, ReturnVoid1) {
@@ -579,7 +740,7 @@
}
TEST_F(AstDecoderTest, ReturnVoid2) {
- static const byte code[] = {kExprBlock, 1, kExprBr, 0, kExprNop};
+ static const byte code[] = {kExprBlock, kExprBr, ARITY_0, DEPTH_0, kExprEnd};
EXPECT_VERIFIES(sigs.v_v(), code);
EXPECT_FAILURE(sigs.i_i(), code);
EXPECT_FAILURE(sigs.i_f(), code);
@@ -598,67 +759,85 @@
TEST_F(AstDecoderTest, Unreachable1) {
EXPECT_VERIFIES_INLINE(sigs.v_v(), kExprUnreachable);
EXPECT_VERIFIES_INLINE(sigs.v_v(), kExprUnreachable, kExprUnreachable);
- EXPECT_VERIFIES_INLINE(sigs.v_v(),
- WASM_BLOCK(2, WASM_UNREACHABLE, WASM_ZERO));
- EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_BLOCK(2, WASM_BR(0), WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B2(WASM_UNREACHABLE, WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B2(WASM_BR(0), WASM_ZERO));
EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(2, WASM_UNREACHABLE, WASM_ZERO));
EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(2, WASM_BR(0), WASM_ZERO));
}
-TEST_F(AstDecoderTest, Codeiness) {
- VERIFY(kExprLoop, 2, // --
- kExprSetLocal, 0, kExprI8Const, 0, // --
- kExprBr, 0, kExprNop); // --
+TEST_F(AstDecoderTest, Unreachable_binop) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_I32_AND(WASM_ZERO, WASM_UNREACHABLE));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_I32_AND(WASM_UNREACHABLE, WASM_ZERO));
}
-TEST_F(AstDecoderTest, ExprIf1) {
- VERIFY(kExprIf, kExprGetLocal, 0, kExprI8Const, 0, kExprI8Const, 1);
- VERIFY(kExprIf, kExprGetLocal, 0, kExprGetLocal, 0, kExprGetLocal, 0);
- VERIFY(kExprIf, kExprGetLocal, 0, kExprI32Add, kExprGetLocal, 0,
- kExprGetLocal, 0, kExprI8Const, 1);
+TEST_F(AstDecoderTest, Unreachable_select) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ WASM_SELECT(WASM_UNREACHABLE, WASM_ZERO, WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ WASM_SELECT(WASM_ZERO, WASM_UNREACHABLE, WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ WASM_SELECT(WASM_ZERO, WASM_ZERO, WASM_UNREACHABLE));
}
-TEST_F(AstDecoderTest, ExprIf_off_end) {
- static const byte kCode[] = {kExprIf, kExprGetLocal, 0, kExprGetLocal,
- 0, kExprGetLocal, 0};
- for (size_t len = 1; len < arraysize(kCode); len++) {
+TEST_F(AstDecoderTest, If1) {
+ EXPECT_VERIFIES_INLINE(
+ sigs.i_i(), WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_I8(9), WASM_I8(8)));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_I8(9),
+ WASM_GET_LOCAL(0)));
+ EXPECT_VERIFIES_INLINE(
+ sigs.i_i(),
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_I8(8)));
+}
+
+TEST_F(AstDecoderTest, If_off_end) {
+ static const byte kCode[] = {
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))};
+ for (size_t len = 3; len < arraysize(kCode); len++) {
Verify(kError, sigs.i_i(), kCode, kCode + len);
}
}
-TEST_F(AstDecoderTest, ExprIf_type) {
- {
- // float|double ? 1 : 2
- static const byte kCode[] = {kExprIfElse, kExprGetLocal, 0, kExprI8Const,
- 1, kExprI8Const, 2};
- EXPECT_FAILURE(sigs.i_f(), kCode);
- EXPECT_FAILURE(sigs.i_d(), kCode);
- }
- {
- // 1 ? float|double : 2
- static const byte kCode[] = {kExprIfElse, kExprI8Const, 1, kExprGetLocal,
- 0, kExprI8Const, 2};
- EXPECT_FAILURE(sigs.i_f(), kCode);
- EXPECT_FAILURE(sigs.i_d(), kCode);
- }
- {
- // stmt ? 0 : 1
- static const byte kCode[] = {kExprIfElse, kExprNop, kExprI8Const,
- 0, kExprI8Const, 1};
- EXPECT_FAILURE(sigs.i_i(), kCode);
- }
- {
- // 0 ? stmt : 1
- static const byte kCode[] = {kExprIfElse, kExprI8Const, 0,
- kExprNop, kExprI8Const, 1};
- EXPECT_FAILURE(sigs.i_i(), kCode);
- }
- {
- // 0 ? 1 : stmt
- static const byte kCode[] = {kExprIfElse, kExprI8Const, 0, kExprI8Const, 1,
- 0, kExprBlock};
- EXPECT_FAILURE(sigs.i_i(), kCode);
- }
+TEST_F(AstDecoderTest, If_type1) {
+ // float|double ? 1 : 2
+ static const byte kCode[] = {
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_I8(0), WASM_I8(2))};
+ EXPECT_VERIFIES(sigs.i_i(), kCode);
+ EXPECT_FAILURE(sigs.i_f(), kCode);
+ EXPECT_FAILURE(sigs.i_d(), kCode);
+}
+
+TEST_F(AstDecoderTest, If_type2) {
+ // 1 ? float|double : 2
+ static const byte kCode[] = {
+ WASM_IF_ELSE(WASM_I8(1), WASM_GET_LOCAL(0), WASM_I8(1))};
+ EXPECT_VERIFIES(sigs.i_i(), kCode);
+ EXPECT_FAILURE(sigs.i_f(), kCode);
+ EXPECT_FAILURE(sigs.i_d(), kCode);
+}
+
+TEST_F(AstDecoderTest, If_type3) {
+ // stmt ? 0 : 1
+ static const byte kCode[] = {WASM_IF_ELSE(WASM_NOP, WASM_I8(0), WASM_I8(1))};
+ EXPECT_FAILURE(sigs.i_i(), kCode);
+ EXPECT_FAILURE(sigs.i_f(), kCode);
+ EXPECT_FAILURE(sigs.i_d(), kCode);
+}
+
+TEST_F(AstDecoderTest, If_type4) {
+ // 0 ? stmt : 1
+ static const byte kCode[] = {
+ WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_I8(1))};
+ EXPECT_FAILURE(sigs.i_i(), kCode);
+ EXPECT_FAILURE(sigs.i_f(), kCode);
+ EXPECT_FAILURE(sigs.i_d(), kCode);
+}
+
+TEST_F(AstDecoderTest, If_type5) {
+ // 0 ? 1 : stmt
+ static const byte kCode[] = {WASM_IF_ELSE(WASM_ZERO, WASM_I8(1), WASM_NOP)};
+ EXPECT_FAILURE(sigs.i_i(), kCode);
+ EXPECT_FAILURE(sigs.i_f(), kCode);
+ EXPECT_FAILURE(sigs.i_d(), kCode);
}
TEST_F(AstDecoderTest, Int64Local_param) {
@@ -669,8 +848,7 @@
for (byte i = 1; i < 8; i++) {
AddLocals(kAstI64, 1);
for (byte j = 0; j < i; j++) {
- byte code[] = {kExprGetLocal, j};
- EXPECT_VERIFIES(sigs.l_v(), code);
+ EXPECT_VERIFIES_INLINE(sigs.l_v(), WASM_GET_LOCAL(j));
}
}
}
@@ -737,7 +915,7 @@
VERIFY(WASM_IF(WASM_GET_LOCAL(0), WASM_NOP));
VERIFY(WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_NOP, WASM_NOP));
VERIFY(WASM_NOP);
- VERIFY(WASM_BLOCK(1, WASM_NOP));
+ VERIFY(B1(WASM_NOP));
VERIFY(WASM_LOOP(1, WASM_NOP));
VERIFY(WASM_LOOP(1, WASM_BREAK(0)));
VERIFY(WASM_LOOP(1, WASM_CONTINUE(0)));
@@ -760,30 +938,30 @@
}
TEST_F(AstDecoderTest, MacrosVariadic) {
- VERIFY(WASM_BLOCK(2, WASM_NOP, WASM_NOP));
- VERIFY(WASM_BLOCK(3, WASM_NOP, WASM_NOP, WASM_NOP));
+ VERIFY(B2(WASM_NOP, WASM_NOP));
+ VERIFY(B3(WASM_NOP, WASM_NOP, WASM_NOP));
VERIFY(WASM_LOOP(2, WASM_NOP, WASM_NOP));
VERIFY(WASM_LOOP(3, WASM_NOP, WASM_NOP, WASM_NOP));
}
TEST_F(AstDecoderTest, MacrosNestedBlocks) {
- VERIFY(WASM_BLOCK(2, WASM_NOP, WASM_BLOCK(2, WASM_NOP, WASM_NOP)));
- VERIFY(WASM_BLOCK(3, WASM_NOP, // --
- WASM_BLOCK(2, WASM_NOP, WASM_NOP), // --
- WASM_BLOCK(2, WASM_NOP, WASM_NOP))); // --
- VERIFY(WASM_BLOCK(1, WASM_BLOCK(1, WASM_BLOCK(2, WASM_NOP, WASM_NOP))));
+ VERIFY(B2(WASM_NOP, B2(WASM_NOP, WASM_NOP)));
+ VERIFY(B3(WASM_NOP, // --
+ B2(WASM_NOP, WASM_NOP), // --
+ B2(WASM_NOP, WASM_NOP))); // --
+ VERIFY(B1(B1(B2(WASM_NOP, WASM_NOP))));
}
TEST_F(AstDecoderTest, MultipleReturn) {
static LocalType kIntTypes5[] = {kAstI32, kAstI32, kAstI32, kAstI32, kAstI32};
FunctionSig sig_ii_v(2, 0, kIntTypes5);
- EXPECT_VERIFIES_INLINE(&sig_ii_v, WASM_RETURN(WASM_ZERO, WASM_ONE));
- EXPECT_FAILURE_INLINE(&sig_ii_v, WASM_RETURN(WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(&sig_ii_v, WASM_RETURNN(2, WASM_ZERO, WASM_ONE));
+ EXPECT_FAILURE_INLINE(&sig_ii_v, WASM_RETURNN(1, WASM_ZERO));
FunctionSig sig_iii_v(3, 0, kIntTypes5);
EXPECT_VERIFIES_INLINE(&sig_iii_v,
- WASM_RETURN(WASM_ZERO, WASM_ONE, WASM_I8(44)));
- EXPECT_FAILURE_INLINE(&sig_iii_v, WASM_RETURN(WASM_ZERO, WASM_ONE));
+ WASM_RETURNN(3, WASM_ZERO, WASM_ONE, WASM_I8(44)));
+ EXPECT_FAILURE_INLINE(&sig_iii_v, WASM_RETURNN(2, WASM_ZERO, WASM_ONE));
}
TEST_F(AstDecoderTest, MultipleReturn_fallthru) {
@@ -887,78 +1065,57 @@
}
TEST_F(AstDecoderTest, GrowMemory) {
- byte code[] = {kExprGrowMemory, kExprGetLocal, 0};
+ byte code[] = {WASM_UNOP(kExprGrowMemory, WASM_GET_LOCAL(0))};
EXPECT_VERIFIES(sigs.i_i(), code);
EXPECT_FAILURE(sigs.i_d(), code);
}
TEST_F(AstDecoderTest, LoadMemOffset) {
for (int offset = 0; offset < 128; offset += 7) {
- byte code[] = {kExprI32LoadMem, ZERO_ALIGNMENT, static_cast<byte>(offset),
- kExprI8Const, 0};
+ byte code[] = {kExprI8Const, 0, kExprI32LoadMem, ZERO_ALIGNMENT,
+ static_cast<byte>(offset)};
EXPECT_VERIFIES(sigs.i_i(), code);
}
}
TEST_F(AstDecoderTest, StoreMemOffset) {
for (int offset = 0; offset < 128; offset += 7) {
- byte code[] = {
- kExprI32StoreMem, 0, static_cast<byte>(offset), kExprI8Const, 0,
- kExprI8Const, 0};
+ byte code[] = {WASM_STORE_MEM_OFFSET(MachineType::Int32(), offset,
+ WASM_ZERO, WASM_ZERO)};
EXPECT_VERIFIES(sigs.i_i(), code);
}
}
-TEST_F(AstDecoderTest, LoadMemOffset_varint) {
- byte code1[] = {kExprI32LoadMem, ZERO_ALIGNMENT, ZERO_OFFSET, kExprI8Const,
- 0};
- byte code2[] = {kExprI32LoadMem, ZERO_ALIGNMENT, 0x80, 1, kExprI8Const, 0};
- byte code3[] = {
- kExprI32LoadMem, ZERO_ALIGNMENT, 0x81, 0x82, 5, kExprI8Const, 0};
- byte code4[] = {
- kExprI32LoadMem, ZERO_ALIGNMENT, 0x83, 0x84, 0x85, 7, kExprI8Const, 0};
+#define BYTE0(x) ((x)&0x7F)
+#define BYTE1(x) ((x >> 7) & 0x7F)
+#define BYTE2(x) ((x >> 14) & 0x7F)
+#define BYTE3(x) ((x >> 21) & 0x7F)
- EXPECT_VERIFIES(sigs.i_i(), code1);
- EXPECT_VERIFIES(sigs.i_i(), code2);
- EXPECT_VERIFIES(sigs.i_i(), code3);
- EXPECT_VERIFIES(sigs.i_i(), code4);
+#define VARINT1(x) BYTE0(x)
+#define VARINT2(x) BYTE0(x) | 0x80, BYTE1(x)
+#define VARINT3(x) BYTE0(x) | 0x80, BYTE1(x) | 0x80, BYTE2(x)
+#define VARINT4(x) BYTE0(x) | 0x80, BYTE1(x) | 0x80, BYTE2(x) | 0x80, BYTE3(x)
+
+TEST_F(AstDecoderTest, LoadMemOffset_varint) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, kExprI32LoadMem, ZERO_ALIGNMENT,
+ VARINT1(0x45));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, kExprI32LoadMem, ZERO_ALIGNMENT,
+ VARINT2(0x3999));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, kExprI32LoadMem, ZERO_ALIGNMENT,
+ VARINT3(0x344445));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, kExprI32LoadMem, ZERO_ALIGNMENT,
+ VARINT4(0x36666667));
}
TEST_F(AstDecoderTest, StoreMemOffset_varint) {
- byte code1[] = {
- kExprI32StoreMem, ZERO_ALIGNMENT, 0, kExprI8Const, 0, kExprI8Const, 0};
- byte code2[] = {kExprI32StoreMem,
- ZERO_ALIGNMENT,
- 0x80,
- 1,
- kExprI8Const,
- 0,
- kExprI8Const,
- 0};
- byte code3[] = {kExprI32StoreMem,
- ZERO_ALIGNMENT,
- 0x81,
- 0x82,
- 5,
- kExprI8Const,
- 0,
- kExprI8Const,
- 0};
- byte code4[] = {kExprI32StoreMem,
- ZERO_ALIGNMENT,
- 0x83,
- 0x84,
- 0x85,
- 7,
- kExprI8Const,
- 0,
- kExprI8Const,
- 0};
-
- EXPECT_VERIFIES(sigs.i_i(), code1);
- EXPECT_VERIFIES(sigs.i_i(), code2);
- EXPECT_VERIFIES(sigs.i_i(), code3);
- EXPECT_VERIFIES(sigs.i_i(), code4);
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, WASM_ZERO, kExprI32StoreMem,
+ ZERO_ALIGNMENT, VARINT1(0x33));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, WASM_ZERO, kExprI32StoreMem,
+ ZERO_ALIGNMENT, VARINT2(0x1111));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, WASM_ZERO, kExprI32StoreMem,
+ ZERO_ALIGNMENT, VARINT3(0x222222));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(), WASM_ZERO, WASM_ZERO, kExprI32StoreMem,
+ ZERO_ALIGNMENT, VARINT4(0x44444444));
}
TEST_F(AstDecoderTest, AllLoadMemCombinations) {
@@ -966,9 +1123,7 @@
LocalType local_type = kLocalTypes[i];
for (size_t j = 0; j < arraysize(machineTypes); j++) {
MachineType mem_type = machineTypes[j];
- byte code[] = {
- static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(mem_type, false)),
- ZERO_ALIGNMENT, ZERO_OFFSET, kExprI8Const, 0};
+ byte code[] = {WASM_LOAD_MEM(mem_type, WASM_ZERO)};
FunctionSig sig(1, 0, &local_type);
if (local_type == WasmOpcodes::LocalTypeFor(mem_type)) {
EXPECT_VERIFIES(&sig, code);
@@ -984,14 +1139,7 @@
LocalType local_type = kLocalTypes[i];
for (size_t j = 0; j < arraysize(machineTypes); j++) {
MachineType mem_type = machineTypes[j];
- byte code[] = {
- static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(mem_type, true)),
- ZERO_ALIGNMENT,
- ZERO_OFFSET,
- kExprI8Const,
- 0,
- kExprGetLocal,
- 0};
+ byte code[] = {WASM_STORE_MEM(mem_type, WASM_ZERO, WASM_GET_LOCAL(0))};
FunctionSig sig(0, 1, &local_type);
if (local_type == WasmOpcodes::LocalTypeFor(mem_type)) {
EXPECT_VERIFIES(&sig, code);
@@ -1002,7 +1150,6 @@
}
}
-
namespace {
// A helper for tests that require a module environment for functions and
// globals.
@@ -1024,12 +1171,24 @@
return static_cast<byte>(mod.signatures.size() - 1);
}
byte AddFunction(FunctionSig* sig) {
- mod.functions.push_back({sig, 0, 0, 0, 0, 0, 0, 0, false, false});
+ mod.functions.push_back({sig, // sig
+ 0, // func_index
+ 0, // sig_index
+ 0, // name_offset
+ 0, // name_length
+ 0, // code_start_offset
+ 0, // code_end_offset
+ false}); // exported
CHECK(mod.functions.size() <= 127);
return static_cast<byte>(mod.functions.size() - 1);
}
byte AddImport(FunctionSig* sig) {
- mod.import_table.push_back({sig, 0, 0});
+ mod.import_table.push_back({sig, // sig
+ 0, // sig_index
+ 0, // module_name_offset
+ 0, // module_name_length
+ 0, // function_name_offset
+ 0}); // function_name_length
CHECK(mod.import_table.size() <= 127);
return static_cast<byte>(mod.import_table.size() - 1);
}
@@ -1048,9 +1207,9 @@
module_env.AddFunction(sigs.i_i());
module_env.AddFunction(sigs.i_ii());
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION(0));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION(1, WASM_I8(27)));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION(2, WASM_I8(37), WASM_I8(77)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION0(0));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I8(27)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_FUNCTION2(2, WASM_I8(37), WASM_I8(77)));
}
TEST_F(AstDecoderTest, CallsWithTooFewArguments) {
@@ -1063,35 +1222,8 @@
module_env.AddFunction(sigs.f_ff());
EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION0(0));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(1, WASM_ZERO));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(2, WASM_GET_LOCAL(0)));
-}
-
-TEST_F(AstDecoderTest, CallsWithSpilloverArgs) {
- static LocalType a_i_ff[] = {kAstI32, kAstF32, kAstF32};
- FunctionSig sig_i_ff(1, 2, a_i_ff);
-
- TestModuleEnv module_env;
- module = &module_env;
-
- module_env.AddFunction(&sig_i_ff);
-
- EXPECT_VERIFIES_INLINE(sigs.i_i(),
- WASM_CALL_FUNCTION(0, WASM_F32(0.1), WASM_F32(0.1)));
-
- EXPECT_VERIFIES_INLINE(sigs.i_ff(),
- WASM_CALL_FUNCTION(0, WASM_F32(0.1), WASM_F32(0.1)));
-
- EXPECT_FAILURE_INLINE(sigs.f_ff(),
- WASM_CALL_FUNCTION(0, WASM_F32(0.1), WASM_F32(0.1)));
-
- EXPECT_FAILURE_INLINE(
- sigs.i_i(),
- WASM_CALL_FUNCTION(0, WASM_F32(0.1), WASM_F32(0.1), WASM_F32(0.2)));
-
- EXPECT_VERIFIES_INLINE(
- sigs.f_ff(),
- WASM_CALL_FUNCTION(0, WASM_F32(0.1), WASM_F32(0.1), WASM_F32(11)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_ZERO));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(2, WASM_GET_LOCAL(0)));
}
TEST_F(AstDecoderTest, CallsWithMismatchedSigs2) {
@@ -1101,9 +1233,9 @@
module_env.AddFunction(sigs.i_i());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_I64V_1(17)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_F32(17.1)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_F64(17.1)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I64V_1(17)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F32(17.1)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F64(17.1)));
}
TEST_F(AstDecoderTest, CallsWithMismatchedSigs3) {
@@ -1113,15 +1245,15 @@
module_env.AddFunction(sigs.i_f());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_I8(17)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_I64V_1(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(0, WASM_F64(37.2)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I8(17)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_I64V_1(27)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(0, WASM_F64(37.2)));
module_env.AddFunction(sigs.i_d());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(1, WASM_I8(16)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(1, WASM_I64V_1(16)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION(1, WASM_F32(17.6)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I8(16)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_I64V_1(16)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_FUNCTION1(1, WASM_F32(17.6)));
}
TEST_F(AstDecoderTest, SimpleIndirectCalls) {
@@ -1134,9 +1266,9 @@
byte f2 = module_env.AddSignature(sigs.i_ii());
EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_ZERO));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT(f1, WASM_ZERO, WASM_I8(22)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(22)));
EXPECT_VERIFIES_INLINE(
- sig, WASM_CALL_INDIRECT(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
+ sig, WASM_CALL_INDIRECT2(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
}
TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) {
@@ -1148,11 +1280,11 @@
module_env.AddSignature(sigs.i_v());
EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(1, WASM_ZERO, WASM_I8(22)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(22)));
module_env.AddSignature(sigs.i_i());
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT(1, WASM_ZERO, WASM_I8(27)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(2, WASM_ZERO, WASM_I8(27)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(2, WASM_ZERO, WASM_I8(27)));
}
TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) {
@@ -1162,10 +1294,11 @@
byte f0 = module_env.AddFunction(sigs.i_f());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(f0, WASM_ZERO, WASM_I8(17)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_I8(17)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT(f0, WASM_ZERO, WASM_I64V_1(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(f0, WASM_ZERO, WASM_F64(37.2)));
+ WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_I64V_1(27)));
+ EXPECT_FAILURE_INLINE(sig,
+ WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_F64(37.2)));
EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I8(17)));
EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I64V_1(27)));
@@ -1173,10 +1306,11 @@
byte f1 = module_env.AddFunction(sigs.i_d());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(f1, WASM_ZERO, WASM_I8(16)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(16)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT(f1, WASM_ZERO, WASM_I64V_1(16)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT(f1, WASM_ZERO, WASM_F32(17.6)));
+ WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I64V_1(16)));
+ EXPECT_FAILURE_INLINE(sig,
+ WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_F32(17.6)));
}
TEST_F(AstDecoderTest, SimpleImportCalls) {
@@ -1189,8 +1323,8 @@
byte f2 = module_env.AddImport(sigs.i_ii());
EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT0(f0));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT(f1, WASM_I8(22)));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT(f2, WASM_I8(32), WASM_I8(72)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I8(22)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_IMPORT2(f2, WASM_I8(32), WASM_I8(72)));
}
TEST_F(AstDecoderTest, ImportCallsWithMismatchedSigs3) {
@@ -1201,16 +1335,16 @@
byte f0 = module_env.AddImport(sigs.i_f());
EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT0(f0));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f0, WASM_I8(17)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f0, WASM_I64V_1(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f0, WASM_F64(37.2)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_I8(17)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_I64V_1(27)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f0, WASM_F64(37.2)));
byte f1 = module_env.AddImport(sigs.i_d());
EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT0(f1));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f1, WASM_I8(16)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f1, WASM_I64V_1(16)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT(f1, WASM_F32(17.6)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I8(16)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_I64V_1(16)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_IMPORT1(f1, WASM_F32(17.6)));
}
TEST_F(AstDecoderTest, Int32Globals) {
@@ -1334,11 +1468,29 @@
}
}
+TEST_F(AstDecoderTest, BreakEnd) {
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ B1(WASM_I32_ADD(WASM_BRV(0, WASM_ZERO), WASM_ZERO)));
+ EXPECT_VERIFIES_INLINE(sigs.i_i(),
+ B1(WASM_I32_ADD(WASM_ZERO, WASM_BRV(0, WASM_ZERO))));
+}
+
+TEST_F(AstDecoderTest, BreakIfBinop) {
+ EXPECT_FAILURE_INLINE(
+ sigs.i_i(),
+ WASM_BLOCK(
+ 1, WASM_I32_ADD(WASM_BRV_IF(0, WASM_ZERO, WASM_ZERO), WASM_ZERO)));
+ EXPECT_FAILURE_INLINE(
+ sigs.i_i(),
+ WASM_BLOCK(
+ 1, WASM_I32_ADD(WASM_ZERO, WASM_BRV_IF(0, WASM_ZERO, WASM_ZERO))));
+}
+
TEST_F(AstDecoderTest, BreakNesting1) {
for (int i = 0; i < 5; i++) {
// (block[2] (loop[2] (if (get p) break[N]) (set p 1)) p)
byte code[] = {WASM_BLOCK(
- 2, WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(i, WASM_ZERO)),
+ 2, WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(i + 1, WASM_ZERO)),
WASM_SET_LOCAL(0, WASM_I8(1))),
WASM_GET_LOCAL(0))};
if (i < 3) {
@@ -1353,8 +1505,8 @@
AddLocals(kAstI32, 1);
for (int i = 0; i < 5; i++) {
// (block[2] (loop[2] (if 0 break[N]) (set p 1)) (return p)) (11)
- byte code[] = {WASM_BLOCK(1, WASM_LOOP(2, WASM_IF(WASM_ZERO, WASM_BREAK(i)),
- WASM_SET_LOCAL(0, WASM_I8(1)))),
+ byte code[] = {B1(WASM_LOOP(2, WASM_IF(WASM_ZERO, WASM_BREAK(i + 1)),
+ WASM_SET_LOCAL(0, WASM_I8(1)))),
WASM_I8(11)};
if (i < 2) {
EXPECT_VERIFIES(sigs.v_v(), code);
@@ -1367,8 +1519,8 @@
TEST_F(AstDecoderTest, BreakNesting3) {
for (int i = 0; i < 5; i++) {
// (block[1] (loop[1] (block[1] (if 0 break[N])
- byte code[] = {WASM_BLOCK(
- 1, WASM_LOOP(1, WASM_BLOCK(1, WASM_IF(WASM_ZERO, WASM_BREAK(i)))))};
+ byte code[] = {
+ WASM_BLOCK(1, WASM_LOOP(1, B1(WASM_IF(WASM_ZERO, WASM_BREAK(i + 1)))))};
if (i < 3) {
EXPECT_VERIFIES(sigs.v_v(), code);
} else {
@@ -1378,41 +1530,42 @@
}
TEST_F(AstDecoderTest, BreaksWithMultipleTypes) {
- EXPECT_FAILURE_INLINE(
- sigs.i_i(),
- WASM_BLOCK(2, WASM_BRV_IF_ZERO(0, WASM_I8(7)), WASM_F32(7.7)));
+ EXPECT_FAILURE_INLINE(sigs.i_i(),
+ B2(WASM_BRV_IF_ZERO(0, WASM_I8(7)), WASM_F32(7.7)));
- EXPECT_FAILURE_INLINE(sigs.i_i(),
- WASM_BLOCK(2, WASM_BRV_IF_ZERO(0, WASM_I8(7)),
- WASM_BRV_IF_ZERO(0, WASM_F32(7.7))));
- EXPECT_FAILURE_INLINE(sigs.i_i(),
- WASM_BLOCK(3, WASM_BRV_IF_ZERO(0, WASM_I8(8)),
- WASM_BRV_IF_ZERO(0, WASM_I8(0)),
- WASM_BRV_IF_ZERO(0, WASM_F32(7.7))));
- EXPECT_FAILURE_INLINE(sigs.i_i(),
- WASM_BLOCK(3, WASM_BRV_IF_ZERO(0, WASM_I8(9)),
- WASM_BRV_IF_ZERO(0, WASM_F32(7.7)),
- WASM_BRV_IF_ZERO(0, WASM_I8(11))));
+ EXPECT_FAILURE_INLINE(sigs.i_i(), B2(WASM_BRV_IF_ZERO(0, WASM_I8(7)),
+ WASM_BRV_IF_ZERO(0, WASM_F32(7.7))));
+ EXPECT_FAILURE_INLINE(sigs.i_i(), B3(WASM_BRV_IF_ZERO(0, WASM_I8(8)),
+ WASM_BRV_IF_ZERO(0, WASM_I8(0)),
+ WASM_BRV_IF_ZERO(0, WASM_F32(7.7))));
+ EXPECT_FAILURE_INLINE(sigs.i_i(), B3(WASM_BRV_IF_ZERO(0, WASM_I8(9)),
+ WASM_BRV_IF_ZERO(0, WASM_F32(7.7)),
+ WASM_BRV_IF_ZERO(0, WASM_I8(11))));
}
TEST_F(AstDecoderTest, BreakNesting_6_levels) {
for (int mask = 0; mask < 64; mask++) {
for (int i = 0; i < 14; i++) {
byte code[] = {
- kExprBlock, 1, // --
- kExprBlock, 1, // --
- kExprBlock, 1, // --
- kExprBlock, 1, // --
- kExprBlock, 1, // --
- kExprBlock, 1, // --
- kExprBr, static_cast<byte>(i),
- kExprNop // --
+ kExprBlock, // --
+ kExprBlock, // --
+ kExprBlock, // --
+ kExprBlock, // --
+ kExprBlock, // --
+ kExprBlock, // --
+ kExprBr, ARITY_0, static_cast<byte>(i), // --
+ kExprEnd, // --
+ kExprEnd, // --
+ kExprEnd, // --
+ kExprEnd, // --
+ kExprEnd, // --
+ kExprEnd // --
};
int depth = 6;
for (int l = 0; l < 6; l++) {
if (mask & (1 << l)) {
- code[l * 2] = kExprLoop;
+ code[l] = kExprLoop;
depth++;
}
}
@@ -1432,29 +1585,27 @@
FunctionSig* sig = sigarray[i];
// unify X and X => OK
EXPECT_VERIFIES_INLINE(
- sig, WASM_BLOCK(2, WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))),
- WASM_GET_LOCAL(0)));
+ sig, B2(WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))),
+ WASM_GET_LOCAL(0)));
}
// unify i32 and f32 => fail
EXPECT_FAILURE_INLINE(
sigs.i_i(),
- WASM_BLOCK(2, WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_ZERO)), WASM_F32(1.2)));
+ B2(WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_ZERO)), WASM_F32(1.2)));
// unify f64 and f64 => OK
EXPECT_VERIFIES_INLINE(
sigs.d_dd(),
- WASM_BLOCK(2, WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))),
- WASM_F64(1.2)));
+ B2(WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))), WASM_F64(1.2)));
}
TEST_F(AstDecoderTest, ExprBreak_TypeCheckAll) {
byte code1[] = {WASM_BLOCK(2,
WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(0))),
WASM_GET_LOCAL(1))};
- byte code2[] = {
- WASM_BLOCK(2, WASM_IF(WASM_ZERO, WASM_BRV_IF_ZERO(0, WASM_GET_LOCAL(0))),
- WASM_GET_LOCAL(1))};
+ byte code2[] = {B2(WASM_IF(WASM_ZERO, WASM_BRV_IF_ZERO(0, WASM_GET_LOCAL(0))),
+ WASM_GET_LOCAL(1))};
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
for (size_t j = 0; j < arraysize(kLocalTypes); j++) {
@@ -1479,14 +1630,12 @@
LocalType storage[] = {kAstI32, kAstI32, type};
FunctionSig sig(1, 2, storage);
- byte code1[] = {
- WASM_BLOCK(2, WASM_IF(WASM_ZERO, WASM_BRV(0, WASM_GET_LOCAL(which))),
- WASM_GET_LOCAL(which ^ 1))};
+ byte code1[] = {B2(WASM_IF(WASM_ZERO, WASM_BRV(1, WASM_GET_LOCAL(which))),
+ WASM_GET_LOCAL(which ^ 1))};
byte code2[] = {
- WASM_LOOP(2, WASM_IF(WASM_ZERO, WASM_BRV(1, WASM_GET_LOCAL(which))),
+ WASM_LOOP(2, WASM_IF(WASM_ZERO, WASM_BRV(2, WASM_GET_LOCAL(which))),
WASM_GET_LOCAL(which ^ 1))};
-
if (type == kAstI32) {
EXPECT_VERIFIES(&sig, code1);
EXPECT_VERIFIES(&sig, code2);
@@ -1499,8 +1648,7 @@
}
TEST_F(AstDecoderTest, ExprBrIf_cond_type) {
- byte code[] = {
- WASM_BLOCK(1, WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)))};
+ byte code[] = {B1(WASM_BRV_IF(0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)))};
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
for (size_t j = 0; j < arraysize(kLocalTypes); j++) {
LocalType types[] = {kLocalTypes[i], kLocalTypes[j]};
@@ -1516,9 +1664,8 @@
}
TEST_F(AstDecoderTest, ExprBrIf_val_type) {
- byte code[] = {
- WASM_BLOCK(2, WASM_BRV_IF(0, WASM_GET_LOCAL(1), WASM_GET_LOCAL(2)),
- WASM_GET_LOCAL(0))};
+ byte code[] = {B2(WASM_BRV_IF(0, WASM_GET_LOCAL(1), WASM_GET_LOCAL(2)),
+ WASM_GET_LOCAL(0))};
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
for (size_t j = 0; j < arraysize(kLocalTypes); j++) {
LocalType types[] = {kLocalTypes[i], kLocalTypes[i], kLocalTypes[j],
@@ -1541,8 +1688,8 @@
LocalType storage[] = {kAstI32, kAstI32, type};
FunctionSig sig(1, 2, storage);
- byte code1[] = {WASM_BLOCK(2, WASM_BRV_IF_ZERO(0, WASM_GET_LOCAL(which)),
- WASM_GET_LOCAL(which ^ 1))};
+ byte code1[] = {B2(WASM_BRV_IF_ZERO(0, WASM_GET_LOCAL(which)),
+ WASM_GET_LOCAL(which ^ 1))};
byte code2[] = {WASM_LOOP(2, WASM_BRV_IF_ZERO(1, WASM_GET_LOCAL(which)),
WASM_GET_LOCAL(which ^ 1))};
@@ -1558,31 +1705,29 @@
}
TEST_F(AstDecoderTest, BrTable0) {
- static byte code[] = {kExprBrTable, 0, 0};
+ static byte code[] = {kExprNop, kExprBrTable, 0, 0};
EXPECT_FAILURE(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, BrTable0b) {
- static byte code[] = {kExprBrTable, 0, 0, kExprI32Const, 11};
+ static byte code[] = {kExprNop, kExprI32Const, 11, kExprBrTable, 0, 0};
EXPECT_FAILURE(sigs.v_v(), code);
EXPECT_FAILURE(sigs.i_i(), code);
}
TEST_F(AstDecoderTest, BrTable0c) {
- static byte code[] = {kExprBrTable, 0, 1, 0, 0, kExprI32Const, 11};
+ static byte code[] = {kExprNop, kExprI32Const, 11, kExprBrTable, 0, 1, 0, 0};
EXPECT_FAILURE(sigs.v_v(), code);
EXPECT_FAILURE(sigs.i_i(), code);
}
TEST_F(AstDecoderTest, BrTable1a) {
- static byte code[] = {
- WASM_BLOCK(1, WASM_BR_TABLE(WASM_I8(67), 0, BR_TARGET(0)))};
+ static byte code[] = {B1(WASM_BR_TABLE(WASM_I8(67), 0, BR_TARGET(0)))};
EXPECT_VERIFIES(sigs.v_v(), code);
}
TEST_F(AstDecoderTest, BrTable1b) {
- static byte code[] = {
- WASM_BLOCK(1, WASM_BR_TABLE(WASM_ZERO, 0, BR_TARGET(0)))};
+ static byte code[] = {B1(WASM_BR_TABLE(WASM_ZERO, 0, BR_TARGET(0)))};
EXPECT_VERIFIES(sigs.v_v(), code);
EXPECT_FAILURE(sigs.i_i(), code);
EXPECT_FAILURE(sigs.f_ff(), code);
@@ -1591,7 +1736,7 @@
TEST_F(AstDecoderTest, BrTable2a) {
static byte code[] = {
- WASM_BLOCK(1, WASM_BR_TABLE(WASM_I8(67), 1, BR_TARGET(0), BR_TARGET(0)))};
+ B1(WASM_BR_TABLE(WASM_I8(67), 1, BR_TARGET(0), BR_TARGET(0)))};
EXPECT_VERIFIES(sigs.v_v(), code);
}
@@ -1603,8 +1748,7 @@
}
TEST_F(AstDecoderTest, BrTable_off_end) {
- static byte code[] = {
- WASM_BLOCK(1, WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(0)))};
+ static byte code[] = {B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(0)))};
for (size_t len = 1; len < sizeof(code); len++) {
Verify(kError, sigs.i_i(), code, code + len);
}
@@ -1612,8 +1756,7 @@
TEST_F(AstDecoderTest, BrTable_invalid_br1) {
for (int depth = 0; depth < 4; depth++) {
- byte code[] = {
- WASM_BLOCK(1, WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(depth)))};
+ byte code[] = {B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(depth)))};
if (depth == 0) {
EXPECT_VERIFIES(sigs.v_i(), code);
} else {
@@ -1635,11 +1778,10 @@
}
TEST_F(AstDecoderTest, ExprBreakNesting1) {
- EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_BLOCK(1, WASM_BRV(0, WASM_ZERO)));
- EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_BLOCK(1, WASM_BR(0)));
- EXPECT_VERIFIES_INLINE(sigs.v_v(),
- WASM_BLOCK(1, WASM_BRV_IF(0, WASM_ZERO, WASM_ZERO)));
- EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_BLOCK(1, WASM_BR_IF(0, WASM_ZERO)));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B1(WASM_BRV(0, WASM_ZERO)));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B1(WASM_BR(0)));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B1(WASM_BRV_IF(0, WASM_ZERO, WASM_ZERO)));
+ EXPECT_VERIFIES_INLINE(sigs.v_v(), B1(WASM_BR_IF(0, WASM_ZERO)));
EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(1, WASM_BRV(0, WASM_ZERO)));
EXPECT_VERIFIES_INLINE(sigs.v_v(), WASM_LOOP(1, WASM_BR(0)));
@@ -1714,7 +1856,6 @@
WASM_SELECT(WASM_F32(9.9), WASM_GET_LOCAL(0), WASM_I64V_1(0)));
}
-
class WasmOpcodeLengthTest : public TestWithZone {
public:
WasmOpcodeLengthTest() : TestWithZone() {}
@@ -1734,16 +1875,16 @@
TEST_F(WasmOpcodeLengthTest, Statements) {
EXPECT_LENGTH(1, kExprNop);
- EXPECT_LENGTH(2, kExprBlock);
- EXPECT_LENGTH(2, kExprLoop);
+ EXPECT_LENGTH(1, kExprBlock);
+ EXPECT_LENGTH(1, kExprLoop);
EXPECT_LENGTH(1, kExprIf);
- EXPECT_LENGTH(1, kExprIfElse);
+ EXPECT_LENGTH(1, kExprElse);
+ EXPECT_LENGTH(1, kExprEnd);
EXPECT_LENGTH(1, kExprSelect);
- EXPECT_LENGTH(2, kExprBr);
- EXPECT_LENGTH(2, kExprBrIf);
+ EXPECT_LENGTH(3, kExprBr);
+ EXPECT_LENGTH(3, kExprBrIf);
}
-
TEST_F(WasmOpcodeLengthTest, MiscExpressions) {
EXPECT_LENGTH(2, kExprI8Const);
EXPECT_LENGTH(5, kExprF32Const);
@@ -1752,15 +1893,14 @@
EXPECT_LENGTH(2, kExprSetLocal);
EXPECT_LENGTH(2, kExprLoadGlobal);
EXPECT_LENGTH(2, kExprStoreGlobal);
- EXPECT_LENGTH(2, kExprCallFunction);
- EXPECT_LENGTH(2, kExprCallImport);
- EXPECT_LENGTH(2, kExprCallIndirect);
+ EXPECT_LENGTH(3, kExprCallFunction);
+ EXPECT_LENGTH(3, kExprCallImport);
+ EXPECT_LENGTH(3, kExprCallIndirect);
EXPECT_LENGTH(1, kExprIf);
- EXPECT_LENGTH(1, kExprIfElse);
- EXPECT_LENGTH(2, kExprBlock);
- EXPECT_LENGTH(2, kExprLoop);
- EXPECT_LENGTH(2, kExprBr);
- EXPECT_LENGTH(2, kExprBrIf);
+ EXPECT_LENGTH(1, kExprBlock);
+ EXPECT_LENGTH(1, kExprLoop);
+ EXPECT_LENGTH(3, kExprBr);
+ EXPECT_LENGTH(3, kExprBrIf);
}
TEST_F(WasmOpcodeLengthTest, I32Const) {
@@ -1818,13 +1958,11 @@
EXPECT_LENGTH(3, kExprF64StoreMem);
}
-
TEST_F(WasmOpcodeLengthTest, MiscMemExpressions) {
EXPECT_LENGTH(1, kExprMemorySize);
EXPECT_LENGTH(1, kExprGrowMemory);
}
-
TEST_F(WasmOpcodeLengthTest, SimpleExpressions) {
EXPECT_LENGTH(1, kExprI32Add);
EXPECT_LENGTH(1, kExprI32Sub);
@@ -1946,54 +2084,49 @@
EXPECT_LENGTH(1, kExprI64ReinterpretF64);
}
-
class WasmOpcodeArityTest : public TestWithZone {
public:
WasmOpcodeArityTest() : TestWithZone() {}
- TestModuleEnv module;
- TestSignatures sigs;
};
-#define EXPECT_ARITY(expected, ...) \
- { \
- static const byte code[] = {__VA_ARGS__}; \
- EXPECT_EQ(expected, OpcodeArity(&module, sig, code, code + sizeof(code))); \
+#define EXPECT_ARITY(expected, ...) \
+ { \
+ static const byte code[] = {__VA_ARGS__}; \
+ EXPECT_EQ(expected, OpcodeArity(code, code + sizeof(code))); \
}
TEST_F(WasmOpcodeArityTest, Control) {
- FunctionSig* sig = sigs.v_v();
EXPECT_ARITY(0, kExprNop);
EXPECT_ARITY(0, kExprBlock, 0);
- EXPECT_ARITY(1, kExprBlock, 1);
- EXPECT_ARITY(2, kExprBlock, 2);
- EXPECT_ARITY(5, kExprBlock, 5);
- EXPECT_ARITY(10, kExprBlock, 10);
+ EXPECT_ARITY(0, kExprBlock, 1);
+ EXPECT_ARITY(0, kExprBlock, 2);
+ EXPECT_ARITY(0, kExprBlock, 5);
+ EXPECT_ARITY(0, kExprBlock, 10);
EXPECT_ARITY(0, kExprLoop, 0);
- EXPECT_ARITY(1, kExprLoop, 1);
- EXPECT_ARITY(2, kExprLoop, 2);
- EXPECT_ARITY(7, kExprLoop, 7);
- EXPECT_ARITY(11, kExprLoop, 11);
+ EXPECT_ARITY(0, kExprLoop, 1);
+ EXPECT_ARITY(0, kExprLoop, 2);
+ EXPECT_ARITY(0, kExprLoop, 7);
+ EXPECT_ARITY(0, kExprLoop, 11);
- EXPECT_ARITY(2, kExprIf);
- EXPECT_ARITY(3, kExprIfElse);
EXPECT_ARITY(3, kExprSelect);
- EXPECT_ARITY(1, kExprBr);
- EXPECT_ARITY(2, kExprBrIf);
+ EXPECT_ARITY(0, kExprBr);
+ EXPECT_ARITY(1, kExprBrIf);
+ EXPECT_ARITY(1, kExprBrTable);
+
+ EXPECT_ARITY(1, kExprBr, ARITY_1);
+ EXPECT_ARITY(2, kExprBrIf, ARITY_1);
+ EXPECT_ARITY(2, kExprBrTable, ARITY_1);
{
- sig = sigs.v_v();
- EXPECT_ARITY(0, kExprReturn);
- sig = sigs.i_i();
- EXPECT_ARITY(1, kExprReturn);
+ EXPECT_ARITY(0, kExprReturn, ARITY_0);
+ EXPECT_ARITY(1, kExprReturn, ARITY_1);
}
}
-
TEST_F(WasmOpcodeArityTest, Misc) {
- FunctionSig* sig = sigs.v_v();
EXPECT_ARITY(0, kExprI8Const);
EXPECT_ARITY(0, kExprI32Const);
EXPECT_ARITY(0, kExprF32Const);
@@ -2005,41 +2138,37 @@
EXPECT_ARITY(1, kExprStoreGlobal);
}
-
TEST_F(WasmOpcodeArityTest, Calls) {
- module.AddFunction(sigs.i_ii());
- module.AddFunction(sigs.i_i());
-
- module.AddSignature(sigs.f_ff());
- module.AddSignature(sigs.i_d());
-
- module.AddImport(sigs.f_ff());
- module.AddImport(sigs.i_d());
-
{
- FunctionSig* sig = sigs.i_ii();
+ EXPECT_ARITY(2, kExprCallFunction, 2, 0);
+ EXPECT_ARITY(2, kExprCallImport, 2, 0);
+ EXPECT_ARITY(3, kExprCallIndirect, 2, 0);
- EXPECT_ARITY(2, kExprCallFunction, 0);
- EXPECT_ARITY(2, kExprCallImport, 0);
- EXPECT_ARITY(3, kExprCallIndirect, 0);
- EXPECT_ARITY(1, kExprBr);
- EXPECT_ARITY(2, kExprBrIf);
+ EXPECT_ARITY(1, kExprBr, ARITY_1);
+ EXPECT_ARITY(2, kExprBrIf, ARITY_1);
+ EXPECT_ARITY(2, kExprBrTable, ARITY_1);
+
+ EXPECT_ARITY(0, kExprBr, ARITY_0);
+ EXPECT_ARITY(1, kExprBrIf, ARITY_0);
+ EXPECT_ARITY(1, kExprBrTable, ARITY_0);
}
{
- FunctionSig* sig = sigs.v_v();
+ EXPECT_ARITY(1, kExprCallFunction, ARITY_1, 1);
+ EXPECT_ARITY(1, kExprCallImport, ARITY_1, 1);
+ EXPECT_ARITY(2, kExprCallIndirect, ARITY_1, 1);
- EXPECT_ARITY(1, kExprCallFunction, 1);
- EXPECT_ARITY(1, kExprCallImport, 1);
- EXPECT_ARITY(2, kExprCallIndirect, 1);
- EXPECT_ARITY(1, kExprBr);
- EXPECT_ARITY(2, kExprBrIf);
+ EXPECT_ARITY(1, kExprBr, ARITY_1);
+ EXPECT_ARITY(2, kExprBrIf, ARITY_1);
+ EXPECT_ARITY(2, kExprBrTable, ARITY_1);
+
+ EXPECT_ARITY(0, kExprBr, ARITY_0);
+ EXPECT_ARITY(1, kExprBrIf, ARITY_0);
+ EXPECT_ARITY(1, kExprBrTable, ARITY_0);
}
}
-
TEST_F(WasmOpcodeArityTest, LoadsAndStores) {
- FunctionSig* sig = sigs.v_v();
EXPECT_ARITY(1, kExprI32LoadMem8S);
EXPECT_ARITY(1, kExprI32LoadMem8U);
EXPECT_ARITY(1, kExprI32LoadMem16S);
@@ -2067,16 +2196,12 @@
EXPECT_ARITY(2, kExprF64StoreMem);
}
-
TEST_F(WasmOpcodeArityTest, MiscMemExpressions) {
- FunctionSig* sig = sigs.v_v();
EXPECT_ARITY(0, kExprMemorySize);
EXPECT_ARITY(1, kExprGrowMemory);
}
-
TEST_F(WasmOpcodeArityTest, SimpleExpressions) {
- FunctionSig* sig = sigs.v_v();
EXPECT_ARITY(2, kExprI32Add);
EXPECT_ARITY(2, kExprI32Sub);
EXPECT_ARITY(2, kExprI32Mul);
@@ -2246,7 +2371,7 @@
LocalTypeMap map = Expand(decls);
EXPECT_EQ(1, map.size());
- EXPECT_EQ(type, map.at(0));
+ EXPECT_EQ(type, map[0]);
}
}
@@ -2297,7 +2422,7 @@
TEST_F(LocalDeclDecoderTest, UseEncoder) {
const byte* data = nullptr;
const byte* end = nullptr;
- LocalDeclEncoder local_decls;
+ LocalDeclEncoder local_decls(zone());
local_decls.AddLocals(5, kAstF32);
local_decls.AddLocals(1337, kAstI32);
diff --git a/test/unittests/wasm/encoder-unittest.cc b/test/unittests/wasm/encoder-unittest.cc
index 740c054..47885e6 100644
--- a/test/unittests/wasm/encoder-unittest.cc
+++ b/test/unittests/wasm/encoder-unittest.cc
@@ -9,6 +9,8 @@
#include "src/wasm/ast-decoder.h"
#include "src/wasm/encoder.h"
+#include "test/cctest/wasm/test-signatures.h"
+
namespace v8 {
namespace internal {
namespace wasm {
@@ -17,202 +19,10 @@
protected:
void AddLocal(WasmFunctionBuilder* f, LocalType type) {
uint16_t index = f->AddLocal(type);
- const std::vector<uint8_t>& out_index = UnsignedLEB128From(index);
- std::vector<uint8_t> code;
- code.push_back(kExprGetLocal);
- for (size_t i = 0; i < out_index.size(); i++) {
- code.push_back(out_index.at(i));
- }
- uint32_t local_indices[] = {1};
- f->EmitCode(&code[0], static_cast<uint32_t>(code.size()), local_indices, 1);
- }
-
- void CheckReadValue(uint8_t* leb_value, uint32_t expected_result,
- int expected_length,
- ReadUnsignedLEB128ErrorCode expected_error_code) {
- int length;
- uint32_t result;
- ReadUnsignedLEB128ErrorCode error_code =
- ReadUnsignedLEB128Operand(leb_value, leb_value + 5, &length, &result);
- CHECK_EQ(error_code, expected_error_code);
- if (error_code == 0) {
- CHECK_EQ(result, expected_result);
- CHECK_EQ(length, expected_length);
- }
- }
-
- void CheckWriteValue(uint32_t input, int length, uint8_t* vals) {
- const std::vector<uint8_t> result = UnsignedLEB128From(input);
- CHECK_EQ(result.size(), length);
- for (int i = 0; i < length; i++) {
- CHECK_EQ(result.at(i), vals[i]);
- }
+ f->EmitGetLocal(index);
}
};
-
-TEST_F(EncoderTest, Function_Builder_Variable_Indexing) {
- base::AccountingAllocator allocator;
- Zone zone(&allocator);
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- uint16_t f_index = builder->AddFunction();
- WasmFunctionBuilder* function = builder->FunctionAt(f_index);
- uint16_t local_f32 = function->AddLocal(kAstF32);
- uint16_t param_float32 = function->AddParam(kAstF32);
- uint16_t local_i32 = function->AddLocal(kAstI32);
- uint16_t local_f64 = function->AddLocal(kAstF64);
- uint16_t local_i64 = function->AddLocal(kAstI64);
- uint16_t param_int32 = function->AddParam(kAstI32);
- uint16_t local_i32_2 = function->AddLocal(kAstI32);
-
- byte code[] = {kExprGetLocal, static_cast<uint8_t>(param_float32)};
- uint32_t local_indices[] = {1};
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(param_int32);
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(local_i32);
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(local_i32_2);
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(local_i64);
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(local_f32);
- function->EmitCode(code, sizeof(code), local_indices, 1);
- code[1] = static_cast<uint8_t>(local_f64);
- function->EmitCode(code, sizeof(code), local_indices, 1);
-
- WasmFunctionEncoder* f = function->Build(&zone, builder);
- ZoneVector<uint8_t> buffer_vector(f->HeaderSize() + f->BodySize(), &zone);
- byte* buffer = &buffer_vector[0];
- byte* header = buffer;
- byte* body = buffer + f->HeaderSize();
- f->Serialize(buffer, &header, &body);
-}
-
-
-TEST_F(EncoderTest, Function_Builder_Indexing_Variable_Width) {
- base::AccountingAllocator allocator;
- Zone zone(&allocator);
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- uint16_t f_index = builder->AddFunction();
- WasmFunctionBuilder* function = builder->FunctionAt(f_index);
- for (size_t i = 0; i < 128; i++) {
- AddLocal(function, kAstF32);
- }
- AddLocal(function, kAstI32);
-
- WasmFunctionEncoder* f = function->Build(&zone, builder);
- ZoneVector<uint8_t> buffer_vector(f->HeaderSize() + f->BodySize(), &zone);
- byte* buffer = &buffer_vector[0];
- byte* header = buffer;
- byte* body = buffer + f->HeaderSize();
- f->Serialize(buffer, &header, &body);
- body = buffer + f->HeaderSize();
-}
-
-TEST_F(EncoderTest, Function_Builder_Block_Variable_Width) {
- base::AccountingAllocator allocator;
- Zone zone(&allocator);
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- uint16_t f_index = builder->AddFunction();
- WasmFunctionBuilder* function = builder->FunctionAt(f_index);
- function->EmitWithVarInt(kExprBlock, 200);
- for (int i = 0; i < 200; ++i) {
- function->Emit(kExprNop);
- }
-
- WasmFunctionEncoder* f = function->Build(&zone, builder);
- CHECK_EQ(f->BodySize(), 204);
-}
-
-TEST_F(EncoderTest, Function_Builder_EmitEditableVarIntImmediate) {
- base::AccountingAllocator allocator;
- Zone zone(&allocator);
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- uint16_t f_index = builder->AddFunction();
- WasmFunctionBuilder* function = builder->FunctionAt(f_index);
- function->Emit(kExprLoop);
- uint32_t offset = function->EmitEditableVarIntImmediate();
- for (int i = 0; i < 200; ++i) {
- function->Emit(kExprNop);
- }
- function->EditVarIntImmediate(offset, 200);
-
- WasmFunctionEncoder* f = function->Build(&zone, builder);
- CHECK_EQ(f->BodySize(), 204);
-}
-
-TEST_F(EncoderTest, Function_Builder_EmitEditableVarIntImmediate_Locals) {
- base::AccountingAllocator allocator;
- Zone zone(&allocator);
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- uint16_t f_index = builder->AddFunction();
- WasmFunctionBuilder* function = builder->FunctionAt(f_index);
- function->Emit(kExprBlock);
- uint32_t offset = function->EmitEditableVarIntImmediate();
- for (int i = 0; i < 200; ++i) {
- AddLocal(function, kAstI32);
- }
- function->EditVarIntImmediate(offset, 200);
-
- WasmFunctionEncoder* f = function->Build(&zone, builder);
- ZoneVector<uint8_t> buffer_vector(f->HeaderSize() + f->BodySize(), &zone);
- byte* buffer = &buffer_vector[0];
- byte* header = buffer;
- byte* body = buffer + f->HeaderSize();
- f->Serialize(buffer, &header, &body);
- body = buffer + f->HeaderSize();
-
- CHECK_EQ(f->BodySize(), 479);
- const uint8_t varint200_low = (200 & 0x7f) | 0x80;
- const uint8_t varint200_high = (200 >> 7) & 0x7f;
- offset = 0;
- CHECK_EQ(body[offset++], 1); // Local decl count.
- CHECK_EQ(body[offset++], varint200_low);
- CHECK_EQ(body[offset++], varint200_high);
- CHECK_EQ(body[offset++], kLocalI32);
- CHECK_EQ(body[offset++], kExprBlock);
- CHECK_EQ(body[offset++], varint200_low);
- CHECK_EQ(body[offset++], varint200_high);
- // GetLocal with one-byte indices.
- for (int i = 0; i <= 127; ++i) {
- CHECK_EQ(body[offset++], kExprGetLocal);
- CHECK_EQ(body[offset++], i);
- }
- // GetLocal with two-byte indices.
- for (int i = 128; i < 200; ++i) {
- CHECK_EQ(body[offset++], kExprGetLocal);
- CHECK_EQ(body[offset++], (i & 0x7f) | 0x80);
- CHECK_EQ(body[offset++], (i >> 7) & 0x7f);
- }
- CHECK_EQ(offset, 479);
-}
-
-TEST_F(EncoderTest, LEB_Functions) {
- byte leb_value[5] = {0, 0, 0, 0, 0};
- CheckReadValue(leb_value, 0, 1, kNoError);
- CheckWriteValue(0, 1, leb_value);
- leb_value[0] = 23;
- CheckReadValue(leb_value, 23, 1, kNoError);
- CheckWriteValue(23, 1, leb_value);
- leb_value[0] = 0x80;
- leb_value[1] = 0x01;
- CheckReadValue(leb_value, 128, 2, kNoError);
- CheckWriteValue(128, 2, leb_value);
- leb_value[0] = 0x80;
- leb_value[1] = 0x80;
- leb_value[2] = 0x80;
- leb_value[3] = 0x80;
- leb_value[4] = 0x01;
- CheckReadValue(leb_value, 0x10000000, 5, kNoError);
- CheckWriteValue(0x10000000, 5, leb_value);
- leb_value[0] = 0x80;
- leb_value[1] = 0x80;
- leb_value[2] = 0x80;
- leb_value[3] = 0x80;
- leb_value[4] = 0x80;
- CheckReadValue(leb_value, -1, -1, kInvalidLEB128);
-}
} // namespace wasm
} // namespace internal
} // namespace v8
diff --git a/test/unittests/wasm/leb-helper-unittest.cc b/test/unittests/wasm/leb-helper-unittest.cc
new file mode 100644
index 0000000..ed9f0a3
--- /dev/null
+++ b/test/unittests/wasm/leb-helper-unittest.cc
@@ -0,0 +1,190 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/unittests/test-utils.h"
+
+#include "src/wasm/decoder.h"
+#include "src/wasm/leb-helper.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+
+class LEBHelperTest : public TestWithZone {};
+
+TEST_F(LEBHelperTest, sizeof_u32v) {
+ EXPECT_EQ(1, LEBHelper::sizeof_u32v(0));
+ EXPECT_EQ(1, LEBHelper::sizeof_u32v(1));
+ EXPECT_EQ(1, LEBHelper::sizeof_u32v(3));
+
+ for (uint32_t i = 4; i < 128; i++) {
+ EXPECT_EQ(1, LEBHelper::sizeof_u32v(i));
+ }
+
+ for (uint32_t i = (1 << 7); i < (1 << 9); i++) {
+ EXPECT_EQ(2, LEBHelper::sizeof_u32v(i));
+ }
+
+ for (uint32_t i = (1 << 14); i < (1 << 16); i += 33) {
+ EXPECT_EQ(3, LEBHelper::sizeof_u32v(i));
+ }
+
+ for (uint32_t i = (1 << 21); i < (1 << 24); i += 33999) {
+ EXPECT_EQ(4, LEBHelper::sizeof_u32v(i));
+ }
+
+ for (uint32_t i = (1 << 28); i < (1 << 31); i += 33997779) {
+ EXPECT_EQ(5, LEBHelper::sizeof_u32v(i));
+ }
+
+ EXPECT_EQ(5, LEBHelper::sizeof_u32v(0xFFFFFFFF));
+}
+
+TEST_F(LEBHelperTest, sizeof_i32v) {
+ EXPECT_EQ(1, LEBHelper::sizeof_i32v(0));
+ EXPECT_EQ(1, LEBHelper::sizeof_i32v(1));
+ EXPECT_EQ(1, LEBHelper::sizeof_i32v(3));
+
+ for (int32_t i = 0; i < (1 << 6); i++) {
+ EXPECT_EQ(1, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = (1 << 6); i < (1 << 8); i++) {
+ EXPECT_EQ(2, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = (1 << 13); i < (1 << 15); i += 31) {
+ EXPECT_EQ(3, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = (1 << 20); i < (1 << 22); i += 31991) {
+ EXPECT_EQ(4, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = (1 << 27); i < (1 << 29); i += 3199893) {
+ EXPECT_EQ(5, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = -(1 << 6); i <= 0; i++) {
+ EXPECT_EQ(1, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = -(1 << 13); i < -(1 << 6); i++) {
+ EXPECT_EQ(2, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = -(1 << 20); i < -(1 << 18); i += 11) {
+ EXPECT_EQ(3, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = -(1 << 27); i < -(1 << 25); i += 11999) {
+ EXPECT_EQ(4, LEBHelper::sizeof_i32v(i));
+ }
+
+ for (int32_t i = -(1 << 30); i < -(1 << 28); i += 1199999) {
+ EXPECT_EQ(5, LEBHelper::sizeof_i32v(i));
+ }
+}
+
+#define DECLARE_ENCODE_DECODE_CHECKER(ctype, name) \
+ static void CheckEncodeDecode_##name(ctype val) { \
+ static const int kSize = 16; \
+ static byte buffer[kSize]; \
+ byte *ptr = buffer; \
+ LEBHelper::write_##name(&ptr, val); \
+ EXPECT_EQ(LEBHelper::sizeof_##name(val), \
+ static_cast<size_t>(ptr - buffer)); \
+ Decoder decoder(buffer, buffer + kSize); \
+ int length = 0; \
+ ctype result = decoder.checked_read_##name(buffer, 0, &length); \
+ EXPECT_EQ(val, result); \
+ EXPECT_EQ(LEBHelper::sizeof_##name(val), static_cast<size_t>(length)); \
+ }
+
+DECLARE_ENCODE_DECODE_CHECKER(int32_t, i32v)
+DECLARE_ENCODE_DECODE_CHECKER(uint32_t, u32v)
+DECLARE_ENCODE_DECODE_CHECKER(int64_t, i64v)
+DECLARE_ENCODE_DECODE_CHECKER(uint64_t, u64v)
+
+TEST_F(LEBHelperTest, WriteAndDecode_u32v) {
+ CheckEncodeDecode_u32v(0);
+ CheckEncodeDecode_u32v(1);
+ CheckEncodeDecode_u32v(5);
+ CheckEncodeDecode_u32v(99);
+ CheckEncodeDecode_u32v(298);
+ CheckEncodeDecode_u32v(87348723);
+ CheckEncodeDecode_u32v(77777);
+
+ for (uint32_t val = 0x3a; val != 0; val = val << 1) {
+ CheckEncodeDecode_u32v(val);
+ }
+}
+
+TEST_F(LEBHelperTest, WriteAndDecode_i32v) {
+ CheckEncodeDecode_i32v(0);
+ CheckEncodeDecode_i32v(1);
+ CheckEncodeDecode_i32v(5);
+ CheckEncodeDecode_i32v(99);
+ CheckEncodeDecode_i32v(298);
+ CheckEncodeDecode_i32v(87348723);
+ CheckEncodeDecode_i32v(77777);
+
+ CheckEncodeDecode_i32v(-2);
+ CheckEncodeDecode_i32v(-4);
+ CheckEncodeDecode_i32v(-59);
+ CheckEncodeDecode_i32v(-288);
+ CheckEncodeDecode_i32v(-12608);
+ CheckEncodeDecode_i32v(-87328723);
+ CheckEncodeDecode_i32v(-77377);
+
+ for (uint32_t val = 0x3a; val != 0; val = val << 1) {
+ CheckEncodeDecode_i32v(bit_cast<int32_t>(val));
+ }
+
+ for (uint32_t val = 0xFFFFFF3B; val != 0; val = val << 1) {
+ CheckEncodeDecode_i32v(bit_cast<int32_t>(val));
+ }
+}
+
+TEST_F(LEBHelperTest, WriteAndDecode_u64v) {
+ CheckEncodeDecode_u64v(0);
+ CheckEncodeDecode_u64v(1);
+ CheckEncodeDecode_u64v(5);
+ CheckEncodeDecode_u64v(99);
+ CheckEncodeDecode_u64v(298);
+ CheckEncodeDecode_u64v(87348723);
+ CheckEncodeDecode_u64v(77777);
+
+ for (uint64_t val = 0x3a; val != 0; val = val << 1) {
+ CheckEncodeDecode_u64v(val);
+ }
+}
+
+TEST_F(LEBHelperTest, WriteAndDecode_i64v) {
+ CheckEncodeDecode_i64v(0);
+ CheckEncodeDecode_i64v(1);
+ CheckEncodeDecode_i64v(5);
+ CheckEncodeDecode_i64v(99);
+ CheckEncodeDecode_i64v(298);
+ CheckEncodeDecode_i64v(87348723);
+ CheckEncodeDecode_i64v(77777);
+
+ CheckEncodeDecode_i64v(-2);
+ CheckEncodeDecode_i64v(-4);
+ CheckEncodeDecode_i64v(-59);
+ CheckEncodeDecode_i64v(-288);
+ CheckEncodeDecode_i64v(-87648723);
+ CheckEncodeDecode_i64v(-77377);
+
+ for (uint64_t val = 0x3a; val != 0; val = val << 1) {
+ CheckEncodeDecode_i64v(bit_cast<int64_t>(val));
+ }
+
+ for (uint64_t val = 0xFFFFFFFFFFFFFF3B; val != 0; val = val << 1) {
+ CheckEncodeDecode_i64v(bit_cast<int64_t>(val));
+ }
+}
+} // namespace wasm
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/wasm/loop-assignment-analysis-unittest.cc b/test/unittests/wasm/loop-assignment-analysis-unittest.cc
index e77c1cf..7d97c50 100644
--- a/test/unittests/wasm/loop-assignment-analysis-unittest.cc
+++ b/test/unittests/wasm/loop-assignment-analysis-unittest.cc
@@ -32,14 +32,12 @@
}
};
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Empty0) {
byte code[] = { 0 };
BitVector* assigned = Analyze(code, code);
CHECK_NULL(assigned);
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Empty1) {
byte code[] = {kExprLoop, 0};
for (int i = 0; i < 5; i++) {
@@ -51,7 +49,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, One) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
@@ -63,7 +60,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, OneBeyond) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
@@ -75,7 +71,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Two) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
@@ -90,7 +85,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, NestedIf) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
@@ -104,14 +98,12 @@
}
}
-
static byte LEBByte(uint32_t val, byte which) {
byte b = (val >> (which * 7)) & 0x7F;
if (val >> ((which + 1) * 7)) b |= 0x80;
return b;
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, BigLocal) {
num_locals = 65000;
for (int i = 13; i < 65000; i = static_cast<int>(i * 1.5)) {
@@ -133,7 +125,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Break) {
num_locals = 3;
byte code[] = {
@@ -147,7 +138,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Loop1) {
num_locals = 5;
byte code[] = {
@@ -164,7 +154,6 @@
}
}
-
TEST_F(WasmLoopAssignmentAnalyzerTest, Loop2) {
num_locals = 6;
const byte kIter = 0;
@@ -184,14 +173,13 @@
WASM_STORE_MEM(MachineType::Float32(), WASM_ZERO, WASM_GET_LOCAL(kSum)),
WASM_GET_LOCAL(kIter))};
- BitVector* assigned = Analyze(code + 2, code + arraysize(code));
+ BitVector* assigned = Analyze(code + 1, code + arraysize(code));
for (int j = 0; j < assigned->length(); j++) {
bool expected = j == kIter || j == kSum;
CHECK_EQ(expected, assigned->Contains(j));
}
}
-
} // namespace wasm
} // namespace internal
} // namespace v8
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc
index 44e7865..7090c1f 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -13,18 +13,34 @@
namespace wasm {
#define EMPTY_FUNCTION(sig_index) 0, SIG_INDEX(sig_index), U16_LE(0)
-#define EMPTY_FUNCTION_SIZE ((size_t)5)
+#define SIZEOF_EMPTY_FUNCTION ((size_t)5)
#define EMPTY_BODY 0
-#define EMPTY_BODY_SIZE ((size_t)1)
+#define SIZEOF_EMPTY_BODY ((size_t)1)
#define NOP_BODY 2, 0, kExprNop
-#define NOP_BODY_SIZE ((size_t)3)
-#define VOID_VOID_SIG 0, kLocalVoid
-#define VOID_VOID_SIG_SIZE ((size_t)2)
-#define INT_INT_SIG 1, kLocalI32, kLocalI32
-#define INT_INT_SIG_SIZE ((size_t)3)
+#define SIZEOF_NOP_BODY ((size_t)3)
-#define SECTION(NAME, EXTRA_SIZE) \
- U32V_1(WASM_SECTION_##NAME##_SIZE + (EXTRA_SIZE)), WASM_SECTION_##NAME
+#define SIG_ENTRY_i_i SIG_ENTRY_x_x(kLocalI32, kLocalI32)
+
+#define UNKNOWN_EMPTY_SECTION_NAME 1, '\0'
+#define UNKNOWN_SECTION_NAME 4, 'l', 'u', 'l', 'z'
+
+#define SECTION(NAME, EXTRA_SIZE) WASM_SECTION_##NAME, U32V_1(EXTRA_SIZE)
+
+#define SIGNATURES_SECTION(count, ...) \
+ SECTION(SIGNATURES, 1 + 3 * (count)), U32V_1(count), __VA_ARGS__
+#define FUNCTION_SIGNATURES_SECTION(count, ...) \
+ SECTION(FUNCTION_SIGNATURES, 1 + (count)), U32V_1(count), __VA_ARGS__
+
+#define FOO_STRING 3, 'f', 'o', 'o'
+#define NO_LOCAL_NAMES 0
+
+#define EMPTY_SIGNATURES_SECTION SECTION(SIGNATURES, 1), 0
+#define EMPTY_FUNCTION_SIGNATURES_SECTION SECTION(FUNCTION_SIGNATURES, 1), 0
+#define EMPTY_FUNCTION_BODIES_SECTION SECTION(FUNCTION_BODIES, 1), 0
+#define EMPTY_NAMES_SECTION SECTION(NAMES, 1), 0
+
+#define SIGNATURES_SECTION_VOID_VOID \
+ SECTION(SIGNATURES, 1 + SIZEOF_SIG_ENTRY_v_v), 1, SIG_ENTRY_v_v
#define EXPECT_VERIFIES(data) \
do { \
@@ -49,6 +65,15 @@
} \
} while (false)
+#define EXPECT_OK(result) \
+ do { \
+ EXPECT_TRUE(result.ok()); \
+ if (!result.ok()) { \
+ if (result.val) delete result.val; \
+ return; \
+ } \
+ } while (false)
+
static size_t SizeOfVarInt(size_t value) {
size_t size = 0;
do {
@@ -66,7 +91,7 @@
{kLocalF32, kAstF32},
{kLocalF64, kAstF64}};
-class WasmModuleVerifyTest : public TestWithZone {
+class WasmModuleVerifyTest : public TestWithIsolateAndZone {
public:
ModuleResult DecodeModule(const byte* module_start, const byte* module_end) {
// Add the WASM magic and version number automatically.
@@ -76,14 +101,14 @@
auto temp = new byte[total];
memcpy(temp, header, sizeof(header));
memcpy(temp + sizeof(header), module_start, size);
- ModuleResult result = DecodeWasmModule(nullptr, zone(), temp, temp + total,
- false, kWasmOrigin);
+ ModuleResult result = DecodeWasmModule(isolate(), zone(), temp,
+ temp + total, false, kWasmOrigin);
delete[] temp;
return result;
}
ModuleResult DecodeModuleNoHeader(const byte* module_start,
const byte* module_end) {
- return DecodeWasmModule(nullptr, zone(), module_start, module_end, false,
+ return DecodeWasmModule(isolate(), zone(), module_start, module_end, false,
kWasmOrigin);
}
};
@@ -115,7 +140,7 @@
TEST_F(WasmModuleVerifyTest, OneGlobal) {
static const byte data[] = {
- SECTION(GLOBALS, 7), // --
+ SECTION(GLOBALS, 5), // --
1,
NAME_LENGTH(1),
'g', // name
@@ -126,7 +151,7 @@
{
// Should decode to exactly one global.
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(1, result.val->globals.size());
EXPECT_EQ(0, result.val->functions.size());
EXPECT_EQ(0, result.val->data_segments.size());
@@ -144,18 +169,16 @@
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
-
TEST_F(WasmModuleVerifyTest, ZeroGlobals) {
static const byte data[] = {
SECTION(GLOBALS, 1), // --
0, // declare 0 globals
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
if (result.val) delete result.val;
}
-
static void AppendUint32v(std::vector<byte>& buffer, uint32_t val) {
while (true) {
uint32_t next = val >> 7;
@@ -170,7 +193,6 @@
}
}
-
TEST_F(WasmModuleVerifyTest, NGlobals) {
static const byte data[] = {
NO_NAME, // name length
@@ -180,9 +202,8 @@
for (uint32_t i = 0; i < 1000000; i = i * 13 + 1) {
std::vector<byte> buffer;
- size_t size =
- WASM_SECTION_GLOBALS_SIZE + SizeOfVarInt(i) + i * sizeof(data);
- const byte globals[] = {U32V_5(size), WASM_SECTION_GLOBALS};
+ size_t size = SizeOfVarInt(i) + i * sizeof(data);
+ const byte globals[] = {WASM_SECTION_GLOBALS, U32V_5(size)};
for (size_t g = 0; g != sizeof(globals); ++g) {
buffer.push_back(globals[g]);
}
@@ -192,7 +213,7 @@
}
ModuleResult result = DecodeModule(&buffer[0], &buffer[0] + buffer.size());
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
if (result.val) delete result.val;
}
}
@@ -221,10 +242,9 @@
EXPECT_FAILURE(data);
}
-
TEST_F(WasmModuleVerifyTest, TwoGlobals) {
static const byte data[] = {
- SECTION(GLOBALS, 13),
+ SECTION(GLOBALS, 7),
2,
NO_NAME, // #0: name length
kMemF32, // memory type
@@ -237,7 +257,7 @@
{
// Should decode to exactly two globals.
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(2, result.val->globals.size());
EXPECT_EQ(0, result.val->functions.size());
EXPECT_EQ(0, result.val->data_segments.size());
@@ -261,39 +281,31 @@
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
-
TEST_F(WasmModuleVerifyTest, OneSignature) {
{
- static const byte data[] = {SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE), 1,
- VOID_VOID_SIG};
+ static const byte data[] = {SIGNATURES_SECTION_VOID_VOID};
EXPECT_VERIFIES(data);
}
{
- static const byte data[] = {SECTION(SIGNATURES, 1 + INT_INT_SIG_SIZE), 1,
- INT_INT_SIG};
+ static const byte data[] = {SECTION(SIGNATURES, 1 + SIZEOF_SIG_ENTRY_x_x),
+ 1, SIG_ENTRY_i_i};
EXPECT_VERIFIES(data);
}
}
-
TEST_F(WasmModuleVerifyTest, MultipleSignatures) {
static const byte data[] = {
- SECTION(SIGNATURES, 10),
- 3,
- 0,
- kLocalVoid, // void -> void
- 1,
- kLocalI32,
- kLocalF32, // f32 -> i32
- 2,
- kLocalI32,
- kLocalF64,
- kLocalF64, // (f64,f64) -> i32
+ SECTION(SIGNATURES, 1 + SIZEOF_SIG_ENTRY_v_v + SIZEOF_SIG_ENTRY_x_x +
+ SIZEOF_SIG_ENTRY_x_xx), // --
+ 3, // --
+ SIG_ENTRY_v_v, // void -> void
+ SIG_ENTRY_x_x(kLocalI32, kLocalF32), // f32 -> i32
+ SIG_ENTRY_x_xx(kLocalI32, kLocalF64, kLocalF64), // f64,f64 -> i32
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(3, result.val->signatures.size());
if (result.val->signatures.size() == 3) {
EXPECT_EQ(0, result.val->signatures[0]->return_count());
@@ -309,10 +321,9 @@
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
-
TEST_F(WasmModuleVerifyTest, FunctionWithoutSig) {
static const byte data[] = {
- SECTION(FUNCTIONS, 25), 1,
+ SECTION(OLD_FUNCTIONS, 25), 1,
// func#0 ------------------------------------------------------
SIG_INDEX(0), // signature index
NO_NAME, // name length
@@ -323,7 +334,7 @@
U16_LE(699), // local float32 count
U16_LE(599), // local float64 count
0, // exported
- 1 // external
+ 0 // external
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
@@ -331,24 +342,17 @@
if (result.val) delete result.val;
}
-
TEST_F(WasmModuleVerifyTest, OneEmptyVoidVoidFunction) {
- const int kCodeStartOffset = 51;
+ const int kCodeStartOffset = 41;
const int kCodeEndOffset = kCodeStartOffset + 1;
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE), 1,
- // sig#0 -------------------------------------------------------
- VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
// func#0 ------------------------------------------------------
- SECTION(FUNCTIONS, 19), 1,
- kDeclFunctionLocals | kDeclFunctionExport | kDeclFunctionName,
+ SECTION(OLD_FUNCTIONS, 10), 1, kDeclFunctionExport | kDeclFunctionName,
SIG_INDEX(0), // signature index
NAME_LENGTH(2), 'h', 'i', // name
- U16_LE(1466), // local int32 count
- U16_LE(1355), // local int64 count
- U16_LE(1244), // local float32 count
- U16_LE(1133), // local float64 count
1, 0, // size
kExprNop,
};
@@ -356,7 +360,7 @@
{
// Should decode to exactly one function.
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(0, result.val->globals.size());
EXPECT_EQ(1, result.val->signatures.size());
EXPECT_EQ(1, result.val->functions.size());
@@ -365,18 +369,12 @@
WasmFunction* function = &result.val->functions.back();
- EXPECT_EQ(39, function->name_offset);
+ EXPECT_EQ(37, function->name_offset);
EXPECT_EQ(2, function->name_length);
EXPECT_EQ(kCodeStartOffset, function->code_start_offset);
EXPECT_EQ(kCodeEndOffset, function->code_end_offset);
- EXPECT_EQ(1466, function->local_i32_count);
- EXPECT_EQ(1355, function->local_i64_count);
- EXPECT_EQ(1244, function->local_f32_count);
- EXPECT_EQ(1133, function->local_f64_count);
-
EXPECT_TRUE(function->exported);
- EXPECT_FALSE(function->external);
if (result.val) delete result.val;
}
@@ -384,46 +382,13 @@
EXPECT_OFF_END_FAILURE(data, 16, sizeof(data));
}
-
-TEST_F(WasmModuleVerifyTest, OneFunctionImported) {
- static const byte data[] = {
- SECTION(SIGNATURES, VOID_VOID_SIG_SIZE), 1,
- // sig#0 -------------------------------------------------------
- VOID_VOID_SIG, SECTION(FUNCTIONS, 6), 1,
- // func#0 ------------------------------------------------------
- kDeclFunctionImport, // no name, no locals, imported
- SIG_INDEX(0),
- };
-
- ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
- EXPECT_EQ(1, result.val->functions.size());
- WasmFunction* function = &result.val->functions.back();
-
- EXPECT_EQ(0, function->name_length);
- EXPECT_EQ(0, function->code_start_offset);
- EXPECT_EQ(0, function->code_end_offset);
-
- EXPECT_EQ(0, function->local_i32_count);
- EXPECT_EQ(0, function->local_i64_count);
- EXPECT_EQ(0, function->local_f32_count);
- EXPECT_EQ(0, function->local_f64_count);
-
- EXPECT_FALSE(function->exported);
- EXPECT_TRUE(function->external);
-
- if (result.val) delete result.val;
-}
-
TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody) {
- static const byte kCodeStartOffset = 40;
+ static const byte kCodeStartOffset = 38;
static const byte kCodeEndOffset = kCodeStartOffset + 1;
static const byte data[] = {
- SECTION(SIGNATURES, 3), 1,
- // sig#0 -------------------------------------------------------
- 0, 0, // void -> void
- SECTION(FUNCTIONS, 7), 1,
+ SIGNATURES_SECTION_VOID_VOID, // --
+ SECTION(OLD_FUNCTIONS, 7), 1,
// func#0 ------------------------------------------------------
0, // no name, no locals
0, 0, // signature index
@@ -432,7 +397,7 @@
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(1, result.val->functions.size());
WasmFunction* function = &result.val->functions.back();
@@ -440,86 +405,38 @@
EXPECT_EQ(kCodeStartOffset, function->code_start_offset);
EXPECT_EQ(kCodeEndOffset, function->code_end_offset);
- EXPECT_EQ(0, function->local_i32_count);
- EXPECT_EQ(0, function->local_i64_count);
- EXPECT_EQ(0, function->local_f32_count);
- EXPECT_EQ(0, function->local_f64_count);
-
EXPECT_FALSE(function->exported);
- EXPECT_FALSE(function->external);
if (result.val) delete result.val;
}
-
-TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody_WithLocals) {
- static const byte kCodeStartOffset = 48;
- static const byte kCodeEndOffset = kCodeStartOffset + 1;
-
- static const byte data[] = {
- SECTION(SIGNATURES, 3), 1,
- // sig#0 -------------------------------------------------------
- 0, 0, // void -> void
- SECTION(FUNCTIONS, 15), 1,
- // func#0 ------------------------------------------------------
- kDeclFunctionLocals, 0, 0, // signature index
- 1, 2, // local int32 count
- 3, 4, // local int64 count
- 5, 6, // local float32 count
- 7, 8, // local float64 count
- 1, 0, // body size
- kExprNop // body
- };
-
- ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
- EXPECT_EQ(1, result.val->functions.size());
- WasmFunction* function = &result.val->functions.back();
-
- EXPECT_EQ(0, function->name_length);
- EXPECT_EQ(kCodeStartOffset, function->code_start_offset);
- EXPECT_EQ(kCodeEndOffset, function->code_end_offset);
-
- EXPECT_EQ(513, function->local_i32_count);
- EXPECT_EQ(1027, function->local_i64_count);
- EXPECT_EQ(1541, function->local_f32_count);
- EXPECT_EQ(2055, function->local_f64_count);
-
- EXPECT_FALSE(function->exported);
- EXPECT_FALSE(function->external);
-
- if (result.val) delete result.val;
-}
-
-
TEST_F(WasmModuleVerifyTest, OneGlobalOneFunctionWithNopBodyOneDataSegment) {
- static const byte kCodeStartOffset = 75;
+ static const byte kNameOffset = 49;
+ static const byte kCodeStartOffset = 53;
static const byte kCodeEndOffset = kCodeStartOffset + 3;
- static const byte kDataSegmentSourceOffset = kCodeEndOffset + 20;
+ static const byte kDataSegmentSourceOffset = kCodeEndOffset + 22;
static const byte data[] = {
- SECTION(MEMORY, 3), 28, 28, 1,
// global#0 --------------------------------------------------
- SECTION(GLOBALS, 7), 1,
+ SECTION(GLOBALS, 4), 1,
0, // name length
kMemU8, // memory type
0, // exported
// sig#0 -----------------------------------------------------
- SECTION(SIGNATURES, 3), 1, 0, 0, // void -> void
+ SIGNATURES_SECTION_VOID_VOID,
// func#0 ----------------------------------------------------
- SECTION(FUNCTIONS, 20), 1, kDeclFunctionLocals | kDeclFunctionName, 0,
- 0, // signature index
- 2, 'h', 'i', // name
- 1, 2, // local int32 count
- 3, 4, // local int64 count
- 5, 6, // local float32 count
- 7, 8, // local float64 count
- 3, 0, // body size
- kExprNop, // func#0 body
- kExprNop, // func#0 body
- kExprNop, // func#0 body
+ SECTION(OLD_FUNCTIONS, 12), 1,
+ kDeclFunctionName, // --
+ SIG_INDEX(0), // signature index
+ 2, 'h', 'i', // name
+ 3, 0, // body size
+ kExprNop, // func#0 body
+ kExprNop, // func#0 body
+ kExprNop, // func#0 body
+ // memory section --------------------------------------------
+ SECTION(MEMORY, 3), 28, 28, 1,
// segment#0 -------------------------------------------------
- SECTION(DATA_SEGMENTS, 14), 1,
+ SECTION(DATA_SEGMENTS, 10), 1,
U32V_3(0x8b3ae), // dest addr
U32V_1(5), // source size
0, 1, 2, 3, 4, // data bytes
@@ -529,7 +446,7 @@
{
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(1, result.val->globals.size());
EXPECT_EQ(1, result.val->functions.size());
EXPECT_EQ(1, result.val->data_segments.size());
@@ -543,13 +460,12 @@
WasmFunction* function = &result.val->functions.back();
- EXPECT_EQ(63, function->name_offset);
+ EXPECT_EQ(kNameOffset, function->name_offset);
EXPECT_EQ(2, function->name_length);
EXPECT_EQ(kCodeStartOffset, function->code_start_offset);
EXPECT_EQ(kCodeEndOffset, function->code_end_offset);
EXPECT_FALSE(function->exported);
- EXPECT_FALSE(function->external);
WasmDataSegment* segment = &result.val->data_segments.back();
@@ -562,9 +478,8 @@
}
}
-
TEST_F(WasmModuleVerifyTest, OneDataSegment) {
- const byte kDataSegmentSourceOffset = 39;
+ const byte kDataSegmentSourceOffset = 30;
const byte data[] = {
SECTION(MEMORY, 3),
28,
@@ -582,7 +497,7 @@
{
EXPECT_VERIFIES(data);
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(0, result.val->globals.size());
EXPECT_EQ(0, result.val->functions.size());
EXPECT_EQ(1, result.val->data_segments.size());
@@ -600,17 +515,16 @@
EXPECT_OFF_END_FAILURE(data, 13, sizeof(data));
}
-
TEST_F(WasmModuleVerifyTest, TwoDataSegments) {
- const byte kDataSegment0SourceOffset = 39;
- const byte kDataSegment1SourceOffset = 39 + 8;
+ const byte kDataSegment0SourceOffset = 30;
+ const byte kDataSegment1SourceOffset = 30 + 8;
const byte data[] = {
SECTION(MEMORY, 3),
28,
28,
1,
- SECTION(DATA_SEGMENTS, 31),
+ SECTION(DATA_SEGMENTS, 23),
2, // segment count
U32V_3(0x7ffee), // #0: dest addr
U32V_1(4), // source size
@@ -634,7 +548,7 @@
{
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(0, result.val->globals.size());
EXPECT_EQ(0, result.val->functions.size());
EXPECT_EQ(2, result.val->data_segments.size());
@@ -670,7 +584,7 @@
mem_pages,
mem_pages,
1,
- SECTION(DATA_SEGMENTS, 14),
+ SECTION(DATA_SEGMENTS, 8),
1,
U32V_3(dest_addr),
U32V_1(source_size),
@@ -687,21 +601,18 @@
}
}
-
-// To make below tests for indirect calls much shorter.
-#define FUNCTION(sig_index, external) kDeclFunctionImport, SIG_INDEX(sig_index)
-
TEST_F(WasmModuleVerifyTest, OneIndirectFunction) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
- SECTION(SIGNATURES, 3), 1, 0, 0, // void -> void
+ SIGNATURES_SECTION_VOID_VOID,
// func#0 ------------------------------------------------------
- SECTION(FUNCTIONS, 4), 1, FUNCTION(0, 0),
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION), 1, // --
+ EMPTY_FUNCTION(0),
// indirect table ----------------------------------------------
SECTION(FUNCTION_TABLE, 2), 1, U32V_1(0)};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
if (result.ok()) {
EXPECT_EQ(1, result.val->signatures.size());
EXPECT_EQ(1, result.val->functions.size());
@@ -711,17 +622,19 @@
if (result.val) delete result.val;
}
-
TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
- SECTION(SIGNATURES, 5), 2, 0, 0, // void -> void
- 0, kLocalI32, // void -> i32
+ SECTION(SIGNATURES, 1 + SIZEOF_SIG_ENTRY_v_v + SIZEOF_SIG_ENTRY_v_x),
+ 2, // --
+ SIG_ENTRY_v_v, // void -> void
+ SIG_ENTRY_v_x(kLocalI32), // void -> i32
// func#0 ------------------------------------------------------
- SECTION(FUNCTIONS, 13), 4, FUNCTION(0, 1), // --
- FUNCTION(1, 1), // --
- FUNCTION(0, 1), // --
- FUNCTION(1, 1), // --
+ SECTION(OLD_FUNCTIONS, 1 + 4 * SIZEOF_EMPTY_FUNCTION), 4, // --
+ EMPTY_FUNCTION(0), // --
+ EMPTY_FUNCTION(1), // --
+ EMPTY_FUNCTION(0), // --
+ EMPTY_FUNCTION(1), // --
// indirect table ----------------------------------------------
SECTION(FUNCTION_TABLE, 9), 8,
U32V_1(0), // --
@@ -735,7 +648,7 @@
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
if (result.ok()) {
EXPECT_EQ(2, result.val->signatures.size());
EXPECT_EQ(4, result.val->functions.size());
@@ -747,11 +660,10 @@
if (result.val) delete result.val;
}
-
TEST_F(WasmModuleVerifyTest, IndirectFunctionNoFunctions) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
- SECTION(SIGNATURES, 3), 1, 0, 0, // void -> void
+ SIGNATURES_SECTION_VOID_VOID,
// indirect table ----------------------------------------------
SECTION(FUNCTION_TABLE, 3), 1, 0, 0,
};
@@ -759,13 +671,13 @@
EXPECT_FAILURE(data);
}
-
TEST_F(WasmModuleVerifyTest, IndirectFunctionInvalidIndex) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
- SECTION(SIGNATURES, 3), 1, 0, 0, // void -> void
+ SIGNATURES_SECTION_VOID_VOID,
// functions ---------------------------------------------------
- SECTION(FUNCTIONS, 4), 1, FUNCTION(0, 1),
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION), 1, // --
+ EMPTY_FUNCTION(0),
// indirect table ----------------------------------------------
SECTION(FUNCTION_TABLE, 3), 1, 1, 0,
};
@@ -773,12 +685,10 @@
EXPECT_FAILURE(data);
}
-
class WasmSignatureDecodeTest : public TestWithZone {};
-
TEST_F(WasmSignatureDecodeTest, Ok_v_v) {
- static const byte data[] = {0, 0};
+ static const byte data[] = {SIG_ENTRY_v_v};
base::AccountingAllocator allocator;
Zone zone(&allocator);
FunctionSig* sig =
@@ -789,11 +699,10 @@
EXPECT_EQ(0, sig->return_count());
}
-
TEST_F(WasmSignatureDecodeTest, Ok_t_v) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair ret_type = kLocalTypes[i];
- const byte data[] = {0, ret_type.code};
+ const byte data[] = {SIG_ENTRY_x(ret_type.code)};
FunctionSig* sig =
DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
@@ -804,11 +713,10 @@
}
}
-
TEST_F(WasmSignatureDecodeTest, Ok_v_t) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair param_type = kLocalTypes[i];
- const byte data[] = {1, 0, param_type.code};
+ const byte data[] = {SIG_ENTRY_v_x(param_type.code)};
FunctionSig* sig =
DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
@@ -819,15 +727,12 @@
}
}
-
TEST_F(WasmSignatureDecodeTest, Ok_t_t) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair ret_type = kLocalTypes[i];
for (size_t j = 0; j < arraysize(kLocalTypes); j++) {
LocalTypePair param_type = kLocalTypes[j];
- const byte data[] = {1, // param count
- ret_type.code, // ret
- param_type.code}; // param
+ const byte data[] = {SIG_ENTRY_x_x(ret_type.code, param_type.code)};
FunctionSig* sig =
DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
@@ -840,16 +745,13 @@
}
}
-
TEST_F(WasmSignatureDecodeTest, Ok_i_tt) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair p0_type = kLocalTypes[i];
for (size_t j = 0; j < arraysize(kLocalTypes); j++) {
LocalTypePair p1_type = kLocalTypes[j];
- const byte data[] = {2, // param count
- kLocalI32, // ret
- p0_type.code, // p0
- p1_type.code}; // p1
+ const byte data[] = {
+ SIG_ENTRY_x_xx(kLocalI32, p0_type.code, p1_type.code)};
FunctionSig* sig =
DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
@@ -862,7 +764,6 @@
}
}
-
TEST_F(WasmSignatureDecodeTest, Fail_off_end) {
byte data[256];
for (int p = 0; p <= 255; p = p + 1 + p * 3) {
@@ -877,11 +778,10 @@
}
}
-
TEST_F(WasmSignatureDecodeTest, Fail_invalid_type) {
byte kInvalidType = 76;
- for (int i = 1; i < 3; i++) {
- byte data[] = {2, kLocalI32, kLocalI32, kLocalI32};
+ for (size_t i = 0; i < SIZEOF_SIG_ENTRY_x_xx; i++) {
+ byte data[] = {SIG_ENTRY_x_xx(kLocalI32, kLocalI32, kLocalI32)};
data[i] = kInvalidType;
FunctionSig* sig =
DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
@@ -889,46 +789,56 @@
}
}
-
-TEST_F(WasmSignatureDecodeTest, Fail_invalid_param_type) {
- static const int kParamCount = 3;
- for (int i = 0; i < kParamCount; i++) {
- byte data[] = {kParamCount, kLocalI32, kLocalI32, kLocalI32, kLocalI32};
- data[i + 2] = kLocalVoid;
- FunctionSig* sig =
- DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
- EXPECT_EQ(nullptr, sig);
- }
+TEST_F(WasmSignatureDecodeTest, Fail_invalid_ret_type1) {
+ static const byte data[] = {SIG_ENTRY_x_x(kLocalVoid, kLocalI32)};
+ FunctionSig* sig =
+ DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
+ EXPECT_EQ(nullptr, sig);
}
+TEST_F(WasmSignatureDecodeTest, Fail_invalid_param_type1) {
+ static const byte data[] = {SIG_ENTRY_x_x(kLocalI32, kLocalVoid)};
+ FunctionSig* sig =
+ DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
+ EXPECT_EQ(nullptr, sig);
+}
-class WasmFunctionVerifyTest : public TestWithZone {};
+TEST_F(WasmSignatureDecodeTest, Fail_invalid_param_type2) {
+ static const byte data[] = {SIG_ENTRY_x_xx(kLocalI32, kLocalI32, kLocalVoid)};
+ FunctionSig* sig =
+ DecodeWasmSignatureForTesting(zone(), data, data + arraysize(data));
+ EXPECT_EQ(nullptr, sig);
+}
+class WasmFunctionVerifyTest : public TestWithIsolateAndZone {};
TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
static const byte data[] = {
- 0, kLocalVoid, // signature
- 4, // locals
- 3, kLocalI32, // --
- 4, kLocalI64, // --
- 5, kLocalF32, // --
- 6, kLocalF64, // --
- kExprNop // body
+ SIG_ENTRY_v_v, // signature entry
+ 4, // locals
+ 3,
+ kLocalI32, // --
+ 4,
+ kLocalI64, // --
+ 5,
+ kLocalF32, // --
+ 6,
+ kLocalF64, // --
+ kExprNop // body
};
- FunctionResult result = DecodeWasmFunction(nullptr, zone(), nullptr, data,
+ FunctionResult result = DecodeWasmFunction(isolate(), zone(), nullptr, data,
data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
if (result.val && result.ok()) {
WasmFunction* function = result.val;
EXPECT_EQ(0, function->sig->parameter_count());
EXPECT_EQ(0, function->sig->return_count());
EXPECT_EQ(0, function->name_offset);
- EXPECT_EQ(2, function->code_start_offset);
+ EXPECT_EQ(SIZEOF_SIG_ENTRY_v_v, function->code_start_offset);
EXPECT_EQ(arraysize(data), function->code_end_offset);
// TODO(titzer): verify encoding of local declarations
- EXPECT_FALSE(function->external);
EXPECT_FALSE(function->exported);
}
@@ -942,47 +852,51 @@
TEST_F(WasmModuleVerifyTest, TheLoneliestOfValidModulesTheTrulyEmptyOne) {
const byte data[] = {
- 1, // Section size.
0, // Empty section name.
// No section name, no content, nothing but sadness.
+ 0, // No section content.
};
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, OnlyUnknownSectionEmpty) {
const byte data[] = {
- 5, // Section size.
- 4, 'l', 'u', 'l', 'z', // unknown section.
+ UNKNOWN_SECTION_NAME, 0,
};
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, OnlyUnknownSectionNonEmpty) {
const byte data[] = {
- 10, // Section size.
- 4, 'l', 'u', 'l', 'z', // unknown section.
- // Section content:
- 0xff, 0xff, 0xff, 0xff, 0xff,
+ UNKNOWN_SECTION_NAME,
+ 5, // section size
+ 0xff,
+ 0xff,
+ 0xff,
+ 0xff,
+ 0xff, // section data
};
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, SignatureFollowedByEmptyUnknownSection) {
const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE), 1, VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
// -----------------------------------------------------------
- 5, // Section size.
- 4, 'l', 'u', 'l', 'z', // unknown section.
+ UNKNOWN_SECTION_NAME,
+ 0 // empty section
};
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, SignatureFollowedByUnknownSection) {
const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE), 1, VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
// -----------------------------------------------------------
- 10, // Section size.
- 4, 'l', 'u', 'l', 'z', // unknown section.
+ UNKNOWN_SECTION_NAME,
+ 5, // section size
0xff, 0xff, 0xff, 0xff, 0xff,
};
EXPECT_VERIFIES(data);
@@ -990,29 +904,46 @@
TEST_F(WasmModuleVerifyTest, SignatureFollowedByUnknownSectionWithLongLEB) {
const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE), 1, VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
// -----------------------------------------------------------
- 0x85, 0x80, 0x80, 0x80, 0x00, // Section size: 1 but in a 5-byte LEB.
- 4, 'l', 'u', 'l', 'z', // unknown section.
+ UNKNOWN_SECTION_NAME, 0x81, 0x80, 0x80, 0x80,
+ 0x00, // section size: 1 but in a 5-byte LEB
+ 0,
};
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, UnknownSectionOverflow) {
static const byte data[] = {
- 13, // Section size.
- 1, // Section name length.
- '\0', // Section name.
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, // 10 byte section
+ UNKNOWN_EMPTY_SECTION_NAME,
+ 9, // section size
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10, // 10 byte section
};
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, UnknownSectionUnderflow) {
static const byte data[] = {
- 0xff, 0xff, 0xff, 0xff, 0x0f, // Section size LEB128 0xffffffff
- 1, '\0', // Section name and name length.
- 1, 2, 3, 4, // 4 byte section
+ UNKNOWN_EMPTY_SECTION_NAME,
+ 0xff,
+ 0xff,
+ 0xff,
+ 0xff,
+ 0x0f, // Section size LEB128 0xffffffff
+ 1,
+ 2,
+ 3,
+ 4, // 4 byte section
};
EXPECT_FAILURE(data);
}
@@ -1020,27 +951,33 @@
TEST_F(WasmModuleVerifyTest, UnknownSectionLoop) {
// Would infinite loop decoding if wrapping and allowed.
static const byte data[] = {
- 0xfa, 0xff, 0xff, 0xff, 0x0f, // Section size LEB128 0xfffffffa
- 1, '\0', // Section name and name length.
- 1, 2, 3, 4, // 4 byte section
+ UNKNOWN_EMPTY_SECTION_NAME,
+ 1,
+ 2,
+ 3,
+ 4, // 4 byte section
+ 0xfa,
+ 0xff,
+ 0xff,
+ 0xff,
+ 0x0f, // Section size LEB128 0xfffffffa
};
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, UnknownSectionSkipped) {
static const byte data[] = {
- 3, // Section size.
- 1,
- '\0', // Section name: LEB128 1, string '\0'
- 0, // one byte section
- SECTION(GLOBALS, 7),
+ UNKNOWN_EMPTY_SECTION_NAME,
+ 1, // section size
+ 0, // one byte section
+ SECTION(GLOBALS, 4),
1,
0, // name length
kMemI32, // memory type
0, // exported
};
ModuleResult result = DecodeModule(data, data + arraysize(data));
- EXPECT_TRUE(result.ok());
+ EXPECT_OK(result);
EXPECT_EQ(1, result.val->globals.size());
EXPECT_EQ(0, result.val->functions.size());
@@ -1062,26 +999,36 @@
EXPECT_VERIFIES(data);
}
-TEST_F(WasmModuleVerifyTest, ImportTable_nosigs) {
+TEST_F(WasmModuleVerifyTest, ImportTable_nosigs1) {
static const byte data[] = {SECTION(IMPORT_TABLE, 1), 0};
+ EXPECT_VERIFIES(data);
+}
+
+TEST_F(WasmModuleVerifyTest, ImportTable_nosigs2) {
+ static const byte data[] = {
+ SECTION(IMPORT_TABLE, 6), 1, // sig table
+ IMPORT_SIG_INDEX(0), // sig index
+ NAME_LENGTH(1), 'm', // module name
+ NAME_LENGTH(1), 'f', // function name
+ };
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, ImportTable_invalid_sig) {
static const byte data[] = {
- SECTION(SIGNATURES, 1), 0, SECTION(IMPORT_TABLE, 6), 1,
- IMPORT_SIG_INDEX(0), // sig index
- NAME_LENGTH(1), 'm', // module name
- NAME_LENGTH(1), 'f', // function name
+ SECTION(SIGNATURES, 1), 0, // --
+ SECTION(IMPORT_TABLE, 6), 1, // --
+ IMPORT_SIG_INDEX(0), // sig index
+ NAME_LENGTH(1), 'm', // module name
+ NAME_LENGTH(1), 'f', // function name
};
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, ImportTable_one_sig) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1,
- VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
SECTION(IMPORT_TABLE, 6),
1, // --
IMPORT_SIG_INDEX(0), // sig index
@@ -1095,9 +1042,8 @@
TEST_F(WasmModuleVerifyTest, ImportTable_invalid_module) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1,
- VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
SECTION(IMPORT_TABLE, 6),
1, // --
IMPORT_SIG_INDEX(0), // sig index
@@ -1110,9 +1056,8 @@
TEST_F(WasmModuleVerifyTest, ImportTable_off_end) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1,
- VOID_VOID_SIG,
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
SECTION(IMPORT_TABLE, 6),
1,
IMPORT_SIG_INDEX(0), // sig index
@@ -1126,28 +1071,31 @@
}
TEST_F(WasmModuleVerifyTest, ExportTable_empty1) {
- static const byte data[] = {SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1,
- VOID_VOID_SIG,
- SECTION(FUNCTIONS, 1 + EMPTY_FUNCTION_SIZE),
- 1,
- EMPTY_FUNCTION(0),
- SECTION(EXPORT_TABLE, 1),
- 0};
+ static const byte data[] = {
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION),
+ 1,
+ EMPTY_FUNCTION(0),
+ SECTION(EXPORT_TABLE, 1),
+ 0 // --
+ };
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, ExportTable_empty2) {
- static const byte data[] = {SECTION(SIGNATURES, 1), 0,
- SECTION(FUNCTIONS, 1), 0,
- SECTION(EXPORT_TABLE, 1), 0};
+ static const byte data[] = {
+ SECTION(SIGNATURES, 1), 0, SECTION(OLD_FUNCTIONS, 1), 0,
+ SECTION(EXPORT_TABLE, 1), 0 // --
+ };
// TODO(titzer): current behavior treats empty functions section as missing.
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, ExportTable_NoFunctions1) {
- static const byte data[] = {SECTION(SIGNATURES, 1), 0,
- SECTION(EXPORT_TABLE, 1), 0};
+ static const byte data[] = {
+ SECTION(SIGNATURES, 1), 0, SECTION(EXPORT_TABLE, 1), 0 // --
+ };
EXPECT_FAILURE(data);
}
@@ -1158,13 +1106,12 @@
TEST_F(WasmModuleVerifyTest, ExportTableOne) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1, // sigs
- VOID_VOID_SIG, // --
- SECTION(FUNCTIONS, 1 + EMPTY_FUNCTION_SIZE),
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION),
1, // functions
EMPTY_FUNCTION(0), // --
- SECTION(EXPORT_TABLE, 7),
+ SECTION(EXPORT_TABLE, 3),
1, // exports
FUNC_INDEX(0), // --
NO_NAME // --
@@ -1174,10 +1121,9 @@
TEST_F(WasmModuleVerifyTest, ExportTableTwo) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1, // sigs
- VOID_VOID_SIG, // --
- SECTION(FUNCTIONS, 1 + EMPTY_FUNCTION_SIZE),
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION),
1, // functions
EMPTY_FUNCTION(0), // --
SECTION(EXPORT_TABLE, 12),
@@ -1199,10 +1145,9 @@
TEST_F(WasmModuleVerifyTest, ExportTableThree) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1, // sigs
- VOID_VOID_SIG, // --
- SECTION(FUNCTIONS, 1 + 3 * EMPTY_FUNCTION_SIZE),
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + 3 * SIZEOF_EMPTY_FUNCTION),
3, // functions
EMPTY_FUNCTION(0), // --
EMPTY_FUNCTION(0), // --
@@ -1225,10 +1170,9 @@
TEST_F(WasmModuleVerifyTest, ExportTableThreeOne) {
for (int i = 0; i < 6; i++) {
const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1, // sigs
- VOID_VOID_SIG, // --
- SECTION(FUNCTIONS, 1 + 3 * EMPTY_FUNCTION_SIZE),
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + 3 * SIZEOF_EMPTY_FUNCTION),
3, // functions
EMPTY_FUNCTION(0), // --
EMPTY_FUNCTION(0), // --
@@ -1251,10 +1195,9 @@
TEST_F(WasmModuleVerifyTest, ExportTableOne_off_end) {
static const byte data[] = {
- SECTION(SIGNATURES, 1 + VOID_VOID_SIG_SIZE),
- 1, // sigs
- VOID_VOID_SIG, // --
- SECTION(FUNCTIONS, 1 + EMPTY_FUNCTION_SIZE),
+ // signatures
+ SIGNATURES_SECTION_VOID_VOID,
+ SECTION(OLD_FUNCTIONS, 1 + SIZEOF_EMPTY_FUNCTION),
1, // functions
EMPTY_FUNCTION(0), // --
SECTION(EXPORT_TABLE, 1 + 6),
@@ -1270,67 +1213,68 @@
}
}
-#define SIGNATURES_SECTION(count, ...) \
- SECTION(SIGNATURES, 1 + 3 * (count)), U32V_1(count), __VA_ARGS__
-#define FUNCTION_SIGNATURES_SECTION(count, ...) \
- SECTION(FUNCTION_SIGNATURES, 1 + (count)), U32V_1(count), __VA_ARGS__
-
-#define FOO_STRING 3, 'f', 'o', 'o'
-#define NO_LOCAL_NAMES 0
-
-#define EMPTY_SIGNATURES_SECTION SECTION(SIGNATURES, 1), 0
-#define EMPTY_FUNCTION_SIGNATURES_SECTION SECTION(FUNCTION_SIGNATURES, 1), 0
-#define EMPTY_FUNCTION_BODIES_SECTION SECTION(FUNCTION_BODIES, 1), 0
-#define EMPTY_NAMES_SECTION SECTION(NAMES, 1), 0
-
TEST_F(WasmModuleVerifyTest, FunctionSignatures_empty) {
- static const byte data[] = {SECTION(SIGNATURES, 1), 0,
- SECTION(FUNCTION_SIGNATURES, 1), 0};
+ static const byte data[] = {
+ SECTION(SIGNATURES, 1), 0, // --
+ SECTION(FUNCTION_SIGNATURES, 1), 0 // --
+ }; // --
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, FunctionSignatures_one) {
- static const byte data[] = {SIGNATURES_SECTION(1, VOID_VOID_SIG),
- FUNCTION_SIGNATURES_SECTION(1, 0)};
+ static const byte data[] = {
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(1, 0) // --
+ };
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, FunctionBodies_empty) {
- static const byte data[] = {EMPTY_SIGNATURES_SECTION,
- EMPTY_FUNCTION_SIGNATURES_SECTION,
- EMPTY_FUNCTION_BODIES_SECTION};
+ static const byte data[] = {
+ EMPTY_SIGNATURES_SECTION, // --
+ EMPTY_FUNCTION_SIGNATURES_SECTION, // --
+ EMPTY_FUNCTION_BODIES_SECTION // --
+ };
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, FunctionBodies_one_empty) {
static const byte data[] = {
- SIGNATURES_SECTION(1, VOID_VOID_SIG), FUNCTION_SIGNATURES_SECTION(1, 0),
- SECTION(FUNCTION_BODIES, 1 + EMPTY_BODY_SIZE), 1, EMPTY_BODY};
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(1, 0), // --
+ SECTION(FUNCTION_BODIES, 1 + SIZEOF_EMPTY_BODY), 1, EMPTY_BODY // --
+ };
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, FunctionBodies_one_nop) {
static const byte data[] = {
- SIGNATURES_SECTION(1, VOID_VOID_SIG), FUNCTION_SIGNATURES_SECTION(1, 0),
- SECTION(FUNCTION_BODIES, 1 + NOP_BODY_SIZE), 1, NOP_BODY};
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(1, 0), // --
+ SECTION(FUNCTION_BODIES, 1 + SIZEOF_NOP_BODY), 1, NOP_BODY // --
+ };
EXPECT_VERIFIES(data);
}
TEST_F(WasmModuleVerifyTest, FunctionBodies_count_mismatch1) {
- static const byte data[] = {SIGNATURES_SECTION(1, VOID_VOID_SIG),
- FUNCTION_SIGNATURES_SECTION(2, 0, 0),
- SECTION(FUNCTION_BODIES, 1 + EMPTY_BODY_SIZE), 1,
- EMPTY_BODY};
+ static const byte data[] = {
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(2, 0, 0), // --
+ SECTION(FUNCTION_BODIES, 1 + SIZEOF_EMPTY_BODY), 1, // --
+ EMPTY_BODY // --
+ };
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, FunctionBodies_count_mismatch2) {
- static const byte data[] = {SIGNATURES_SECTION(1, VOID_VOID_SIG),
- FUNCTION_SIGNATURES_SECTION(1, 0),
- SECTION(FUNCTION_BODIES, 1 + 2 * NOP_BODY_SIZE),
- 2,
- NOP_BODY,
- NOP_BODY};
+ static const byte data[] = {
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(1, 0), // --
+ SECTION(FUNCTION_BODIES, 1 + 2 * SIZEOF_NOP_BODY), // --
+ 2, // --
+ NOP_BODY, // --
+ NOP_BODY // --
+ };
EXPECT_FAILURE(data);
}
@@ -1343,9 +1287,9 @@
TEST_F(WasmModuleVerifyTest, Names_one_empty) {
static const byte data[] = {
- SIGNATURES_SECTION(1, VOID_VOID_SIG), // --
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
FUNCTION_SIGNATURES_SECTION(1, 0), // --
- SECTION(FUNCTION_BODIES, 1 + EMPTY_BODY_SIZE),
+ SECTION(FUNCTION_BODIES, 1 + SIZEOF_EMPTY_BODY),
1,
EMPTY_BODY, // --
SECTION(NAMES, 1 + 5),
@@ -1358,9 +1302,9 @@
TEST_F(WasmModuleVerifyTest, Names_two_empty) {
static const byte data[] = {
- SIGNATURES_SECTION(1, VOID_VOID_SIG), // --
- FUNCTION_SIGNATURES_SECTION(2, 0, 0), // --
- SECTION(FUNCTION_BODIES, 1 + 2 * EMPTY_BODY_SIZE), // --
+ SIGNATURES_SECTION(1, SIG_ENTRY_v_v), // --
+ FUNCTION_SIGNATURES_SECTION(2, 0, 0), // --
+ SECTION(FUNCTION_BODIES, 1 + 2 * SIZEOF_EMPTY_BODY), // --
2,
EMPTY_BODY,
EMPTY_BODY, // --
diff --git a/test/unittests/wasm/switch-logic-unittest.cc b/test/unittests/wasm/switch-logic-unittest.cc
new file mode 100644
index 0000000..be587c2
--- /dev/null
+++ b/test/unittests/wasm/switch-logic-unittest.cc
@@ -0,0 +1,89 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/wasm/switch-logic.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+class SwitchLogicTest : public TestWithZone {};
+
+void CheckNodeValues(CaseNode* node, int begin, int end) {
+ CHECK_EQ(node->begin, begin);
+ CHECK_EQ(node->end, end);
+}
+
+TEST_F(SwitchLogicTest, Single_Table_Test) {
+ ZoneVector<int> values(zone());
+ values.push_back(14);
+ values.push_back(12);
+ values.push_back(15);
+ values.push_back(19);
+ values.push_back(18);
+ values.push_back(16);
+ CaseNode* root = OrderCases(&values, zone());
+ CHECK_NULL(root->left);
+ CHECK_NULL(root->right);
+ CheckNodeValues(root, 12, 19);
+}
+
+TEST_F(SwitchLogicTest, Balanced_Tree_Test) {
+ ZoneVector<int> values(zone());
+ values.push_back(5);
+ values.push_back(1);
+ values.push_back(6);
+ values.push_back(9);
+ values.push_back(-4);
+ CaseNode* root = OrderCases(&values, zone());
+ CheckNodeValues(root, 5, 5);
+ CheckNodeValues(root->left, -4, -4);
+ CHECK_NULL(root->left->left);
+ CheckNodeValues(root->left->right, 1, 1);
+ CHECK_NULL(root->left->right->left);
+ CHECK_NULL(root->left->right->right);
+ CheckNodeValues(root->right, 6, 6);
+ CHECK_NULL(root->right->left);
+ CheckNodeValues(root->right->right, 9, 9);
+ CHECK_NULL(root->right->right->left);
+ CHECK_NULL(root->right->right->right);
+}
+
+TEST_F(SwitchLogicTest, Hybrid_Test) {
+ ZoneVector<int> values(zone());
+ values.push_back(1);
+ values.push_back(2);
+ values.push_back(3);
+ values.push_back(4);
+ values.push_back(7);
+ values.push_back(10);
+ values.push_back(11);
+ values.push_back(12);
+ values.push_back(13);
+ values.push_back(16);
+ CaseNode* root = OrderCases(&values, zone());
+ CheckNodeValues(root, 7, 7);
+ CheckNodeValues(root->left, 1, 4);
+ CheckNodeValues(root->right, 10, 13);
+ CheckNodeValues(root->right->right, 16, 16);
+}
+
+TEST_F(SwitchLogicTest, Single_Case) {
+ ZoneVector<int> values(zone());
+ values.push_back(3);
+ CaseNode* root = OrderCases(&values, zone());
+ CheckNodeValues(root, 3, 3);
+ CHECK_NULL(root->left);
+ CHECK_NULL(root->right);
+}
+
+TEST_F(SwitchLogicTest, Empty_Case) {
+ ZoneVector<int> values(zone());
+ CaseNode* root = OrderCases(&values, zone());
+ CHECK_NULL(root);
+}
+
+} // namespace wasm
+} // namespace internal
+} // namespace v8
diff --git a/test/unittests/wasm/wasm-macro-gen-unittest.cc b/test/unittests/wasm/wasm-macro-gen-unittest.cc
index ec188c0..1058993 100644
--- a/test/unittests/wasm/wasm-macro-gen-unittest.cc
+++ b/test/unittests/wasm/wasm-macro-gen-unittest.cc
@@ -18,7 +18,6 @@
EXPECT_EQ(size, sizeof(code)); \
} while (false)
-
TEST_F(WasmMacroGenTest, Constants) {
EXPECT_SIZE(2, WASM_ONE);
EXPECT_SIZE(2, WASM_ZERO);
@@ -48,7 +47,6 @@
EXPECT_SIZE(9, WASM_F64(-9818934.0));
}
-
TEST_F(WasmMacroGenTest, Statements) {
EXPECT_SIZE(1, WASM_NOP);
@@ -58,9 +56,9 @@
EXPECT_SIZE(7, WASM_STORE_MEM(MachineType::Int32(), WASM_ZERO, WASM_ZERO));
- EXPECT_SIZE(4, WASM_IF(WASM_ZERO, WASM_NOP));
+ EXPECT_SIZE(5, WASM_IF(WASM_ZERO, WASM_NOP));
- EXPECT_SIZE(5, WASM_IF_ELSE(WASM_ZERO, WASM_NOP, WASM_NOP));
+ EXPECT_SIZE(7, WASM_IF_ELSE(WASM_ZERO, WASM_NOP, WASM_NOP));
EXPECT_SIZE(5, WASM_SELECT(WASM_ZERO, WASM_NOP, WASM_NOP));
@@ -79,16 +77,14 @@
EXPECT_SIZE(5, WASM_LOOP(1, WASM_BR(0)));
EXPECT_SIZE(7, WASM_LOOP(1, WASM_BR_IF(0, WASM_ZERO)));
- EXPECT_SIZE(1, WASM_RETURN0);
- EXPECT_SIZE(3, WASM_RETURN(WASM_ZERO));
- EXPECT_SIZE(5, WASM_RETURN(WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(2, WASM_RETURN0);
+ EXPECT_SIZE(4, WASM_RETURN1(WASM_ZERO));
EXPECT_SIZE(1, WASM_UNREACHABLE);
}
-
TEST_F(WasmMacroGenTest, MacroStatements) {
- EXPECT_SIZE(8, WASM_WHILE(WASM_I8(0), WASM_NOP));
+ EXPECT_SIZE(10, WASM_WHILE(WASM_I8(0), WASM_NOP));
EXPECT_SIZE(7, WASM_INC_LOCAL(0));
EXPECT_SIZE(7, WASM_INC_LOCAL_BY(0, 3));
@@ -97,10 +93,10 @@
}
TEST_F(WasmMacroGenTest, BrTable) {
- EXPECT_SIZE(8, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1)));
+ EXPECT_SIZE(9, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1)));
+ EXPECT_SIZE(11, WASM_BR_TABLEV(WASM_ZERO, WASM_ZERO, 1, BR_TARGET(1)));
}
-
TEST_F(WasmMacroGenTest, Expressions) {
EXPECT_SIZE(2, WASM_GET_LOCAL(0));
EXPECT_SIZE(2, WASM_GET_LOCAL(1));
@@ -114,8 +110,8 @@
EXPECT_SIZE(3, WASM_NOT(WASM_ZERO));
- EXPECT_SIZE(4, WASM_BRV(1, WASM_ZERO));
- EXPECT_SIZE(6, WASM_BRV_IF(1, WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_BRV(1, WASM_ZERO));
+ EXPECT_SIZE(7, WASM_BRV_IF(1, WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(4, WASM_BLOCK(1, WASM_ZERO));
EXPECT_SIZE(5, WASM_BLOCK(2, WASM_NOP, WASM_ZERO));
@@ -127,33 +123,32 @@
}
TEST_F(WasmMacroGenTest, CallFunction) {
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(0));
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(1));
- EXPECT_SIZE(2, WASM_CALL_FUNCTION0(11));
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(0));
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(1));
+ EXPECT_SIZE(3, WASM_CALL_FUNCTION0(11));
- EXPECT_SIZE(4, WASM_CALL_FUNCTION(0, WASM_ZERO));
- EXPECT_SIZE(6, WASM_CALL_FUNCTION(1, WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_CALL_FUNCTION1(0, WASM_ZERO));
+ EXPECT_SIZE(7, WASM_CALL_FUNCTION2(1, WASM_ZERO, WASM_ZERO));
}
TEST_F(WasmMacroGenTest, CallImport) {
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(0));
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(1));
- EXPECT_SIZE(2, WASM_CALL_IMPORT0(11));
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(0));
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(1));
+ EXPECT_SIZE(3, WASM_CALL_IMPORT0(11));
- EXPECT_SIZE(4, WASM_CALL_IMPORT(0, WASM_ZERO));
- EXPECT_SIZE(6, WASM_CALL_IMPORT(1, WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_CALL_IMPORT1(0, WASM_ZERO));
+ EXPECT_SIZE(7, WASM_CALL_IMPORT2(1, WASM_ZERO, WASM_ZERO));
}
TEST_F(WasmMacroGenTest, CallIndirect) {
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(0, WASM_ZERO));
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(1, WASM_ZERO));
- EXPECT_SIZE(4, WASM_CALL_INDIRECT0(11, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(0, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(1, WASM_ZERO));
+ EXPECT_SIZE(5, WASM_CALL_INDIRECT0(11, WASM_ZERO));
- EXPECT_SIZE(6, WASM_CALL_INDIRECT(0, WASM_ZERO, WASM_ZERO));
- EXPECT_SIZE(8, WASM_CALL_INDIRECT(1, WASM_ZERO, WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(7, WASM_CALL_INDIRECT1(0, WASM_ZERO, WASM_ZERO));
+ EXPECT_SIZE(9, WASM_CALL_INDIRECT2(1, WASM_ZERO, WASM_ZERO, WASM_ZERO));
}
-
TEST_F(WasmMacroGenTest, Int32Ops) {
EXPECT_SIZE(5, WASM_I32_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_I32_SUB(WASM_ZERO, WASM_ZERO));
@@ -189,7 +184,6 @@
EXPECT_SIZE(3, WASM_I32_EQZ(WASM_ZERO));
}
-
TEST_F(WasmMacroGenTest, Int64Ops) {
EXPECT_SIZE(5, WASM_I64_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_I64_SUB(WASM_ZERO, WASM_ZERO));
@@ -225,7 +219,6 @@
EXPECT_SIZE(3, WASM_I64_EQZ(WASM_ZERO));
}
-
TEST_F(WasmMacroGenTest, Float32Ops) {
EXPECT_SIZE(5, WASM_F32_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_F32_SUB(WASM_ZERO, WASM_ZERO));
@@ -250,7 +243,6 @@
EXPECT_SIZE(5, WASM_F32_GE(WASM_ZERO, WASM_ZERO));
}
-
TEST_F(WasmMacroGenTest, Float64Ops) {
EXPECT_SIZE(5, WASM_F64_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_F64_SUB(WASM_ZERO, WASM_ZERO));
@@ -275,7 +267,6 @@
EXPECT_SIZE(5, WASM_F64_GE(WASM_ZERO, WASM_ZERO));
}
-
TEST_F(WasmMacroGenTest, Conversions) {
EXPECT_SIZE(3, WASM_I32_SCONVERT_F32(WASM_ZERO));
EXPECT_SIZE(3, WASM_I32_SCONVERT_F64(WASM_ZERO));
@@ -317,7 +308,6 @@
}
}
-
TEST_F(WasmMacroGenTest, LoadsAndStoresWithOffset) {
for (size_t i = 0; i < arraysize(kMemTypes); i++) {
EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO));
diff --git a/test/webkit/class-constructor-return.js b/test/webkit/class-constructor-return.js
index 6eb72ad..3691928 100644
--- a/test/webkit/class-constructor-return.js
+++ b/test/webkit/class-constructor-return.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class constructor return values');
// ES6
diff --git a/test/webkit/class-syntax-call.js b/test/webkit/class-syntax-call.js
index fa32a8c..747b0eb 100644
--- a/test/webkit/class-syntax-call.js
+++ b/test/webkit/class-syntax-call.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for calling the constructors of ES6 classes');
class A { constructor() {} };
diff --git a/test/webkit/class-syntax-declaration.js b/test/webkit/class-syntax-declaration.js
index 3c9aed7..775a335 100644
--- a/test/webkit/class-syntax-declaration.js
+++ b/test/webkit/class-syntax-declaration.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax declarations');
var constructorCallCount = 0;
diff --git a/test/webkit/class-syntax-default-constructor.js b/test/webkit/class-syntax-default-constructor.js
index 1695f6a..2772108 100644
--- a/test/webkit/class-syntax-default-constructor.js
+++ b/test/webkit/class-syntax-default-constructor.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax default constructor');
class A { };
diff --git a/test/webkit/class-syntax-expression.js b/test/webkit/class-syntax-expression.js
index 3272b81..ab6dc0e 100644
--- a/test/webkit/class-syntax-expression.js
+++ b/test/webkit/class-syntax-expression.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax expressions');
var constructorCallCount = 0;
diff --git a/test/webkit/class-syntax-extends.js b/test/webkit/class-syntax-extends.js
index a1b8f12..ccd3f29 100644
--- a/test/webkit/class-syntax-extends.js
+++ b/test/webkit/class-syntax-extends.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax "extends"');
class Base {
diff --git a/test/webkit/class-syntax-name.js b/test/webkit/class-syntax-name.js
index 1604565..7686f6c 100644
--- a/test/webkit/class-syntax-name.js
+++ b/test/webkit/class-syntax-name.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class name semantics in class statements and expressions');
function runTestShouldBe(statement, result) {
diff --git a/test/webkit/class-syntax-prototype.js b/test/webkit/class-syntax-prototype.js
index 02ec578..6f0b40c 100644
--- a/test/webkit/class-syntax-prototype.js
+++ b/test/webkit/class-syntax-prototype.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for the descriptors of the properties implicitly defined by ES6 class syntax');
function descriptor(object, propertyName) {
diff --git a/test/webkit/class-syntax-scoping.js b/test/webkit/class-syntax-scoping.js
index 02f5a1e..7c23634 100644
--- a/test/webkit/class-syntax-scoping.js
+++ b/test/webkit/class-syntax-scoping.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for scoping of variables in ES6 class syntax');
var local = "FAIL";
diff --git a/test/webkit/class-syntax-semicolon.js b/test/webkit/class-syntax-semicolon.js
index 33504f9..d4a0d9b 100644
--- a/test/webkit/class-syntax-semicolon.js
+++ b/test/webkit/class-syntax-semicolon.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax containing semicolon in the class body');
shouldThrow("class A { foo;() { } }", "'SyntaxError: Unexpected token ;'");
diff --git a/test/webkit/class-syntax-super.js b/test/webkit/class-syntax-super.js
index e355b4b..d70f2a1 100644
--- a/test/webkit/class-syntax-super.js
+++ b/test/webkit/class-syntax-super.js
@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy
-
description('Tests for ES6 class syntax "super"');
var baseMethodValue = {};
diff --git a/test/webkit/fast/js/excessive-comma-usage.js b/test/webkit/fast/js/excessive-comma-usage.js
index 414b29b..a67a3ff 100644
--- a/test/webkit/fast/js/excessive-comma-usage.js
+++ b/test/webkit/fast/js/excessive-comma-usage.js
@@ -34,7 +34,7 @@
declarationTestString += ";return true;";
var commaExpressionTestString = "1";
-for (var i = 0; i < 5000; i++)
+for (var i = 0; i < 2500; i++)
commaExpressionTestString += ",1";
commaExpressionTestString += ";return true;";
diff --git a/test/webkit/fast/regex/lastIndex-expected.txt b/test/webkit/fast/regex/lastIndex-expected.txt
index 71292c7..1e0959c 100644
--- a/test/webkit/fast/regex/lastIndex-expected.txt
+++ b/test/webkit/fast/regex/lastIndex-expected.txt
@@ -42,10 +42,10 @@
PASS Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {writable:true}); true threw exception TypeError: Cannot redefine property: lastIndex.
PASS Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {value:42}); true threw exception TypeError: Cannot redefine property: lastIndex.
PASS Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'lastIndex', {value:0}); true is true
-FAIL Object.defineProperty(/x/, 'lastIndex', {writable:false}).exec('') should be null. Threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'
+PASS Object.defineProperty(/x/, 'lastIndex', {writable:false}).exec('') is null
PASS Object.defineProperty(/x/, 'lastIndex', {writable:false}).exec('x') is ["x"]
-PASS Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('') threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
-PASS Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('x') threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
+FAIL Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('') should throw an exception. Was null.
+FAIL Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('x') should throw an exception. Was x.
PASS var re = /x/; Object.freeze(re); Object.isFrozen(re); is true
PASS successfullyParsed is true
diff --git a/test/webkit/function-declaration-statement.js b/test/webkit/function-declaration-statement.js
index 34e3fdd..2c866d5 100644
--- a/test/webkit/function-declaration-statement.js
+++ b/test/webkit/function-declaration-statement.js
@@ -147,7 +147,7 @@
function forInVarInitTest()
{
var a;
- for (var a = false in { field: false })
+ for (var a in { field: false })
function f()
{
return true;
diff --git a/test/webkit/toString-for-var-decl.js b/test/webkit/toString-for-var-decl.js
index 2b4db73..ba30883 100644
--- a/test/webkit/toString-for-var-decl.js
+++ b/test/webkit/toString-for-var-decl.js
@@ -25,7 +25,7 @@
"This test checks for a couple of specific ways that bugs in toString() round trips have changed the meanings of functions with var declarations inside for loops."
);
-function f1() { for (var j = 1 in []) {} }
+function f1() { for (var j in []) {} }
var f2 = function () { for (var j = 1; j < 10; ++j) {} }
var f3 = function () { for (j = 1;j < 10; ++j) {} }
var f4 = function () { for (var j;;) {} }
diff --git a/test/webkit/webkit.gyp b/test/webkit/webkit.gyp
index 8d655fe..cd4c4b9 100644
--- a/test/webkit/webkit.gyp
+++ b/test/webkit/webkit.gyp
@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
- '../../build/features.gypi',
- '../../build/isolate.gypi',
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
],
'sources': [
'webkit.isolate',
diff --git a/test/webkit/webkit.status b/test/webkit/webkit.status
index e23b9cf..3ac1600 100644
--- a/test/webkit/webkit.status
+++ b/test/webkit/webkit.status
@@ -70,6 +70,10 @@
# Too slow.
'dfg-int-overflow-in-loop': [SKIP],
}], # 'arch == ppc or arch == ppc64'
+['arch == s390 or arch == s390x', {
+ # Too slow.
+ 'dfg-int-overflow-in-loop': [SKIP],
+}], # 'arch == s390 or arch == s390x'
##############################################################################
['asan == True', {
@@ -97,17 +101,18 @@
}], # 'gc_stress == True and mode == debug'
##############################################################################
-['ignition == True', {
- # TODO(4680): Throws a RangeError due to stack overflow. Need investigation.
- 'fast/js/excessive-comma-usage': [SKIP], # Stack is brittle, SKIP not FAIL.
-}], # ignition == True
+['msan', {
+ # TODO(mythria,4680): Too slow and timeout on ignition.
+ 'dfg-double-vote-fuzz': [PASS, NO_IGNITION],
+ 'dfg-int-overflow-in-loop': [PASS, NO_IGNITION],
+}], # msan
##############################################################################
-['ignition == True and msan', {
+['(ignition or ignition_turbofan) and msan', {
# TODO(mythria,4680): Too slow and timeout on ignition.
'dfg-double-vote-fuzz': [SKIP],
'dfg-int-overflow-in-loop': [SKIP],
-}], # ignition == True and msan
+}], # (ignition or ignition_turbofan) and msan
##############################################################################
['gcov_coverage', {