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

Side by Side Diff: src/factory.cc

Issue 22601003: Out-of-line constant pool on Arm: Stage 2 - Introduce ConstantPoolArray object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Enable pointers to be stored in ConstantPoolArray and add tests Created 7 years, 2 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/globals.h » ('j') | src/objects.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 Handle<FixedDoubleArray> Factory::NewFixedDoubleArray(int size, 72 Handle<FixedDoubleArray> Factory::NewFixedDoubleArray(int size,
73 PretenureFlag pretenure) { 73 PretenureFlag pretenure) {
74 ASSERT(0 <= size); 74 ASSERT(0 <= size);
75 CALL_HEAP_FUNCTION( 75 CALL_HEAP_FUNCTION(
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(
83 int number_of_int64_entries,
84 int number_of_ptr_entries,
85 int number_of_int32_entries) {
86 ASSERT(number_of_int64_entries > 0 || number_of_ptr_entries > 0 ||
87 number_of_int32_entries > 0);
88 CALL_HEAP_FUNCTION(
89 isolate(),
90 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries,
91 number_of_ptr_entries,
92 number_of_int32_entries),
93 ConstantPoolArray);
94 }
95
96
82 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) { 97 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) {
83 ASSERT(0 <= at_least_space_for); 98 ASSERT(0 <= at_least_space_for);
84 CALL_HEAP_FUNCTION(isolate(), 99 CALL_HEAP_FUNCTION(isolate(),
85 NameDictionary::Allocate(isolate()->heap(), 100 NameDictionary::Allocate(isolate()->heap(),
86 at_least_space_for), 101 at_least_space_for),
87 NameDictionary); 102 NameDictionary);
88 } 103 }
89 104
90 105
91 Handle<SeededNumberDictionary> Factory::NewSeededNumberDictionary( 106 Handle<SeededNumberDictionary> Factory::NewSeededNumberDictionary(
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray); 617 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray);
603 } 618 }
604 619
605 620
606 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray( 621 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray(
607 Handle<FixedDoubleArray> array) { 622 Handle<FixedDoubleArray> array) {
608 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray); 623 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray);
609 } 624 }
610 625
611 626
627 Handle<ConstantPoolArray> Factory::CopyConstantPoolArray(
628 Handle<ConstantPoolArray> array) {
629 CALL_HEAP_FUNCTION(isolate(), array->Copy(), ConstantPoolArray);
630 }
631
632
612 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( 633 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo(
613 Handle<SharedFunctionInfo> function_info, 634 Handle<SharedFunctionInfo> function_info,
614 Handle<Map> function_map, 635 Handle<Map> function_map,
615 PretenureFlag pretenure) { 636 PretenureFlag pretenure) {
616 CALL_HEAP_FUNCTION( 637 CALL_HEAP_FUNCTION(
617 isolate(), 638 isolate(),
618 isolate()->heap()->AllocateFunction(*function_map, 639 isolate()->heap()->AllocateFunction(*function_map,
619 *function_info, 640 *function_info,
620 isolate()->heap()->the_hole_value(), 641 isolate()->heap()->the_hole_value(),
621 pretenure), 642 pretenure),
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 return Handle<Object>::null(); 1652 return Handle<Object>::null();
1632 } 1653 }
1633 1654
1634 1655
1635 Handle<Object> Factory::ToBoolean(bool value) { 1656 Handle<Object> Factory::ToBoolean(bool value) {
1636 return value ? true_value() : false_value(); 1657 return value ? true_value() : false_value();
1637 } 1658 }
1638 1659
1639 1660
1640 } } // namespace v8::internal 1661 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/globals.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698