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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 1221713003: Distinguish slow from fast sloppy arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.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 // 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/hydrogen.h" 10 #include "src/hydrogen.h"
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 BuildElementsKindLimitCheck(&kind_if, bit_field2, DICTIONARY_ELEMENTS); 2080 BuildElementsKindLimitCheck(&kind_if, bit_field2, DICTIONARY_ELEMENTS);
2081 { 2081 {
2082 HValue* elements = AddLoadElements(receiver); 2082 HValue* elements = AddLoadElements(receiver);
2083 2083
2084 HValue* hash = BuildElementIndexHash(key); 2084 HValue* hash = BuildElementIndexHash(key);
2085 2085
2086 Push(BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash)); 2086 Push(BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash));
2087 } 2087 }
2088 kind_if.Else(); 2088 kind_if.Else();
2089 2089
2090 // The SLOPPY_ARGUMENTS_ELEMENTS check generates a "kind_if.Then" 2090 // The SLOW_SLOPPY_ARGUMENTS_ELEMENTS check generates a "kind_if.Then"
2091 STATIC_ASSERT(FAST_SLOPPY_ARGUMENTS_ELEMENTS <
2092 SLOW_SLOPPY_ARGUMENTS_ELEMENTS);
2091 BuildElementsKindLimitCheck(&kind_if, bit_field2, 2093 BuildElementsKindLimitCheck(&kind_if, bit_field2,
2092 SLOPPY_ARGUMENTS_ELEMENTS); 2094 SLOW_SLOPPY_ARGUMENTS_ELEMENTS);
2093 // Non-strict elements are not handled. 2095 // Non-strict elements are not handled.
2094 Add<HDeoptimize>(Deoptimizer::kNonStrictElementsInKeyedLoadGenericStub, 2096 Add<HDeoptimize>(Deoptimizer::kNonStrictElementsInKeyedLoadGenericStub,
2095 Deoptimizer::EAGER); 2097 Deoptimizer::EAGER);
2096 Push(graph()->GetConstant0()); 2098 Push(graph()->GetConstant0());
2097 2099
2098 kind_if.Else(); 2100 kind_if.Else();
2099 BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2, 2101 BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
2100 EXTERNAL_INT8_ELEMENTS); 2102 EXTERNAL_INT8_ELEMENTS);
2101 2103
2102 kind_if.Else(); 2104 kind_if.Else();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 return Pop(); 2255 return Pop();
2254 } 2256 }
2255 2257
2256 2258
2257 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2259 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2258 return DoGenerateCode(this); 2260 return DoGenerateCode(this);
2259 } 2261 }
2260 2262
2261 } // namespace internal 2263 } // namespace internal
2262 } // namespace v8 2264 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698