"isArray", ArrayIsArray
));
- var specialFunctions = %SpecialArrayFunctions({});
+ var specialFunctions = %SpecialArrayFunctions();
var getFunction = function(name, jsBuiltin, len) {
var f = jsBuiltin;
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, source, 0);
CONVERT_ARG_HANDLE_CHECKED(JSArrayBuffer, target, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(first, 2);
+ RUNTIME_ASSERT(!source.is_identical_to(target));
size_t start = 0;
RUNTIME_ASSERT(TryNumberToSize(isolate, *first, &start));
size_t target_length = NumberToSize(isolate, target->byte_length());
}
-static Handle<JSFunction> InstallBuiltin(Isolate* isolate,
- Handle<JSObject> holder,
- const char* name,
- Builtins::Name builtin_name) {
+static void InstallBuiltin(Isolate* isolate,
+ Handle<JSObject> holder,
+ const char* name,
+ Builtins::Name builtin_name) {
Handle<String> key = isolate->factory()->InternalizeUtf8String(name);
Handle<Code> code(isolate->builtins()->builtin(builtin_name));
Handle<JSFunction> optimized =
isolate->factory()->NewFunctionWithoutPrototype(key, code);
optimized->shared()->DontAdaptArguments();
JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert();
- return optimized;
}
RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) {
HandleScope scope(isolate);
- ASSERT(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0);
+ ASSERT(args.length() == 0);
+ Handle<JSObject> holder =
+ isolate->factory()->NewJSObject(isolate->object_function());
InstallBuiltin(isolate, holder, "pop", Builtins::kArrayPop);
InstallBuiltin(isolate, holder, "push", Builtins::kArrayPush);
F(GetArgumentsProperty, 1, 1) \
F(ToFastProperties, 1, 1) \
F(FinishArrayPrototypeSetup, 1, 1) \
- F(SpecialArrayFunctions, 1, 1) \
+ F(SpecialArrayFunctions, 0, 1) \
F(IsSloppyModeFunction, 1, 1) \
F(GetDefaultReceiver, 1, 1) \
\
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-%DebugGetLoadedScripts();
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var arg0 = %DebugGetLoadedScripts()[1];
-var _source = "foo";
-try {
-%DebugSetScriptSource(arg0, _source);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var arg0 = %DebugGetLoadedScripts()[1];
-%LiveEditFindSharedFunctionInfosForScript(arg0);
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _shared_info = new Array();
-try {
-%LiveEditFunctionSourceUpdated(_shared_info);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var arg0 = %DebugGetLoadedScripts()[1];
-var _source = "foo";
-%LiveEditGatherCompileInfo(arg0, _source);
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _shared_array = new Array();
-var _position_change_array = new Array();
-try {
-%LiveEditPatchFunctionPositions(_shared_array, _position_change_array);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _new_compile_info = new Array();
-var _shared_info = new Array();
-try {
-%LiveEditReplaceFunctionCode(_new_compile_info, _shared_info);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _parent_wrapper = new String('foo');
-var _orig_wrapper = new String('foo');
-var _subst_wrapper = new String('foo');
-try {
-%LiveEditReplaceRefToNestedFunction(_parent_wrapper, _orig_wrapper, _subst_wrapper);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _break_id = 32;
-var _index = 32;
-try {
-%LiveEditRestartFrame(_break_id, _index);
-} catch(e) {}
+++ /dev/null
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var arg0 = %DebugGetLoadedScripts()[1];
-var _source_position = 32;
-var arg2 = 0;
-var _break_point_object_arg = new Object();
-%SetScriptBreakPoint(arg0, _source_position, arg2, _break_point_object_arg);
// Copyright 2014 the V8 project authors. All rights reserved.
// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
// Flags: --allow-natives-syntax --harmony
-var _holder = new Object();
-%SpecialArrayFunctions(_holder);
+%SpecialArrayFunctions();
# remove or change runtime functions, but make sure we don't lose our ability
# to parse them!
EXPECTED_FUNCTION_COUNT = 338
-EXPECTED_FUZZABLE_COUNT = 315
+EXPECTED_FUZZABLE_COUNT = 305
EXPECTED_CCTEST_COUNT = 6
EXPECTED_UNKNOWN_COUNT = 5
"DisableAccessChecks",
"EnableAccessChecks",
- # Seems to be incompatible with --stress-runs.
+ # The current LiveEdit implementation relies on and messes with internals
+ # in ways that makes it fundamentally unfuzzable :-(
+ "DebugGetLoadedScripts",
+ "DebugSetScriptSource",
+ "LiveEditFindSharedFunctionInfosForScript",
+ "LiveEditFunctionSourceUpdated",
+ "LiveEditGatherCompileInfo",
+ "LiveEditPatchFunctionPositions",
+ "LiveEditReplaceFunctionCode",
+ "LiveEditReplaceRefToNestedFunction",
"LiveEditReplaceScript",
+ "LiveEditRestartFrame",
+ "SetScriptBreakPoint",
# TODO(jkummerow): Fix these and un-blacklist them!
"CreateDateTimeFormat",
"GetThreadCount", # Needs to hit a break point.
"GetThreadDetails", # Needs to hit a break point.
"IsAccessAllowedForObserver", # Needs access-check-required object.
- "LiveEditFunctionSourceUpdated", # Needs a SharedFunctionInfo.
- "LiveEditPatchFunctionPositions", # Needs a SharedFunctionInfo.
- "LiveEditReplaceFunctionCode", # Needs a SharedFunctionInfo.
- "LiveEditReplaceRefToNestedFunction", # Needs a SharedFunctionInfo.
- "LiveEditRestartFrame", # Needs to hit a break point.
"UnblockConcurrentRecompilation" # Needs --block-concurrent-recompilation.
]
"%GetImplFromInitializedIntlObject(new Intl.DateTimeFormat('en-US'))")
_NUMBER_FORMAT = (
"%GetImplFromInitializedIntlObject(new Intl.NumberFormat('en-US'))")
-_SCRIPT = "%DebugGetLoadedScripts()[1]"
# Custom definitions for function input that does not throw.
"CreatePrivateSymbol": ["\"foo\"", None],
"CreateSymbol": ["\"foo\"", None],
"DateParseString": [None, "new Array(8)", None],
- "DebugSetScriptSource": [_SCRIPT, None, None],
"DefineOrRedefineAccessorProperty": [None, None, "function() {}",
"function() {}", 2, None],
"GetBreakLocations": [None, 0, None],
"InternalNumberFormat": [_NUMBER_FORMAT, None, None],
"InternalNumberParse": [_NUMBER_FORMAT, None, None],
"IsSloppyModeFunction": ["function() {}", None],
- "LiveEditFindSharedFunctionInfosForScript": [_SCRIPT, None],
- "LiveEditGatherCompileInfo": [_SCRIPT, None, None],
"LoadMutableDouble": ["{foo: 1.2}", None, None],
"NewObjectFromBound": ["(function() {}).bind({})", None],
"NumberToRadixString": [None, "2", None],
"SetCreateIterator": [None, "2", None],
"SetDebugEventListener": ["undefined", None, None],
"SetFunctionBreakPoint": [None, 200, None, None],
- "SetScriptBreakPoint": [_SCRIPT, None, 0, None, None],
"StringBuilderConcat": ["[1, 2, 3]", 3, None, None],
"StringBuilderJoin": ["['a', 'b']", 4, None, None],
"StringMatch": [None, None, "['a', 'b']", None],
for f in unexpected_files:
print("Unexpected testcase: %s" % os.path.join(BASEPATH, f))
error = True
+ print("Run '%s generate' to automatically clean these up."
+ % THIS_SCRIPT)
CheckTestcasesExisting(js_fuzzable_functions)
if error: