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

Side by Side Diff: src/runtime.cc

Issue 442024: Perform string add in generated code on IA-32 platforms... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 3765 matching lines...) Expand 10 before | Expand all | Expand 10 after
3776 // NewNumberFromDouble may return a Smi instead of a Number object 3776 // NewNumberFromDouble may return a Smi instead of a Number object
3777 return Heap::NewNumberFromDouble(x); 3777 return Heap::NewNumberFromDouble(x);
3778 } 3778 }
3779 3779
3780 3780
3781 static Object* Runtime_StringAdd(Arguments args) { 3781 static Object* Runtime_StringAdd(Arguments args) {
3782 NoHandleAllocation ha; 3782 NoHandleAllocation ha;
3783 ASSERT(args.length() == 2); 3783 ASSERT(args.length() == 2);
3784 CONVERT_CHECKED(String, str1, args[0]); 3784 CONVERT_CHECKED(String, str1, args[0]);
3785 CONVERT_CHECKED(String, str2, args[1]); 3785 CONVERT_CHECKED(String, str2, args[1]);
3786 Counters::string_add_runtime.Increment();
3786 return Heap::AllocateConsString(str1, str2); 3787 return Heap::AllocateConsString(str1, str2);
3787 } 3788 }
3788 3789
3789 3790
3790 template<typename sinkchar> 3791 template<typename sinkchar>
3791 static inline void StringBuilderConcatHelper(String* special, 3792 static inline void StringBuilderConcatHelper(String* special,
3792 sinkchar* sink, 3793 sinkchar* sink,
3793 FixedArray* fixed_array, 3794 FixedArray* fixed_array,
3794 int array_length) { 3795 int array_length) {
3795 int position = 0; 3796 int position = 0;
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after
7958 } else { 7959 } else {
7959 // Handle last resort GC and make sure to allow future allocations 7960 // Handle last resort GC and make sure to allow future allocations
7960 // to grow the heap without causing GCs (if possible). 7961 // to grow the heap without causing GCs (if possible).
7961 Counters::gc_last_resort_from_js.Increment(); 7962 Counters::gc_last_resort_from_js.Increment();
7962 Heap::CollectAllGarbage(false); 7963 Heap::CollectAllGarbage(false);
7963 } 7964 }
7964 } 7965 }
7965 7966
7966 7967
7967 } } // namespace v8::internal 7968 } } // namespace v8::internal
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/ia32/macro-assembler-ia32.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698