OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/contexts.h" | 5 #include "src/contexts.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 if (object->IsContextExtension()) { | 115 if (object->IsContextExtension()) { |
116 DCHECK(IsBlockContext()); | 116 DCHECK(IsBlockContext()); |
117 object = ContextExtension::cast(object)->scope_info(); | 117 object = ContextExtension::cast(object)->scope_info(); |
118 } | 118 } |
119 return ScopeInfo::cast(object); | 119 return ScopeInfo::cast(object); |
120 } | 120 } |
121 | 121 |
122 | 122 |
123 String* Context::catch_name() { | 123 String* Context::catch_name() { |
124 DCHECK(IsCatchContext()); | 124 DCHECK(IsCatchContext()); |
125 return String::cast(extension()); | 125 return String::cast(ContextExtension::cast(extension())->extension()); |
126 } | 126 } |
127 | 127 |
128 | 128 |
129 JSGlobalObject* Context::global_object() { | 129 JSGlobalObject* Context::global_object() { |
130 return JSGlobalObject::cast(native_context()->extension()); | 130 return JSGlobalObject::cast(native_context()->extension()); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 Context* Context::script_context() { | 134 Context* Context::script_context() { |
135 Context* current = this; | 135 Context* current = this; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 int previous_value = errors_thrown()->value(); | 556 int previous_value = errors_thrown()->value(); |
557 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 557 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
558 } | 558 } |
559 | 559 |
560 | 560 |
561 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 561 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
562 | 562 |
563 } // namespace internal | 563 } // namespace internal |
564 } // namespace v8 | 564 } // namespace v8 |
OLD | NEW |