OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/conversions-inl.h" | 8 #include "src/conversions-inl.h" |
9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 645 |
646 // The trimming is performed on a newly allocated object, which is on a | 646 // The trimming is performed on a newly allocated object, which is on a |
647 // fresly allocated page or on an already swept page. Hence, the sweeper | 647 // fresly allocated page or on an already swept page. Hence, the sweeper |
648 // thread can not get confused with the filler creation. No synchronization | 648 // thread can not get confused with the filler creation. No synchronization |
649 // needed. | 649 // needed. |
650 // TODO(hpayer): We should shrink the large object page if the size | 650 // TODO(hpayer): We should shrink the large object page if the size |
651 // of the object changed significantly. | 651 // of the object changed significantly. |
652 if (!heap->lo_space()->Contains(*answer)) { | 652 if (!heap->lo_space()->Contains(*answer)) { |
653 heap->CreateFillerObjectAt(end_of_string, delta, ClearRecordedSlots::kNo); | 653 heap->CreateFillerObjectAt(end_of_string, delta, ClearRecordedSlots::kNo); |
654 } | 654 } |
655 heap->AdjustLiveBytes(*answer, -delta, Heap::CONCURRENT_TO_SWEEPER); | 655 heap->AdjustLiveBytes(*answer, -delta); |
656 return *answer; | 656 return *answer; |
657 } | 657 } |
658 | 658 |
659 namespace { | 659 namespace { |
660 | 660 |
661 Object* StringReplaceGlobalRegExpWithStringHelper( | 661 Object* StringReplaceGlobalRegExpWithStringHelper( |
662 Isolate* isolate, Handle<JSRegExp> regexp, Handle<String> subject, | 662 Isolate* isolate, Handle<JSRegExp> regexp, Handle<String> subject, |
663 Handle<String> replacement, Handle<RegExpMatchInfo> last_match_info) { | 663 Handle<String> replacement, Handle<RegExpMatchInfo> last_match_info) { |
664 CHECK(regexp->GetFlags() & JSRegExp::kGlobal); | 664 CHECK(regexp->GetFlags() & JSRegExp::kGlobal); |
665 | 665 |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 | 1451 |
1452 RUNTIME_FUNCTION(Runtime_IsRegExp) { | 1452 RUNTIME_FUNCTION(Runtime_IsRegExp) { |
1453 SealHandleScope shs(isolate); | 1453 SealHandleScope shs(isolate); |
1454 DCHECK(args.length() == 1); | 1454 DCHECK(args.length() == 1); |
1455 CONVERT_ARG_CHECKED(Object, obj, 0); | 1455 CONVERT_ARG_CHECKED(Object, obj, 0); |
1456 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); | 1456 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); |
1457 } | 1457 } |
1458 | 1458 |
1459 } // namespace internal | 1459 } // namespace internal |
1460 } // namespace v8 | 1460 } // namespace v8 |
OLD | NEW |