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 @@ ...@@ -12,7 +12,6 @@
// Imports // Imports
var AddIndexedProperty; var AddIndexedProperty;
var Delete;
var FLAG_harmony_tolength; var FLAG_harmony_tolength;
var GetIterator; var GetIterator;
var GetMethod; var GetMethod;
...@@ -35,7 +34,6 @@ var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); ...@@ -35,7 +34,6 @@ var unscopablesSymbol = utils.ImportNow("unscopables_symbol");
utils.Import(function(from) { utils.Import(function(from) {
AddIndexedProperty = from.AddIndexedProperty; AddIndexedProperty = from.AddIndexedProperty;
Delete = from.Delete;
GetIterator = from.GetIterator; GetIterator = from.GetIterator;
GetMethod = from.GetMethod; GetMethod = from.GetMethod;
MakeTypeError = from.MakeTypeError; MakeTypeError = from.MakeTypeError;
...@@ -490,8 +488,7 @@ function ArrayPop() { ...@@ -490,8 +488,7 @@ function ArrayPop() {
n--; n--;
var value = array[n]; var value = array[n];
// TODO(jkummerow): Use %DeleteProperty_Strict instead, delete "Delete". %DeleteProperty_Strict(array, n);
Delete(array, n, true);
array.length = n; array.length = n;
return value; return value;
} }
......
...@@ -550,21 +550,6 @@ function GetOwnPropertyJS(obj, v) { ...@@ -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 // ES6, draft 12-24-14, section 7.3.8
function GetMethod(obj, p) { function GetMethod(obj, p) {
var func = obj[p]; var func = obj[p];
...@@ -1517,7 +1502,6 @@ function GetIterator(obj, method) { ...@@ -1517,7 +1502,6 @@ function GetIterator(obj, method) {
// Exports // Exports
utils.Export(function(to) { utils.Export(function(to) {
to.Delete = Delete;
to.FunctionSourceString = FunctionSourceString; to.FunctionSourceString = FunctionSourceString;
to.GetIterator = GetIterator; to.GetIterator = GetIterator;
to.GetMethod = GetMethod; 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