Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: src/isolate-inl.h

Issue 2366903003: Revert of [api] Clean up scopes and precheck instantiations cache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_ISOLATE_INL_H_ 5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_ 6 #define V8_ISOLATE_INL_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 Isolate::ExceptionScope::ExceptionScope(Isolate* isolate) 94 Isolate::ExceptionScope::ExceptionScope(Isolate* isolate)
95 : isolate_(isolate), 95 : isolate_(isolate),
96 pending_exception_(isolate_->pending_exception(), isolate_) {} 96 pending_exception_(isolate_->pending_exception(), isolate_) {}
97 97
98 98
99 Isolate::ExceptionScope::~ExceptionScope() { 99 Isolate::ExceptionScope::~ExceptionScope() {
100 isolate_->set_pending_exception(*pending_exception_); 100 isolate_->set_pending_exception(*pending_exception_);
101 } 101 }
102 102
103 SaveContext::SaveContext(Isolate* isolate)
104 : isolate_(isolate), prev_(isolate->save_context()) {
105 if (isolate->context() != NULL) {
106 context_ = Handle<Context>(isolate->context());
107 }
108 isolate->set_save_context(this);
109 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
110 }
111
112 SaveContext::~SaveContext() {
113 isolate_->set_context(context_.is_null() ? NULL : *context_);
114 isolate_->set_save_context(prev_);
115 }
116
117 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ 103 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
118 Handle<type> Isolate::name() { \ 104 Handle<type> Isolate::name() { \
119 return Handle<type>(raw_native_context()->name(), this); \ 105 return Handle<type>(raw_native_context()->name(), this); \
120 } \ 106 } \
121 bool Isolate::is_##name(type* value) { \ 107 bool Isolate::is_##name(type* value) { \
122 return raw_native_context()->is_##name(value); \ 108 return raw_native_context()->is_##name(value); \
123 } 109 }
124 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) 110 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR)
125 #undef NATIVE_CONTEXT_FIELD_ACCESSOR 111 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
126 112
(...skipping 22 matching lines...) Expand all
149 135
150 bool Isolate::IsStringLengthOverflowIntact() { 136 bool Isolate::IsStringLengthOverflowIntact() {
151 PropertyCell* has_instance_cell = heap()->string_length_protector(); 137 PropertyCell* has_instance_cell = heap()->string_length_protector();
152 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid); 138 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid);
153 } 139 }
154 140
155 } // namespace internal 141 } // namespace internal
156 } // namespace v8 142 } // namespace v8
157 143
158 #endif // V8_ISOLATE_INL_H_ 144 #endif // V8_ISOLATE_INL_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698