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

Side by Side Diff: src/factory.cc

Issue 11377132: Support all fast elements kinds in the major array operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments (and rebased) Created 8 years, 1 month 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/elements.cc ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 961 }
962 962
963 963
964 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, 964 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements,
965 ElementsKind elements_kind, 965 ElementsKind elements_kind,
966 PretenureFlag pretenure) { 966 PretenureFlag pretenure) {
967 CALL_HEAP_FUNCTION( 967 CALL_HEAP_FUNCTION(
968 isolate(), 968 isolate(),
969 isolate()->heap()->AllocateJSArrayWithElements(*elements, 969 isolate()->heap()->AllocateJSArrayWithElements(*elements,
970 elements_kind, 970 elements_kind,
971 elements->length(),
971 pretenure), 972 pretenure),
972 JSArray); 973 JSArray);
973 } 974 }
974 975
975 976
976 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, 977 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array,
977 int capacity, 978 int capacity,
978 int length) { 979 int length) {
979 ElementsAccessor* accessor = array->GetElementsAccessor(); 980 ElementsAccessor* accessor = array->GetElementsAccessor();
980 CALL_HEAP_FUNCTION_VOID( 981 CALL_HEAP_FUNCTION_VOID(
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 1440
1440 1441
1441 Handle<Object> Factory::ToBoolean(bool value) { 1442 Handle<Object> Factory::ToBoolean(bool value) {
1442 return Handle<Object>(value 1443 return Handle<Object>(value
1443 ? isolate()->heap()->true_value() 1444 ? isolate()->heap()->true_value()
1444 : isolate()->heap()->false_value()); 1445 : isolate()->heap()->false_value());
1445 } 1446 }
1446 1447
1447 1448
1448 } } // namespace v8::internal 1449 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698