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

Side by Side Diff: src/factory.h

Issue 223413002: Partial recover from performance degradation after handlification of ElementsAccessor::CopyElements… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 8 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/elements.cc ('k') | src/factory.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FACTORY_H_ 5 #ifndef V8_FACTORY_H_
6 #define V8_FACTORY_H_ 6 #define V8_FACTORY_H_
7 7
8 #include "isolate.h" 8 #include "isolate.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ElementsKind elements_kind, 329 ElementsKind elements_kind,
330 int length, 330 int length,
331 int capacity, 331 int capacity,
332 ArrayStorageAllocationMode mode = INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, 332 ArrayStorageAllocationMode mode = INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE,
333 PretenureFlag pretenure = NOT_TENURED); 333 PretenureFlag pretenure = NOT_TENURED);
334 334
335 Handle<JSArray> NewJSArray( 335 Handle<JSArray> NewJSArray(
336 int capacity, 336 int capacity,
337 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND, 337 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
338 PretenureFlag pretenure = NOT_TENURED) { 338 PretenureFlag pretenure = NOT_TENURED) {
339 if (capacity != 0) {
340 elements_kind = GetHoleyElementsKind(elements_kind);
341 }
339 return NewJSArray(elements_kind, 0, capacity, 342 return NewJSArray(elements_kind, 0, capacity,
340 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, pretenure); 343 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, pretenure);
341 } 344 }
342 345
343 Handle<JSArray> NewJSArrayWithElements( 346 Handle<JSArray> NewJSArrayWithElements(
344 Handle<FixedArrayBase> elements, 347 Handle<FixedArrayBase> elements,
345 ElementsKind elements_kind, 348 ElementsKind elements_kind,
346 int length, 349 int length,
347 PretenureFlag pretenure = NOT_TENURED); 350 PretenureFlag pretenure = NOT_TENURED);
348 351
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 592
590 // Update the map cache in the native context with (keys, map) 593 // Update the map cache in the native context with (keys, map)
591 Handle<MapCache> AddToMapCache(Handle<Context> context, 594 Handle<MapCache> AddToMapCache(Handle<Context> context,
592 Handle<FixedArray> keys, 595 Handle<FixedArray> keys,
593 Handle<Map> map); 596 Handle<Map> map);
594 }; 597 };
595 598
596 } } // namespace v8::internal 599 } } // namespace v8::internal
597 600
598 #endif // V8_FACTORY_H_ 601 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698