Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: src/factory.cc

Issue 45010: Remove all uses of StringShape variables, since that has proven... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698