Index: src/runtime/runtime-scopes.cc |
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
index a56ca21da4ca85a6d9a8f5dca3e1ec74da7977c0..c21f4bae596ae9d4948ffc089fb2baf76196e7b7 100644 |
--- a/src/runtime/runtime-scopes.cc |
+++ b/src/runtime/runtime-scopes.cc |
@@ -642,8 +642,7 @@ RUNTIME_FUNCTION(Runtime_NewStrictArguments) { |
static Handle<JSArray> NewRestParam(Isolate* isolate, Object** parameters, |
- int num_params, int rest_index, |
- LanguageMode language_mode) { |
+ int num_params, int rest_index) { |
parameters -= rest_index; |
int num_elements = std::max(0, num_params - rest_index); |
Handle<FixedArray> elements = |
@@ -651,29 +650,26 @@ static Handle<JSArray> NewRestParam(Isolate* isolate, Object** parameters, |
for (int i = 0; i < num_elements; ++i) { |
elements->set(i, *--parameters); |
} |
- return isolate->factory()->NewJSArrayWithElements( |
- elements, FAST_ELEMENTS, num_elements, strength(language_mode)); |
+ return isolate->factory()->NewJSArrayWithElements(elements, FAST_ELEMENTS, |
+ num_elements); |
} |
RUNTIME_FUNCTION(Runtime_NewRestParam) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 4); |
+ DCHECK(args.length() == 3); |
CONVERT_SMI_ARG_CHECKED(num_params, 0); |
Object** parameters = reinterpret_cast<Object**>(args[1]); |
CONVERT_SMI_ARG_CHECKED(rest_index, 2); |
- CONVERT_SMI_ARG_CHECKED(language_mode, 3); |
- return *NewRestParam(isolate, parameters, num_params, rest_index, |
- static_cast<LanguageMode>(language_mode)); |
+ return *NewRestParam(isolate, parameters, num_params, rest_index); |
} |
RUNTIME_FUNCTION(Runtime_NewRestParamSlow) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 2); |
+ DCHECK(args.length() == 1); |
CONVERT_SMI_ARG_CHECKED(rest_index, 0); |
- CONVERT_SMI_ARG_CHECKED(language_mode, 1); |
JavaScriptFrameIterator it(isolate); |
@@ -684,8 +680,7 @@ RUNTIME_FUNCTION(Runtime_NewRestParamSlow) { |
int argument_count = frame->GetArgumentsLength(); |
Object** parameters = reinterpret_cast<Object**>(frame->GetParameterSlot(-1)); |
- return *NewRestParam(isolate, parameters, argument_count, rest_index, |
- static_cast<LanguageMode>(language_mode)); |
+ return *NewRestParam(isolate, parameters, argument_count, rest_index); |
} |