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

Side by Side Diff: src/isolate.h

Issue 3043060: [Isolates] Replace ISOLATE_FROM_HEAP with Heap::isolate() (Closed)
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
« no previous file with comments | « src/builtins.cc ('k') | src/runtime.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 #undef GLOBAL_ARRAY_BACKING_STORE 1028 #undef GLOBAL_ARRAY_BACKING_STORE
1029 1029
1030 friend class IsolateInitializer; 1030 friend class IsolateInitializer;
1031 friend class v8::Isolate; 1031 friend class v8::Isolate;
1032 friend class v8::Locker; 1032 friend class v8::Locker;
1033 1033
1034 DISALLOW_COPY_AND_ASSIGN(Isolate); 1034 DISALLOW_COPY_AND_ASSIGN(Isolate);
1035 }; 1035 };
1036 1036
1037 1037
1038 #define ISOLATE_FROM_HEAP(heap_pointer) ((Isolate*)( \
1039 (uint8_t*)(heap_pointer) - \
1040 (size_t)((Isolate*)sizeof(Isolate))->heap() + \
1041 sizeof(Isolate)))
1042
1043
1044 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the 1038 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the
1045 // class as a work around for a bug in the generated code found with these 1039 // class as a work around for a bug in the generated code found with these
1046 // versions of GCC. See V8 issue 122 for details. 1040 // versions of GCC. See V8 issue 122 for details.
1047 class SaveContext BASE_EMBEDDED { 1041 class SaveContext BASE_EMBEDDED {
1048 public: 1042 public:
1049 SaveContext() 1043 SaveContext()
1050 : context_(Isolate::Current()->context()), 1044 : context_(Isolate::Current()->context()),
1051 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300 1045 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300
1052 dummy_(Isolate::Current()->context()), 1046 dummy_(Isolate::Current()->context()),
1053 #endif 1047 #endif
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 #define ISOLATED_CLASS class 1174 #define ISOLATED_CLASS class
1181 1175
1182 } } // namespace v8::internal 1176 } } // namespace v8::internal
1183 1177
1184 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1178 // TODO(isolates): Get rid of these -inl.h includes and place them only where
1185 // they're needed. 1179 // they're needed.
1186 #include "allocation-inl.h" 1180 #include "allocation-inl.h"
1187 #include "zone-inl.h" 1181 #include "zone-inl.h"
1188 1182
1189 #endif // V8_ISOLATE_H_ 1183 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698