05f3b27cdd
This is a reland of ec6da23bfe
Original change's description:
> [flags] Remove some dead Crankshaft flags.
>
> R=bmeurer@chromium.org
> BUG=v8:6408
>
> Change-Id: I34abbcdc2fc47df44938bac0e59f9982c935c657
> Reviewed-on: https://chromium-review.googlesource.com/569963
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46631}
Bug: v8:6408
Change-Id: I8a856e25d56e27bccb79588b2e5ee4369d7c5fe5
Reviewed-on: https://chromium-review.googlesource.com/570050
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46637}
33 lines
835 B
JavaScript
33 lines
835 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
|
|
|
|
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(%_IsArray([1]));
|
|
assertFalse(%_IsArray(function() {}));
|
|
|
|
assertTrue(%_IsJSReceiver(new Date()));
|
|
assertFalse(%_IsJSReceiver(1));
|
|
}
|
|
|
|
|
|
test();
|
|
test();
|
|
%OptimizeFunctionOnNextCall(test);
|
|
test();
|