OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 static Address current_limit_address(); | 127 static Address current_limit_address(); |
128 static Address current_level_address(); | 128 static Address current_level_address(); |
129 | 129 |
130 // Closes the HandleScope (invalidating all handles | 130 // Closes the HandleScope (invalidating all handles |
131 // created in the scope of the HandleScope) and returns | 131 // created in the scope of the HandleScope) and returns |
132 // a Handle backed by the parent scope holding the | 132 // a Handle backed by the parent scope holding the |
133 // value of the argument handle. | 133 // value of the argument handle. |
134 template <typename T> | 134 template <typename T> |
135 Handle<T> CloseAndEscape(Handle<T> handle_value); | 135 Handle<T> CloseAndEscape(Handle<T> handle_value); |
136 | 136 |
| 137 Isolate* isolate() { return isolate_; } |
| 138 |
137 private: | 139 private: |
138 // Prevent heap allocation or illegal handle scopes. | 140 // Prevent heap allocation or illegal handle scopes. |
139 HandleScope(const HandleScope&); | 141 HandleScope(const HandleScope&); |
140 void operator=(const HandleScope&); | 142 void operator=(const HandleScope&); |
141 void* operator new(size_t size); | 143 void* operator new(size_t size); |
142 void operator delete(void* size_t); | 144 void operator delete(void* size_t); |
143 | 145 |
144 inline void CloseScope(); | 146 inline void CloseScope(); |
145 | 147 |
146 Isolate* isolate_; | 148 Isolate* isolate_; |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 private: | 381 private: |
380 bool has_been_transformed_; // Tells whether the object has been transformed. | 382 bool has_been_transformed_; // Tells whether the object has been transformed. |
381 int unused_property_fields_; // Captures the unused number of field. | 383 int unused_property_fields_; // Captures the unused number of field. |
382 Handle<JSObject> object_; // The object being optimized. | 384 Handle<JSObject> object_; // The object being optimized. |
383 }; | 385 }; |
384 | 386 |
385 | 387 |
386 } } // namespace v8::internal | 388 } } // namespace v8::internal |
387 | 389 |
388 #endif // V8_HANDLES_H_ | 390 #endif // V8_HANDLES_H_ |
OLD | NEW |