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

Side by Side Diff: src/factory.cc

Issue 9174023: Split NumberDictionary into a randomly seeded and an unseeded (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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/heap.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 71
72 Handle<StringDictionary> Factory::NewStringDictionary(int at_least_space_for) { 72 Handle<StringDictionary> Factory::NewStringDictionary(int at_least_space_for) {
73 ASSERT(0 <= at_least_space_for); 73 ASSERT(0 <= at_least_space_for);
74 CALL_HEAP_FUNCTION(isolate(), 74 CALL_HEAP_FUNCTION(isolate(),
75 StringDictionary::Allocate(at_least_space_for), 75 StringDictionary::Allocate(at_least_space_for),
76 StringDictionary); 76 StringDictionary);
77 } 77 }
78 78
79 79
80 Handle<NumberDictionary> Factory::NewNumberDictionary(int at_least_space_for) { 80 Handle<SeededNumberDictionary> Factory::NewSeededNumberDictionary(
81 int at_least_space_for) {
81 ASSERT(0 <= at_least_space_for); 82 ASSERT(0 <= at_least_space_for);
82 CALL_HEAP_FUNCTION(isolate(), 83 CALL_HEAP_FUNCTION(isolate(),
83 NumberDictionary::Allocate(at_least_space_for), 84 SeededNumberDictionary::Allocate(at_least_space_for),
84 NumberDictionary); 85 SeededNumberDictionary);
86 }
87
88
89 Handle<UnseededNumberDictionary> Factory::NewUnseededNumberDictionary(
90 int at_least_space_for) {
91 ASSERT(0 <= at_least_space_for);
92 CALL_HEAP_FUNCTION(isolate(),
93 UnseededNumberDictionary::Allocate(at_least_space_for),
94 UnseededNumberDictionary);
85 } 95 }
86 96
87 97
88 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { 98 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) {
89 ASSERT(0 <= at_least_space_for); 99 ASSERT(0 <= at_least_space_for);
90 CALL_HEAP_FUNCTION(isolate(), 100 CALL_HEAP_FUNCTION(isolate(),
91 ObjectHashSet::Allocate(at_least_space_for), 101 ObjectHashSet::Allocate(at_least_space_for),
92 ObjectHashSet); 102 ObjectHashSet);
93 } 103 }
94 104
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 isolate()->heap()->NumberToString(*number), String); 1074 isolate()->heap()->NumberToString(*number), String);
1065 } 1075 }
1066 1076
1067 1077
1068 Handle<String> Factory::Uint32ToString(uint32_t value) { 1078 Handle<String> Factory::Uint32ToString(uint32_t value) {
1069 CALL_HEAP_FUNCTION(isolate(), 1079 CALL_HEAP_FUNCTION(isolate(),
1070 isolate()->heap()->Uint32ToString(value), String); 1080 isolate()->heap()->Uint32ToString(value), String);
1071 } 1081 }
1072 1082
1073 1083
1074 Handle<NumberDictionary> Factory::DictionaryAtNumberPut( 1084 Handle<SeededNumberDictionary> Factory::DictionaryAtNumberPut(
1075 Handle<NumberDictionary> dictionary, 1085 Handle<SeededNumberDictionary> dictionary,
1076 uint32_t key, 1086 uint32_t key,
1077 Handle<Object> value) { 1087 Handle<Object> value) {
1078 CALL_HEAP_FUNCTION(isolate(), 1088 CALL_HEAP_FUNCTION(isolate(),
1079 dictionary->AtNumberPut(key, *value), 1089 dictionary->AtNumberPut(key, *value),
1080 NumberDictionary); 1090 SeededNumberDictionary);
1091 }
1092
1093
1094 Handle<UnseededNumberDictionary> Factory::DictionaryAtNumberPut(
1095 Handle<UnseededNumberDictionary> dictionary,
1096 uint32_t key,
1097 Handle<Object> value) {
1098 CALL_HEAP_FUNCTION(isolate(),
1099 dictionary->AtNumberPut(key, *value),
1100 UnseededNumberDictionary);
1081 } 1101 }
1082 1102
1083 1103
1084 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name, 1104 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name,
1085 Handle<Object> prototype) { 1105 Handle<Object> prototype) {
1086 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name); 1106 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name);
1087 CALL_HEAP_FUNCTION( 1107 CALL_HEAP_FUNCTION(
1088 isolate(), 1108 isolate(),
1089 isolate()->heap()->AllocateFunction(*isolate()->function_map(), 1109 isolate()->heap()->AllocateFunction(*isolate()->function_map(),
1090 *function_share, 1110 *function_share,
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 1411
1392 1412
1393 Handle<Object> Factory::ToBoolean(bool value) { 1413 Handle<Object> Factory::ToBoolean(bool value) {
1394 return Handle<Object>(value 1414 return Handle<Object>(value
1395 ? isolate()->heap()->true_value() 1415 ? isolate()->heap()->true_value()
1396 : isolate()->heap()->false_value()); 1416 : isolate()->heap()->false_value());
1397 } 1417 }
1398 1418
1399 1419
1400 } } // namespace v8::internal 1420 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698