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

Side by Side Diff: src/handles.h

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/disassembler.cc ('k') | src/handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 reinterpret_cast<Address>(*location_) != kZapValue); 75 reinterpret_cast<Address>(*location_) != kZapValue);
76 return location_; 76 return location_;
77 } 77 }
78 78
79 template <class S> static Handle<T> cast(Handle<S> that) { 79 template <class S> static Handle<T> cast(Handle<S> that) {
80 T::cast(*that); 80 T::cast(*that);
81 return Handle<T>(reinterpret_cast<T**>(that.location())); 81 return Handle<T>(reinterpret_cast<T**>(that.location()));
82 } 82 }
83 83
84 static Handle<T> null() { return Handle<T>(); } 84 static Handle<T> null() { return Handle<T>(); }
85 bool is_null() { return location_ == NULL; } 85 bool is_null() const { return location_ == NULL; }
86 86
87 // Closes the given scope, but lets this handle escape. See 87 // Closes the given scope, but lets this handle escape. See
88 // implementation in api.h. 88 // implementation in api.h.
89 inline Handle<T> EscapeFrom(v8::HandleScope* scope); 89 inline Handle<T> EscapeFrom(v8::HandleScope* scope);
90 90
91 private: 91 private:
92 T** location_; 92 T** location_;
93 }; 93 };
94 94
95 95
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 private: 359 private:
360 bool has_been_transformed_; // Tells whether the object has been transformed. 360 bool has_been_transformed_; // Tells whether the object has been transformed.
361 int unused_property_fields_; // Captures the unused number of field. 361 int unused_property_fields_; // Captures the unused number of field.
362 Handle<JSObject> object_; // The object being optimized. 362 Handle<JSObject> object_; // The object being optimized.
363 }; 363 };
364 364
365 365
366 } } // namespace v8::internal 366 } } // namespace v8::internal
367 367
368 #endif // V8_HANDLES_H_ 368 #endif // V8_HANDLES_H_
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698