70c4bf1331
The Object.freeze, Object.isExtensible, Object.isFrozen, Object.isSealed, Object.preventExtensions and Object.seal builtins were already implemented in C++, but they still had some funny JavaScript wrappers that just called into the C++ implementation on every (interesting) execution path. Review URL: https://codereview.chromium.org/1553043002 Cr-Commit-Position: refs/heads/master@{#33074}
17 lines
369 B
JavaScript
17 lines
369 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 --gc-interval=203
|
|
|
|
function f() {
|
|
var e = [0];
|
|
Object.preventExtensions(e);
|
|
for (var i = 0; i < 4; i++) e.shift();
|
|
}
|
|
|
|
f();
|
|
f();
|
|
%OptimizeFunctionOnNextCall(f);
|
|
f();
|