Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 78ff554fdb6d187b14ca4c3b5829b5ad2242f3d6..ce92d5b8f87714c6889e0d17e612bcd4a2fafb1f 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright 2011 the V8 project authors. All rights reserved. |
| +// Copyright 2012 the V8 project authors. All rights reserved. |
| // Redistribution and use in source and binary forms, with or without |
| // modification, are permitted provided that the following conditions are |
| // met: |
| @@ -985,13 +985,17 @@ class KeyedLoadElementStub : public CodeStub { |
| class KeyedStoreElementStub : public CodeStub { |
| public: |
| KeyedStoreElementStub(bool is_js_array, |
| - ElementsKind elements_kind) |
| + ElementsKind elements_kind, |
| + KeyedAccessGrowMode grow_mode) |
| : is_js_array_(is_js_array), |
|
Jakob Kummerow
2012/02/09 14:51:25
nit: 4-space indent
danno
2012/02/10 12:25:34
Done.
|
| - elements_kind_(elements_kind) { } |
| + elements_kind_(elements_kind), |
| + grow_mode_(grow_mode) { } |
| Major MajorKey() { return KeyedStoreElement; } |
| int MinorKey() { |
| - return (is_js_array_ ? 0 : kElementsKindCount) + elements_kind_; |
| + int multiplier = is_js_array_ ? 1 : 0; |
|
Vyacheslav Egorov (Chromium)
2012/02/10 00:19:18
is there any particular reason why you don't want
danno
2012/02/10 12:25:34
Done.
|
| + multiplier += (grow_mode_ == ALLOW_JSARRAY_GROWTH) ? 2 : 0; |
| + return (multiplier * kElementsKindCount) + elements_kind_; |
| } |
| void Generate(MacroAssembler* masm); |
| @@ -999,6 +1003,7 @@ class KeyedStoreElementStub : public CodeStub { |
| private: |
| bool is_js_array_; |
| ElementsKind elements_kind_; |
| + KeyedAccessGrowMode grow_mode_; |
| DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub); |
| }; |
| @@ -1076,11 +1081,13 @@ class ElementsTransitionAndStoreStub : public CodeStub { |
| ElementsTransitionAndStoreStub(ElementsKind from, |
| ElementsKind to, |
| bool is_jsarray, |
| - StrictModeFlag strict_mode) |
| + StrictModeFlag strict_mode, |
| + KeyedAccessGrowMode grow_mode) |
| : from_(from), |
| to_(to), |
| is_jsarray_(is_jsarray), |
| - strict_mode_(strict_mode) {} |
| + strict_mode_(strict_mode), |
| + grow_mode_(grow_mode) {} |
| private: |
| class FromBits: public BitField<ElementsKind, 0, 8> {}; |
| @@ -1102,6 +1109,7 @@ class ElementsTransitionAndStoreStub : public CodeStub { |
| ElementsKind to_; |
| bool is_jsarray_; |
| StrictModeFlag strict_mode_; |
| + KeyedAccessGrowMode grow_mode_; |
| DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); |
| }; |