Lines Matching refs:isolate
5 #include "src/execution/isolate.h"
21 Handle<Object> CauseGC(Handle<Object> obj, Isolate* isolate) {
22 isolate->heap()->CollectGarbage(OLD_SPACE, GarbageCollectionReason::kTesting);
27 Object CauseGCRaw(Object obj, Isolate* isolate) {
28 isolate->heap()->CollectGarbage(OLD_SPACE, GarbageCollectionReason::kTesting);
33 Managed<Smi> CauseGCManaged(int i, Isolate* isolate) {
34 isolate->heap()->CollectGarbage(OLD_SPACE, GarbageCollectionReason::kTesting);
44 void TestTwoArguments(Isolate* isolate) {
45 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
46 Handle<JSObject> obj2 = isolate->factory()->NewJSObjectWithNullProto();
48 TwoArgumentsFunction(*CauseGC(obj1, isolate), *CauseGC(obj2, isolate));
56 void TestTwoSizeTArguments(Isolate* isolate) {
57 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
58 Handle<JSObject> obj2 = isolate->factory()->NewJSObjectWithNullProto();
60 TwoSizeTArgumentsFunction(sizeof(*CauseGC(obj1, isolate)),
61 sizeof(*CauseGC(obj2, isolate)));
80 void TestMethodCall(Isolate* isolate) {
82 Handle<SomeObject> so = handle(obj, isolate);
83 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
85 so->Method(*CauseGC(obj1, isolate));
87 so->Method(CauseGCRaw(*obj1, isolate));
90 void TestOperatorCall(Isolate* isolate) {
92 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
94 obj = *CauseGC(obj1, isolate);
99 void TestFollowingTemplates(Isolate* isolate) {
101 CauseGCManaged(42, isolate);
108 virtual Handle<Object> VirtualCauseGC(Handle<Object> obj, Isolate* isolate) {
115 Handle<Object> VirtualCauseGC(Handle<Object> obj, Isolate* isolate) override {
116 isolate->heap()->CollectGarbage(OLD_SPACE,
123 void TestFollowingVirtualFunctions(Isolate* isolate) {
126 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
129 Handle<SomeObject> so_handle = handle(so, isolate);
131 so_handle->Method(*derived.VirtualCauseGC(obj1, isolate));
133 so_handle->Method(*base->VirtualCauseGC(obj1, isolate));
140 static Handle<Object> StaticCauseGC(Handle<Object> obj, Isolate* isolate) {
141 isolate->heap()->CollectGarbage(OLD_SPACE,
148 void TestFollowingStaticFunctions(Isolate* isolate) {
150 Handle<SomeObject> so_handle = handle(so, isolate);
152 Handle<JSObject> obj1 = isolate->factory()->NewJSObjectWithNullProto();
154 so_handle->Method(*SomeClass::StaticCauseGC(obj1, isolate));
159 void TestDeadVarAnalysis(Isolate* isolate) {
160 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
161 CauseGCRaw(raw_obj, isolate);
167 void TestDeadVarBecauseOfSafepointAnalysis(Isolate* isolate) {
168 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
175 void TestGuardedDeadVarAnalysis(Isolate* isolate) {
176 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
182 CauseGCRaw(raw_obj, isolate);
188 void TestGuardedDeadVarAnalysis2(Isolate* isolate) {
189 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
195 CauseGCRaw(raw_obj, isolate);
201 void TestGuardedAgainstSafepointDeadVarAnalysis(Isolate* isolate) {
202 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
214 void TestGuardedAgainstSafepointDeadVarAnalysis2(Isolate* isolate) {
215 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
227 void TestGuardedAgainstSafepointDeadVarAnalysis3(Isolate* isolate) {
228 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
245 void TestOnlyHeapGuardedDeadVarAnalysisInCompound(Isolate* isolate) {
246 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
250 CauseGCRaw(raw_obj, isolate);
255 void TestOnlyHeapGuardedDeadVarAnalysisInCompound2(Isolate* isolate) {
256 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
260 CauseGCRaw(raw_obj, isolate);
268 void TestGuardedDeadVarAnalysisNested(JSObject raw_obj, Isolate* isolate) {
269 CauseGCRaw(raw_obj, isolate);
274 void TestGuardedDeadVarAnalysisCaller(Isolate* isolate) {
276 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
277 TestGuardedDeadVarAnalysisNested(raw_obj, isolate);
282 void TestGuardedDeadVarAnalysisCaller2(Isolate* isolate) {
284 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
285 TestGuardedDeadVarAnalysisNested(raw_obj, isolate);
290 void TestGuardedDeadVarAnalysisCaller3(Isolate* isolate) {
292 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
293 TestGuardedDeadVarAnalysisNested(raw_obj, isolate);
298 void TestGuardedDeadVarAnalysisCaller4(Isolate* isolate) {
299 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
300 TestGuardedDeadVarAnalysisNested(raw_obj, isolate);
305 JSObject GuardedAllocation(Isolate* isolate) {
307 return *isolate->factory()->NewJSObjectWithNullProto();
310 JSObject GuardedAllocation2(Isolate* isolate) {
312 return *isolate->factory()->NewJSObjectWithNullProto();
315 void TestNestedDeadVarAnalysis(Isolate* isolate) {
316 JSObject raw_obj = GuardedAllocation(isolate);
317 CauseGCRaw(raw_obj, isolate);
322 void TestNestedDeadVarAnalysis2(Isolate* isolate) {
324 JSObject raw_obj = GuardedAllocation(isolate);
325 CauseGCRaw(raw_obj, isolate);
332 void TestGuardedDeadVarAnalysisMidFunction(Isolate* isolate) {
333 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
334 CauseGCRaw(raw_obj, isolate);
343 void TestGuardedDeadVarAnalysisMidFunction2(Isolate* isolate) {
344 JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
345 CauseGCRaw(raw_obj, isolate);