| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 // The function in question was inlined. Inlined functions have the | 1181 // The function in question was inlined. Inlined functions have the |
| 1182 // correct number of arguments and no allocated arguments object, so | 1182 // correct number of arguments and no allocated arguments object, so |
| 1183 // we can construct a fresh one by interpreting the function's | 1183 // we can construct a fresh one by interpreting the function's |
| 1184 // deoptimization input data. | 1184 // deoptimization input data. |
| 1185 return ArgumentsForInlinedFunction(frame, function, function_index); | 1185 return ArgumentsForInlinedFunction(frame, function, function_index); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 if (!frame->is_optimized()) { | 1188 if (!frame->is_optimized()) { |
| 1189 // If there is an arguments variable in the stack, we return that. | 1189 // If there is an arguments variable in the stack, we return that. |
| 1190 Handle<ScopeInfo> scope_info(function->shared()->scope_info()); | 1190 Handle<ScopeInfo> scope_info(function->shared()->scope_info()); |
| 1191 int index = scope_info->StackSlotIndex( | 1191 int index = |
| 1192 isolate->heap()->arguments_string()); | 1192 scope_info->StackLocalSlotIndex(isolate->heap()->arguments_string()); |
| 1193 if (index >= 0) { | 1193 if (index >= 0) { |
| 1194 Handle<Object> arguments(frame->GetExpression(index), isolate); | 1194 Handle<Object> arguments(frame->GetExpression(index), isolate); |
| 1195 if (!arguments->IsArgumentsMarker()) return arguments; | 1195 if (!arguments->IsArgumentsMarker()) return arguments; |
| 1196 } | 1196 } |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 // If there is no arguments variable in the stack or we have an | 1199 // If there is no arguments variable in the stack or we have an |
| 1200 // optimized frame, we find the frame that holds the actual arguments | 1200 // optimized frame, we find the frame that holds the actual arguments |
| 1201 // passed to the function. | 1201 // passed to the function. |
| 1202 it.AdvanceToArgumentsFrame(); | 1202 it.AdvanceToArgumentsFrame(); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 1490 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
| 1491 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 1491 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
| 1492 info->set_getter(*getter); | 1492 info->set_getter(*getter); |
| 1493 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 1493 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 1494 return info; | 1494 return info; |
| 1495 } | 1495 } |
| 1496 | 1496 |
| 1497 | 1497 |
| 1498 } // namespace internal | 1498 } // namespace internal |
| 1499 } // namespace v8 | 1499 } // namespace v8 |
| OLD | NEW |