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

Unified Diff: src/elements.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.h
diff --git a/src/elements.h b/src/elements.h
index 44644abd929abd6972608873cfeb50ada33d0af1..c245550b537d2e0275ec556ac875add8780a72dd 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -69,8 +69,12 @@ class ElementsAccessor {
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
- Handle<FixedArrayBase> backing_store =
- Handle<FixedArrayBase>::null()) = 0;
+ Handle<FixedArrayBase> backing_store) = 0;
+
+ MUST_USE_RESULT virtual Handle<Object> Get(
+ Handle<Object> receiver,
+ Handle<JSObject> holder,
+ uint32_t key) = 0;
MUST_USE_RESULT virtual MaybeObject* Get(
Object* receiver,
@@ -151,21 +155,30 @@ class ElementsAccessor {
// store is available, it can be passed in source and source_holder is
// ignored.
virtual void CopyElements(
- Handle<JSObject> source_holder,
+ Handle<FixedArrayBase> source,
+ uint32_t source_start,
+ ElementsKind source_kind,
+ Handle<FixedArrayBase> destination,
+ uint32_t destination_start,
+ int copy_size) = 0;
+
+ // TODO(ishell): Keeping |source_holder| parameter in a non-handlified form
+ // helps avoiding ArrayConcat() builtin performance degradation.
+ // Revisit this later.
+ virtual void CopyElements(
+ JSObject* source_holder,
uint32_t source_start,
ElementsKind source_kind,
Handle<FixedArrayBase> destination,
uint32_t destination_start,
- int copy_size,
- Handle<FixedArrayBase> source = Handle<FixedArrayBase>::null()) = 0;
+ int copy_size) = 0;
- void CopyElements(
+ inline void CopyElements(
Handle<JSObject> from_holder,
Handle<FixedArrayBase> to,
- ElementsKind from_kind,
- Handle<FixedArrayBase> from = Handle<FixedArrayBase>::null()) {
- CopyElements(from_holder, 0, from_kind, to, 0,
- kCopyToEndAndInitializeToHole, from);
+ ElementsKind from_kind) {
+ CopyElements(
+ *from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole);
}
MUST_USE_RESULT virtual MaybeObject* AddElementsToFixedArray(
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698