| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #if V8_TARGET_ARCH_X87 |     5 #if V8_TARGET_ARCH_X87 | 
|     6  |     6  | 
|     7 #include "src/ast/scopes.h" |     7 #include "src/ast/scopes.h" | 
|     8 #include "src/code-factory.h" |     8 #include "src/code-factory.h" | 
|     9 #include "src/code-stubs.h" |     9 #include "src/code-stubs.h" | 
|    10 #include "src/codegen.h" |    10 #include "src/codegen.h" | 
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   242   if (new_target_var != nullptr) { |   242   if (new_target_var != nullptr) { | 
|   243     Comment cmnt(masm_, "[ new.target"); |   243     Comment cmnt(masm_, "[ new.target"); | 
|   244     SetVar(new_target_var, edx, ebx, ecx); |   244     SetVar(new_target_var, edx, ebx, ecx); | 
|   245   } |   245   } | 
|   246  |   246  | 
|   247   // Possibly allocate RestParameters |   247   // Possibly allocate RestParameters | 
|   248   int rest_index; |   248   int rest_index; | 
|   249   Variable* rest_param = scope()->rest_parameter(&rest_index); |   249   Variable* rest_param = scope()->rest_parameter(&rest_index); | 
|   250   if (rest_param) { |   250   if (rest_param) { | 
|   251     Comment cmnt(masm_, "[ Allocate rest parameter array"); |   251     Comment cmnt(masm_, "[ Allocate rest parameter array"); | 
|   252  |   252     if (!function_in_register) { | 
|   253     int num_parameters = info->scope()->num_parameters(); |   253       __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 
|   254     int offset = num_parameters * kPointerSize; |   254     } | 
|   255  |   255     FastNewRestParameterStub stub(isolate()); | 
|   256     __ mov(RestParamAccessDescriptor::parameter_count(), |   256     __ CallStub(&stub); | 
|   257            Immediate(Smi::FromInt(num_parameters))); |  | 
|   258     __ lea(RestParamAccessDescriptor::parameter_pointer(), |  | 
|   259            Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); |  | 
|   260     __ mov(RestParamAccessDescriptor::rest_parameter_index(), |  | 
|   261            Immediate(Smi::FromInt(rest_index))); |  | 
|   262     function_in_register = false; |   257     function_in_register = false; | 
|   263  |  | 
|   264     RestParamAccessStub stub(isolate()); |  | 
|   265     __ CallStub(&stub); |  | 
|   266     SetVar(rest_param, eax, ebx, edx); |   258     SetVar(rest_param, eax, ebx, edx); | 
|   267   } |   259   } | 
|   268  |   260  | 
|   269   Variable* arguments = scope()->arguments(); |   261   Variable* arguments = scope()->arguments(); | 
|   270   if (arguments != NULL) { |   262   if (arguments != NULL) { | 
|   271     // Function uses arguments object. |   263     // Function uses arguments object. | 
|   272     Comment cmnt(masm_, "[ Allocate arguments object"); |   264     Comment cmnt(masm_, "[ Allocate arguments object"); | 
|   273     DCHECK(edi.is(ArgumentsAccessNewDescriptor::function())); |   265     DCHECK(edi.is(ArgumentsAccessNewDescriptor::function())); | 
|   274     if (!function_in_register) { |   266     if (!function_in_register) { | 
|   275       __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |   267       __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 
| (...skipping 4222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4498             Assembler::target_address_at(call_target_address, |  4490             Assembler::target_address_at(call_target_address, | 
|  4499                                          unoptimized_code)); |  4491                                          unoptimized_code)); | 
|  4500   return OSR_AFTER_STACK_CHECK; |  4492   return OSR_AFTER_STACK_CHECK; | 
|  4501 } |  4493 } | 
|  4502  |  4494  | 
|  4503  |  4495  | 
|  4504 }  // namespace internal |  4496 }  // namespace internal | 
|  4505 }  // namespace v8 |  4497 }  // namespace v8 | 
|  4506  |  4498  | 
|  4507 #endif  // V8_TARGET_ARCH_X87 |  4499 #endif  // V8_TARGET_ARCH_X87 | 
| OLD | NEW |