Commit afcfee83 authored by jkummerow's avatar jkummerow Committed by Commit bot

Delete "Delete" JS builtin

Use %DeleteProperty_Strict instead.

Review URL: https://codereview.chromium.org/1508743002

Cr-Commit-Position: refs/heads/master@{#32673}
parent bb38318d
......@@ -12,7 +12,6 @@
// Imports
var AddIndexedProperty;
var Delete;
var FLAG_harmony_tolength;
var GetIterator;
var GetMethod;
......@@ -35,7 +34,6 @@ var unscopablesSymbol = utils.ImportNow("unscopables_symbol");
utils.Import(function(from) {
AddIndexedProperty = from.AddIndexedProperty;
Delete = from.Delete;
GetIterator = from.GetIterator;
GetMethod = from.GetMethod;
MakeTypeError = from.MakeTypeError;
......@@ -490,8 +488,7 @@ function ArrayPop() {
n--;
var value = array[n];
// TODO(jkummerow): Use %DeleteProperty_Strict instead, delete "Delete".
Delete(array, n, true);
%DeleteProperty_Strict(array, n);
array.length = n;
return value;
}
......
......@@ -550,21 +550,6 @@ function GetOwnPropertyJS(obj, v) {
}
// ES5 section 8.12.7.
function Delete(obj, p, should_throw) {
var desc = GetOwnPropertyJS(obj, p);
if (IS_UNDEFINED(desc)) return true;
if (desc.isConfigurable()) {
%DeleteProperty_Sloppy(obj, p);
return true;
} else if (should_throw) {
throw MakeTypeError(kDefineDisallowed, p);
} else {
return;
}
}
// ES6, draft 12-24-14, section 7.3.8
function GetMethod(obj, p) {
var func = obj[p];
......@@ -1517,7 +1502,6 @@ function GetIterator(obj, method) {
// Exports
utils.Export(function(to) {
to.Delete = Delete;
to.FunctionSourceString = FunctionSourceString;
to.GetIterator = GetIterator;
to.GetMethod = GetMethod;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment