| 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 scope_info->scope_type() != ARROW_SCOPE) { | 1201 scope_info->scope_type() != ARROW_SCOPE) { |
| 1202 // Global or eval code. | 1202 // Global or eval code. |
| 1203 CompilationInfoWithZone info(script); | 1203 CompilationInfoWithZone info(script); |
| 1204 if (scope_info->scope_type() == SCRIPT_SCOPE) { | 1204 if (scope_info->scope_type() == SCRIPT_SCOPE) { |
| 1205 info.MarkAsGlobal(); | 1205 info.MarkAsGlobal(); |
| 1206 } else { | 1206 } else { |
| 1207 DCHECK(scope_info->scope_type() == EVAL_SCOPE); | 1207 DCHECK(scope_info->scope_type() == EVAL_SCOPE); |
| 1208 info.MarkAsEval(); | 1208 info.MarkAsEval(); |
| 1209 info.SetContext(Handle<Context>(function_->context())); | 1209 info.SetContext(Handle<Context>(function_->context())); |
| 1210 } | 1210 } |
| 1211 if (Parser::Parse(&info) && Scope::Analyze(&info)) { | 1211 if (Parser::ParseStatic(&info) && Scope::Analyze(&info)) { |
| 1212 scope = info.function()->scope(); | 1212 scope = info.function()->scope(); |
| 1213 } | 1213 } |
| 1214 RetrieveScopeChain(scope, shared_info); | 1214 RetrieveScopeChain(scope, shared_info); |
| 1215 } else { | 1215 } else { |
| 1216 // Function code | 1216 // Function code |
| 1217 CompilationInfoWithZone info(shared_info); | 1217 CompilationInfoWithZone info(shared_info); |
| 1218 if (Parser::Parse(&info) && Scope::Analyze(&info)) { | 1218 if (Parser::ParseStatic(&info) && Scope::Analyze(&info)) { |
| 1219 scope = info.function()->scope(); | 1219 scope = info.function()->scope(); |
| 1220 } | 1220 } |
| 1221 RetrieveScopeChain(scope, shared_info); | 1221 RetrieveScopeChain(scope, shared_info); |
| 1222 } | 1222 } |
| 1223 } | 1223 } |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 ScopeIterator(Isolate* isolate, Handle<JSFunction> function) | 1226 ScopeIterator(Isolate* isolate, Handle<JSFunction> function) |
| 1227 : isolate_(isolate), | 1227 : isolate_(isolate), |
| 1228 frame_(NULL), | 1228 frame_(NULL), |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2811 return Smi::FromInt(isolate->debug()->is_active()); | 2811 return Smi::FromInt(isolate->debug()->is_active()); |
| 2812 } | 2812 } |
| 2813 | 2813 |
| 2814 | 2814 |
| 2815 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { | 2815 RUNTIME_FUNCTION(RuntimeReference_DebugBreakInOptimizedCode) { |
| 2816 UNIMPLEMENTED(); | 2816 UNIMPLEMENTED(); |
| 2817 return NULL; | 2817 return NULL; |
| 2818 } | 2818 } |
| 2819 } | 2819 } |
| 2820 } // namespace v8::internal | 2820 } // namespace v8::internal |
| OLD | NEW |