| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 Handle<String> Factory::NewRawTwoByteString(int length, | 86 Handle<String> Factory::NewRawTwoByteString(int length, |
| 87 PretenureFlag pretenure) { | 87 PretenureFlag pretenure) { |
| 88 CALL_HEAP_FUNCTION(Heap::AllocateRawTwoByteString(length, pretenure), String); | 88 CALL_HEAP_FUNCTION(Heap::AllocateRawTwoByteString(length, pretenure), String); |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 Handle<String> Factory::NewConsString(Handle<String> first, | 92 Handle<String> Factory::NewConsString(Handle<String> first, |
| 93 StringShape first_shape, | 93 Handle<String> second) { |
| 94 Handle<String> second, | 94 if (first->length() == 0) return second; |
| 95 StringShape second_shape) { | 95 if (second->length() == 0) return first; |
| 96 if (first->length(first_shape) == 0) return second; | |
| 97 if (second->length(second_shape) == 0) return first; | |
| 98 CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first, *second), String); | 96 CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first, *second), String); |
| 99 } | 97 } |
| 100 | 98 |
| 101 | 99 |
| 102 Handle<String> Factory::NewStringSlice(Handle<String> str, | 100 Handle<String> Factory::NewStringSlice(Handle<String> str, |
| 103 int begin, | 101 int begin, |
| 104 int end) { | 102 int end) { |
| 105 CALL_HEAP_FUNCTION(str->Slice(begin, end), String); | 103 CALL_HEAP_FUNCTION(str->Slice(begin, end), String); |
| 106 } | 104 } |
| 107 | 105 |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 Execution::ConfigureInstance(instance, | 893 Execution::ConfigureInstance(instance, |
| 896 instance_template, | 894 instance_template, |
| 897 pending_exception); | 895 pending_exception); |
| 898 } else { | 896 } else { |
| 899 *pending_exception = false; | 897 *pending_exception = false; |
| 900 } | 898 } |
| 901 } | 899 } |
| 902 | 900 |
| 903 | 901 |
| 904 } } // namespace v8::internal | 902 } } // namespace v8::internal |
| OLD | NEW |