| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/debug.h" | 9 #include "src/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 Handle<JSFunction> function_; | 1484 Handle<JSFunction> function_; |
| 1485 Handle<Context> context_; | 1485 Handle<Context> context_; |
| 1486 List<Handle<ScopeInfo> > nested_scope_chain_; | 1486 List<Handle<ScopeInfo> > nested_scope_chain_; |
| 1487 bool seen_script_scope_; | 1487 bool seen_script_scope_; |
| 1488 bool failed_; | 1488 bool failed_; |
| 1489 | 1489 |
| 1490 void RetrieveScopeChain(Scope* scope, | 1490 void RetrieveScopeChain(Scope* scope, |
| 1491 Handle<SharedFunctionInfo> shared_info) { | 1491 Handle<SharedFunctionInfo> shared_info) { |
| 1492 if (scope != NULL) { | 1492 if (scope != NULL) { |
| 1493 int source_position = shared_info->code()->SourcePosition(frame_->pc()); | 1493 int source_position = shared_info->code()->SourcePosition(frame_->pc()); |
| 1494 scope->GetNestedScopeChain(&nested_scope_chain_, source_position); | 1494 scope->GetNestedScopeChain(isolate_, &nested_scope_chain_, |
| 1495 source_position); |
| 1495 } else { | 1496 } else { |
| 1496 // A failed reparse indicates that the preparser has diverged from the | 1497 // A failed reparse indicates that the preparser has diverged from the |
| 1497 // parser or that the preparse data given to the initial parse has been | 1498 // parser or that the preparse data given to the initial parse has been |
| 1498 // faulty. We fail in debug mode but in release mode we only provide the | 1499 // faulty. We fail in debug mode but in release mode we only provide the |
| 1499 // information we get from the context chain but nothing about | 1500 // information we get from the context chain but nothing about |
| 1500 // completely stack allocated scopes or stack allocated locals. | 1501 // completely stack allocated scopes or stack allocated locals. |
| 1501 // Or it could be due to stack overflow. | 1502 // Or it could be due to stack overflow. |
| 1502 DCHECK(isolate_->has_pending_exception()); | 1503 DCHECK(isolate_->has_pending_exception()); |
| 1503 failed_ = true; | 1504 failed_ = true; |
| 1504 } | 1505 } |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2810 return Smi::FromInt(isolate->debug()->is_active()); | 2811 return Smi::FromInt(isolate->debug()->is_active()); |
| 2811 } | 2812 } |
| 2812 | 2813 |
| 2813 | 2814 |
| 2814 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { | 2815 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { |
| 2815 UNIMPLEMENTED(); | 2816 UNIMPLEMENTED(); |
| 2816 return NULL; | 2817 return NULL; |
| 2817 } | 2818 } |
| 2818 } | 2819 } |
| 2819 } // namespace v8::internal | 2820 } // namespace v8::internal |
| OLD | NEW |