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

Side by Side Diff: src/factory.cc

Issue 203583007: Support weak heap references in the ConstantPool to support IsWeakObjectInOptimizedCode objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 isolate(), 76 isolate(),
77 isolate()->heap()->AllocateUninitializedFixedDoubleArray(size, pretenure), 77 isolate()->heap()->AllocateUninitializedFixedDoubleArray(size, pretenure),
78 FixedDoubleArray); 78 FixedDoubleArray);
79 } 79 }
80 80
81 81
82 Handle<ConstantPoolArray> Factory::NewConstantPoolArray( 82 Handle<ConstantPoolArray> Factory::NewConstantPoolArray(
83 int number_of_int64_entries, 83 int number_of_int64_entries,
84 int number_of_code_ptr_entries, 84 int number_of_code_ptr_entries,
85 int number_of_heap_ptr_entries, 85 int number_of_heap_ptr_entries,
86 int number_of_weak_ptr_entries,
86 int number_of_int32_entries) { 87 int number_of_int32_entries) {
87 ASSERT(number_of_int64_entries > 0 || number_of_code_ptr_entries > 0 || 88 ASSERT(number_of_int64_entries > 0 || number_of_code_ptr_entries > 0 ||
88 number_of_heap_ptr_entries > 0 || number_of_int32_entries > 0); 89 number_of_heap_ptr_entries > 0 || number_of_weak_ptr_entries > 0 ||
90 number_of_int32_entries > 0);
89 CALL_HEAP_FUNCTION( 91 CALL_HEAP_FUNCTION(
90 isolate(), 92 isolate(),
91 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries, 93 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries,
92 number_of_code_ptr_entries, 94 number_of_code_ptr_entries,
93 number_of_heap_ptr_entries, 95 number_of_heap_ptr_entries,
96 number_of_weak_ptr_entries,
94 number_of_int32_entries), 97 number_of_int32_entries),
95 ConstantPoolArray); 98 ConstantPoolArray);
96 } 99 }
97 100
98 101
99 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) { 102 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) {
100 ASSERT(0 <= at_least_space_for); 103 ASSERT(0 <= at_least_space_for);
101 CALL_HEAP_FUNCTION(isolate(), 104 CALL_HEAP_FUNCTION(isolate(),
102 NameDictionary::Allocate(isolate()->heap(), 105 NameDictionary::Allocate(isolate()->heap(),
103 at_least_space_for), 106 at_least_space_for),
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 return Handle<Object>::null(); 2025 return Handle<Object>::null();
2023 } 2026 }
2024 2027
2025 2028
2026 Handle<Object> Factory::ToBoolean(bool value) { 2029 Handle<Object> Factory::ToBoolean(bool value) {
2027 return value ? true_value() : false_value(); 2030 return value ? true_value() : false_value();
2028 } 2031 }
2029 2032
2030 2033
2031 } } // namespace v8::internal 2034 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698