| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4351 HandleScope scope(heap->isolate()); | 4351 HandleScope scope(heap->isolate()); |
| 4352 EmbeddedVector<char, 256> source; | 4352 EmbeddedVector<char, 256> source; |
| 4353 SNPrintF(source, | 4353 SNPrintF(source, |
| 4354 "function bar%d() {" | 4354 "function bar%d() {" |
| 4355 " return foo%d(1);" | 4355 " return foo%d(1);" |
| 4356 "};" | 4356 "};" |
| 4357 "function foo%d(x) { with (x) { return 1 + x; } };" | 4357 "function foo%d(x) { with (x) { return 1 + x; } };" |
| 4358 "bar%d();" | 4358 "bar%d();" |
| 4359 "bar%d();" | 4359 "bar%d();" |
| 4360 "bar%d();" | 4360 "bar%d();" |
| 4361 "%%OptimizeFwunctionOnNextCall(bar%d);" | 4361 "%%OptimizeFunctionOnNextCall(bar%d);" |
| 4362 "bar%d();", | 4362 "bar%d();", |
| 4363 i, i, i, i, i, i, i, i); | 4363 i, i, i, i, i, i, i, i); |
| 4364 CompileRun(source.start()); | 4364 CompileRun(source.start()); |
| 4365 } | 4365 } |
| 4366 heap->CollectAllGarbage(); | 4366 heap->CollectAllGarbage(); |
| 4367 } | 4367 } |
| 4368 int elements = 0; | 4368 int elements = 0; |
| 4369 if (heap->weak_object_to_code_table()->IsHashTable()) { | 4369 if (heap->weak_object_to_code_table()->IsHashTable()) { |
| 4370 WeakHashTable* t = WeakHashTable::cast(heap->weak_object_to_code_table()); | 4370 WeakHashTable* t = WeakHashTable::cast(heap->weak_object_to_code_table()); |
| 4371 elements = t->NumberOfElements(); | 4371 elements = t->NumberOfElements(); |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5411 CHECK(pos->IsSmi()); | 5411 CHECK(pos->IsSmi()); |
| 5412 | 5412 |
| 5413 Handle<JSArray> stack_trace_array = Handle<JSArray>::cast(stack_trace); | 5413 Handle<JSArray> stack_trace_array = Handle<JSArray>::cast(stack_trace); |
| 5414 int array_length = Smi::cast(stack_trace_array->length())->value(); | 5414 int array_length = Smi::cast(stack_trace_array->length())->value(); |
| 5415 for (int i = 0; i < array_length; i++) { | 5415 for (int i = 0; i < array_length; i++) { |
| 5416 Handle<Object> element = | 5416 Handle<Object> element = |
| 5417 Object::GetElement(isolate, stack_trace, i).ToHandleChecked(); | 5417 Object::GetElement(isolate, stack_trace, i).ToHandleChecked(); |
| 5418 CHECK(!element->IsCode()); | 5418 CHECK(!element->IsCode()); |
| 5419 } | 5419 } |
| 5420 } | 5420 } |
| OLD | NEW |