| OLD | NEW | 
|     1 // Copyright 2015 the V8 project authors. All rights reserved. |     1 // Copyright 2015 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 #include "src/interpreter/bytecode-generator.h" |     5 #include "src/interpreter/bytecode-generator.h" | 
|     6  |     6  | 
|     7 #include "src/ast/scopes.h" |     7 #include "src/ast/scopes.h" | 
|     8 #include "src/code-stubs.h" |     8 #include "src/code-stubs.h" | 
|     9 #include "src/compiler.h" |     9 #include "src/compiler.h" | 
|    10 #include "src/interpreter/bytecode-flags.h" |    10 #include "src/interpreter/bytecode-flags.h" | 
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   764   } |   764   } | 
|   765  |   765  | 
|   766   builder()->EnsureReturn(); |   766   builder()->EnsureReturn(); | 
|   767 } |   767 } | 
|   768  |   768  | 
|   769 void BytecodeGenerator::GenerateBytecodeBody() { |   769 void BytecodeGenerator::GenerateBytecodeBody() { | 
|   770   // Build the arguments object if it is used. |   770   // Build the arguments object if it is used. | 
|   771   VisitArgumentsObject(scope()->arguments()); |   771   VisitArgumentsObject(scope()->arguments()); | 
|   772  |   772  | 
|   773   // Build rest arguments array if it is used. |   773   // Build rest arguments array if it is used. | 
|   774   int rest_index; |   774   Variable* rest_parameter = scope()->rest_parameter(); | 
|   775   Variable* rest_parameter = scope()->rest_parameter(&rest_index); |  | 
|   776   VisitRestArgumentsArray(rest_parameter); |   775   VisitRestArgumentsArray(rest_parameter); | 
|   777  |   776  | 
|   778   // Build assignment to {.this_function} variable if it is used. |   777   // Build assignment to {.this_function} variable if it is used. | 
|   779   VisitThisFunctionVariable(scope()->this_function_var()); |   778   VisitThisFunctionVariable(scope()->this_function_var()); | 
|   780  |   779  | 
|   781   // Build assignment to {new.target} variable if it is used. |   780   // Build assignment to {new.target} variable if it is used. | 
|   782   VisitNewTargetVariable(scope()->new_target_var()); |   781   VisitNewTargetVariable(scope()->new_target_var()); | 
|   783  |   782  | 
|   784   // TODO(rmcilroy): Emit tracing call if requested to do so. |   783   // TODO(rmcilroy): Emit tracing call if requested to do so. | 
|   785   if (FLAG_trace) { |   784   if (FLAG_trace) { | 
| (...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3403   return execution_context()->scope()->language_mode(); |  3402   return execution_context()->scope()->language_mode(); | 
|  3404 } |  3403 } | 
|  3405  |  3404  | 
|  3406 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |  3405 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 
|  3407   return TypeFeedbackVector::GetIndex(slot); |  3406   return TypeFeedbackVector::GetIndex(slot); | 
|  3408 } |  3407 } | 
|  3409  |  3408  | 
|  3410 }  // namespace interpreter |  3409 }  // namespace interpreter | 
|  3411 }  // namespace internal |  3410 }  // namespace internal | 
|  3412 }  // namespace v8 |  3411 }  // namespace v8 | 
| OLD | NEW |