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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/elements.h" | 8 #include "src/elements.h" |
9 #include "src/messages.h" | 9 #include "src/messages.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 return true; | 725 return true; |
726 } | 726 } |
727 | 727 |
728 | 728 |
729 static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) { | 729 static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) { |
730 HandleScope handle_scope(isolate); | 730 HandleScope handle_scope(isolate); |
731 if (!obj->IsSpecObject()) return false; | 731 if (!obj->IsSpecObject()) return false; |
732 if (FLAG_harmony_concat_spreadable) { | 732 if (FLAG_harmony_concat_spreadable) { |
733 Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol()); | 733 Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol()); |
734 Handle<Object> value; | 734 Handle<Object> value; |
735 MaybeHandle<Object> maybeValue = | 735 MaybeHandle<Object> maybeValue = i::Object::GetPropertyOrFallbackValue( |
736 i::Runtime::GetObjectProperty(isolate, obj, key); | 736 obj, key, Handle<Object>::cast(isolate->factory()->undefined_value())); |
737 if (maybeValue.ToHandle(&value)) { | 737 if (maybeValue.ToHandle(&value)) { |
738 if (!value->IsUndefined()) { | 738 if (!value->IsUndefined()) { |
739 return value->BooleanValue(); | 739 return value->BooleanValue(); |
740 } | 740 } |
741 } | 741 } |
742 } | 742 } |
743 return obj->IsJSArray(); | 743 return obj->IsJSArray(); |
744 } | 744 } |
745 | 745 |
746 | 746 |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 | 1320 |
1321 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { | 1321 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { |
1322 SealHandleScope shs(isolate); | 1322 SealHandleScope shs(isolate); |
1323 DCHECK(args.length() == 2); | 1323 DCHECK(args.length() == 2); |
1324 // Returning undefined means that this fast path fails and one has to resort | 1324 // Returning undefined means that this fast path fails and one has to resort |
1325 // to a slow path. | 1325 // to a slow path. |
1326 return isolate->heap()->undefined_value(); | 1326 return isolate->heap()->undefined_value(); |
1327 } | 1327 } |
1328 } // namespace internal | 1328 } // namespace internal |
1329 } // namespace v8 | 1329 } // namespace v8 |
OLD | NEW |