1e994192d6
Reason for revert:
speculative revert: https://codereview.chromium.org/2596013002/
Original issue's description:
> [regexp] Remove IsRegExp intrinsic
>
> The two remaining uses of this intrinsic in debug.js and mirrors.js now
> simply rely on the runtime function.
>
> BUG=v8:5339
>
> Review-Url: https://codereview.chromium.org/2591923003
> Cr-Commit-Position: refs/heads/master@{#41892}
> Committed: c9cb94a06f
TBR=bmeurer@chromium.org,jgruber@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5339
Review-Url: https://codereview.chromium.org/2592383002
Cr-Commit-Position: refs/heads/master@{#41915}
36 lines
920 B
JavaScript
36 lines
920 B
JavaScript
// 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 --fold-constants
|
|
|
|
function test() {
|
|
assertEquals("string", typeof "");
|
|
assertEquals("number", typeof 1.1);
|
|
assertEquals("number", typeof 1);
|
|
assertEquals("boolean", typeof true);
|
|
assertEquals("function", typeof function() {});
|
|
assertEquals("object", typeof null);
|
|
assertEquals("object", typeof {});
|
|
assertEquals("object", typeof /regex/);
|
|
|
|
assertTrue(%_IsSmi(1));
|
|
assertFalse(%_IsSmi(1.1));
|
|
assertFalse(%_IsSmi({}));
|
|
|
|
assertTrue(%_IsRegExp(/regexp/));
|
|
assertFalse(%_IsRegExp({}));
|
|
|
|
assertTrue(%_IsArray([1]));
|
|
assertFalse(%_IsArray(function() {}));
|
|
|
|
assertTrue(%_IsJSReceiver(new Date()));
|
|
assertFalse(%_IsJSReceiver(1));
|
|
}
|
|
|
|
|
|
test();
|
|
test();
|
|
%OptimizeFunctionOnNextCall(test);
|
|
test();
|