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

Side by Side Diff: src/factory.cc

Issue 9190001: Backport @10366 to 3.6 Base URL: http://v8.googlecode.com/svn/branches/3.6/
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
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<ObjectHashTable> Factory::NewObjectHashTable(int at_least_space_for) { 98 Handle<ObjectHashTable> Factory::NewObjectHashTable(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 ObjectHashTable::Allocate(at_least_space_for), 101 ObjectHashTable::Allocate(at_least_space_for),
92 ObjectHashTable); 102 ObjectHashTable);
93 } 103 }
94 104
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 SharedFunctionInfo); 993 SharedFunctionInfo);
984 } 994 }
985 995
986 996
987 Handle<String> Factory::NumberToString(Handle<Object> number) { 997 Handle<String> Factory::NumberToString(Handle<Object> number) {
988 CALL_HEAP_FUNCTION(isolate(), 998 CALL_HEAP_FUNCTION(isolate(),
989 isolate()->heap()->NumberToString(*number), String); 999 isolate()->heap()->NumberToString(*number), String);
990 } 1000 }
991 1001
992 1002
993 Handle<NumberDictionary> Factory::DictionaryAtNumberPut( 1003 Handle<SeededNumberDictionary> Factory::DictionaryAtNumberPut(
994 Handle<NumberDictionary> dictionary, 1004 Handle<SeededNumberDictionary> dictionary,
995 uint32_t key, 1005 uint32_t key,
996 Handle<Object> value) { 1006 Handle<Object> value) {
997 CALL_HEAP_FUNCTION(isolate(), 1007 CALL_HEAP_FUNCTION(isolate(),
998 dictionary->AtNumberPut(key, *value), 1008 dictionary->AtNumberPut(key, *value),
999 NumberDictionary); 1009 SeededNumberDictionary);
1010 }
1011
1012
1013 Handle<UnseededNumberDictionary> Factory::DictionaryAtNumberPut(
1014 Handle<UnseededNumberDictionary> dictionary,
1015 uint32_t key,
1016 Handle<Object> value) {
1017 CALL_HEAP_FUNCTION(isolate(),
1018 dictionary->AtNumberPut(key, *value),
1019 UnseededNumberDictionary);
1000 } 1020 }
1001 1021
1002 1022
1003 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name, 1023 Handle<JSFunction> Factory::NewFunctionHelper(Handle<String> name,
1004 Handle<Object> prototype) { 1024 Handle<Object> prototype) {
1005 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name); 1025 Handle<SharedFunctionInfo> function_share = NewSharedFunctionInfo(name);
1006 CALL_HEAP_FUNCTION( 1026 CALL_HEAP_FUNCTION(
1007 isolate(), 1027 isolate(),
1008 isolate()->heap()->AllocateFunction(*isolate()->function_map(), 1028 isolate()->heap()->AllocateFunction(*isolate()->function_map(),
1009 *function_share, 1029 *function_share,
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 Execution::ConfigureInstance(instance, 1313 Execution::ConfigureInstance(instance,
1294 instance_template, 1314 instance_template,
1295 pending_exception); 1315 pending_exception);
1296 } else { 1316 } else {
1297 *pending_exception = false; 1317 *pending_exception = false;
1298 } 1318 }
1299 } 1319 }
1300 1320
1301 1321
1302 } } // namespace v8::internal 1322 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698