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

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

Issue 1375613005: Version 4.8.2.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.8.2
Patch Set: Created 5 years, 2 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 | « include/v8-version.h ('k') | src/compiler/js-typed-lowering.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 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 1208
1209 1209
1210 HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor( 1210 HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor(
1211 JSArrayBuilder* array_builder, ElementsKind kind) { 1211 JSArrayBuilder* array_builder, ElementsKind kind) {
1212 // Insert a bounds check because the number of arguments might exceed 1212 // Insert a bounds check because the number of arguments might exceed
1213 // the kInitialMaxFastElementArray limit. This cannot happen for code 1213 // the kInitialMaxFastElementArray limit. This cannot happen for code
1214 // that was parsed, but calling via Array.apply(thisArg, [...]) might 1214 // that was parsed, but calling via Array.apply(thisArg, [...]) might
1215 // trigger it. 1215 // trigger it.
1216 HValue* length = GetArgumentsLength(); 1216 HValue* length = GetArgumentsLength();
1217 HConstant* max_alloc_length = 1217 HConstant* max_alloc_length =
1218 Add<HConstant>(JSArray::kInitialMaxFastElementArray); 1218 Add<HConstant>(JSObject::kInitialMaxFastElementArray);
1219 HValue* checked_length = Add<HBoundsCheck>(length, max_alloc_length); 1219 HValue* checked_length = Add<HBoundsCheck>(length, max_alloc_length);
1220 1220
1221 // We need to fill with the hole if it's a smi array in the multi-argument 1221 // We need to fill with the hole if it's a smi array in the multi-argument
1222 // case because we might have to bail out while copying arguments into 1222 // case because we might have to bail out while copying arguments into
1223 // the array because they aren't compatible with a smi array. 1223 // the array because they aren't compatible with a smi array.
1224 // If it's a double array, no problem, and if it's fast then no 1224 // If it's a double array, no problem, and if it's fast then no
1225 // problem either because doubles are boxed. 1225 // problem either because doubles are boxed.
1226 // 1226 //
1227 // TODO(mvstanton): consider an instruction to memset fill the array 1227 // TODO(mvstanton): consider an instruction to memset fill the array
1228 // with zero in this case instead. 1228 // with zero in this case instead.
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 return Pop(); 2352 return Pop();
2353 } 2353 }
2354 2354
2355 2355
2356 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2356 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2357 return DoGenerateCode(this); 2357 return DoGenerateCode(this);
2358 } 2358 }
2359 2359
2360 } // namespace internal 2360 } // namespace internal
2361 } // namespace v8 2361 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698