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

Side by Side Diff: src/factory.cc

Issue 669060: Add runtime function for string to array conversion. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | src/runtime.cc » ('J')
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 25 matching lines...) Expand all
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 39
40 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { 40 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) {
41 ASSERT(0 <= size); 41 ASSERT(0 <= size);
42 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray); 42 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray);
43 } 43 }
44 44
45 45
46 Handle<FixedArray> Factory::NewUninitializedFixedArray(int size) {
47 ASSERT(0 <= size);
antonm 2010/03/04 13:23:15 I am not sure we should ever allocate empty fixed
Vitaly Repeshko 2010/03/04 13:25:59 We won't. Heap::Allocate... returns a singleton in
48 CALL_HEAP_FUNCTION(Heap::AllocateUninitializedFixedArray(size), FixedArray);
49 }
50
51
46 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size) { 52 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size) {
47 ASSERT(0 <= size); 53 ASSERT(0 <= size);
48 CALL_HEAP_FUNCTION(Heap::AllocateFixedArrayWithHoles(size), FixedArray); 54 CALL_HEAP_FUNCTION(Heap::AllocateFixedArrayWithHoles(size), FixedArray);
49 } 55 }
50 56
51 57
52 Handle<StringDictionary> Factory::NewStringDictionary(int at_least_space_for) { 58 Handle<StringDictionary> Factory::NewStringDictionary(int at_least_space_for) {
53 ASSERT(0 <= at_least_space_for); 59 ASSERT(0 <= at_least_space_for);
54 CALL_HEAP_FUNCTION(StringDictionary::Allocate(at_least_space_for), 60 CALL_HEAP_FUNCTION(StringDictionary::Allocate(at_least_space_for),
55 StringDictionary); 61 StringDictionary);
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 Execution::ConfigureInstance(instance, 962 Execution::ConfigureInstance(instance,
957 instance_template, 963 instance_template,
958 pending_exception); 964 pending_exception);
959 } else { 965 } else {
960 *pending_exception = false; 966 *pending_exception = false;
961 } 967 }
962 } 968 }
963 969
964 970
965 } } // namespace v8::internal 971 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698