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); |
} |
//---------------------------------------------------------------------------- |