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

Side by Side Diff: src/isolate.h

Issue 3382007: [Isolates] ScavengeVisitor gets member Heap*. (Closed)
Patch Set: fixed per review comments Created 10 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/heap.cc ('k') | src/jsregexp.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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 class ExecutionAccess BASE_EMBEDDED { 1094 class ExecutionAccess BASE_EMBEDDED {
1095 public: 1095 public:
1096 ExecutionAccess(); 1096 ExecutionAccess();
1097 ~ExecutionAccess(); 1097 ~ExecutionAccess();
1098 }; 1098 };
1099 1099
1100 1100
1101 // Support for checking for stack-overflows in C++ code. 1101 // Support for checking for stack-overflows in C++ code.
1102 class StackLimitCheck BASE_EMBEDDED { 1102 class StackLimitCheck BASE_EMBEDDED {
1103 public: 1103 public:
1104 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1105
1104 bool HasOverflowed() const { 1106 bool HasOverflowed() const {
1105 StackGuard* stack_guard = Isolate::Current()->stack_guard(); 1107 StackGuard* stack_guard = isolate_->stack_guard();
1106 // Stack has overflowed in C++ code only if stack pointer exceeds the C++ 1108 // Stack has overflowed in C++ code only if stack pointer exceeds the C++
1107 // stack guard and the limits are not set to interrupt values. 1109 // stack guard and the limits are not set to interrupt values.
1108 // TODO(214): Stack overflows are ignored if a interrupt is pending. This 1110 // TODO(214): Stack overflows are ignored if a interrupt is pending. This
1109 // code should probably always use the initial C++ limit. 1111 // code should probably always use the initial C++ limit.
1110 return (reinterpret_cast<uintptr_t>(this) < stack_guard->climit()) && 1112 return (reinterpret_cast<uintptr_t>(this) < stack_guard->climit()) &&
1111 stack_guard->IsStackOverflow(); 1113 stack_guard->IsStackOverflow();
1112 } 1114 }
1115 private:
1116 Isolate* isolate_;
1113 }; 1117 };
1114 1118
1115 1119
1116 // Support for temporarily postponing interrupts. When the outermost 1120 // Support for temporarily postponing interrupts. When the outermost
1117 // postpone scope is left the interrupts will be re-enabled and any 1121 // postpone scope is left the interrupts will be re-enabled and any
1118 // interrupts that occurred while in the scope will be taken into 1122 // interrupts that occurred while in the scope will be taken into
1119 // account. 1123 // account.
1120 class PostponeInterruptsScope BASE_EMBEDDED { 1124 class PostponeInterruptsScope BASE_EMBEDDED {
1121 public: 1125 public:
1122 PostponeInterruptsScope() { 1126 PostponeInterruptsScope() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 #define ISOLATED_CLASS class 1172 #define ISOLATED_CLASS class
1169 1173
1170 } } // namespace v8::internal 1174 } } // namespace v8::internal
1171 1175
1172 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1176 // TODO(isolates): Get rid of these -inl.h includes and place them only where
1173 // they're needed. 1177 // they're needed.
1174 #include "allocation-inl.h" 1178 #include "allocation-inl.h"
1175 #include "zone-inl.h" 1179 #include "zone-inl.h"
1176 1180
1177 #endif // V8_ISOLATE_H_ 1181 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698