Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: src/js/runtime.js

Issue 2096933002: Remove all harmony runtime flags which shipped in M51 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/regexp.js ('k') | src/js/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/runtime.js
diff --git a/src/js/runtime.js b/src/js/runtime.js
index 23c329651a3e47b5f3ab85ebe20e6b28a96b1cd6..216685fe4f2692eba560e0be9aedd03a919b6c01 100644
--- a/src/js/runtime.js
+++ b/src/js/runtime.js
@@ -16,7 +16,6 @@
%CheckIsBootstrapping();
-var FLAG_harmony_species;
var GlobalArray = global.Array;
var GlobalBoolean = global.Boolean;
var GlobalString = global.String;
@@ -30,10 +29,6 @@ utils.Import(function(from) {
speciesSymbol = from.species_symbol;
});
-utils.ImportFromExperimental(function(from) {
- FLAG_harmony_species = from.FLAG_harmony_species;
-});
-
// ----------------------------------------------------------------------------
@@ -65,35 +60,22 @@ function MinSimple(a, b) {
// ES2015 7.3.20
-// For the fallback with --harmony-species off, there are two possible choices:
-// - "conservative": return defaultConstructor
-// - "not conservative": return object.constructor
-// This fallback path is only needed in the transition to ES2015, and the
-// choice is made simply to preserve the previous behavior so that we don't
-// have a three-step upgrade: old behavior, unspecified intermediate behavior,
-// and ES2015.
-// In some cases, we were "conservative" (e.g., ArrayBuffer, RegExp), and in
-// other cases we were "not conservative (e.g., TypedArray, Promise).
-function SpeciesConstructor(object, defaultConstructor, conservative) {
- if (FLAG_harmony_species) {
- var constructor = object.constructor;
- if (IS_UNDEFINED(constructor)) {
- return defaultConstructor;
- }
- if (!IS_RECEIVER(constructor)) {
- throw MakeTypeError(kConstructorNotReceiver);
- }
- var species = constructor[speciesSymbol];
- if (IS_NULL_OR_UNDEFINED(species)) {
- return defaultConstructor;
- }
- if (%IsConstructor(species)) {
- return species;
- }
- throw MakeTypeError(kSpeciesNotConstructor);
- } else {
- return conservative ? defaultConstructor : object.constructor;
+function SpeciesConstructor(object, defaultConstructor) {
+ var constructor = object.constructor;
+ if (IS_UNDEFINED(constructor)) {
+ return defaultConstructor;
+ }
+ if (!IS_RECEIVER(constructor)) {
+ throw MakeTypeError(kConstructorNotReceiver);
+ }
+ var species = constructor[speciesSymbol];
+ if (IS_NULL_OR_UNDEFINED(species)) {
+ return defaultConstructor;
+ }
+ if (%IsConstructor(species)) {
+ return species;
}
+ throw MakeTypeError(kSpeciesNotConstructor);
}
//----------------------------------------------------------------------------
« no previous file with comments | « src/js/regexp.js ('k') | src/js/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698