Index: test/mjsunit/regress/regress-270142.js |
diff --git a/test/mjsunit/compiler/increment-typefeedback.js b/test/mjsunit/regress/regress-270142.js |
similarity index 80% |
copy from test/mjsunit/compiler/increment-typefeedback.js |
copy to test/mjsunit/regress/regress-270142.js |
index 798959296c43014f252d65ae5dd11e00563bfd04..6e0865c4f846407228549ef8cce7aff5db6da89d 100644 |
--- a/test/mjsunit/compiler/increment-typefeedback.js |
+++ b/test/mjsunit/regress/regress-270142.js |
@@ -25,15 +25,24 @@ |
// (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 |
+// Check that "name"'s property descriptor for non-strict and strict |
+// functions correspond. |
function f(x) { |
- x++; |
return x; |
} |
-f(0.5); |
-f(0.5); |
-%OptimizeFunctionOnNextCall(f); |
-f(0.5); |
-assertOptimized(f); |
+function g(x) { |
+ "use strict"; |
+ return x; |
+} |
+ |
+function checkNameDescriptor(f) { |
+ var descriptor = Object.getOwnPropertyDescriptor(f, "name"); |
+ assertFalse(descriptor.configurable); |
+ assertFalse(descriptor.enumerable); |
+ assertFalse(descriptor.writable); |
+} |
+ |
+checkNameDescriptor(f); |
+checkNameDescriptor(g); |