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

Side by Side Diff: src/compiler/js-builtin-reducer.cc

Issue 2640283002: Several bug fixes which missed 5.7 (Closed)
Patch Set: Created 3 years, 11 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/compiler/access-builder.cc ('k') | src/compiler/js-generic-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 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 #include "src/compiler/js-builtin-reducer.h" 5 #include "src/compiler/js-builtin-reducer.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/compilation-dependencies.h" 8 #include "src/compilation-dependencies.h"
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 DCHECK_LE(map_index, Context::GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX); 313 DCHECK_LE(map_index, Context::GENERIC_ARRAY_VALUE_ITERATOR_MAP_INDEX);
314 314
315 Handle<Map> map(Map::cast(native_context()->get(map_index)), isolate()); 315 Handle<Map> map(Map::cast(native_context()->get(map_index)), isolate());
316 316
317 // allocate new iterator 317 // allocate new iterator
318 effect = graph()->NewNode( 318 effect = graph()->NewNode(
319 common()->BeginRegion(RegionObservability::kNotObservable), effect); 319 common()->BeginRegion(RegionObservability::kNotObservable), effect);
320 Node* value = effect = graph()->NewNode( 320 Node* value = effect = graph()->NewNode(
321 simplified()->Allocate(NOT_TENURED), 321 simplified()->Allocate(NOT_TENURED),
322 jsgraph()->Constant(JSArrayIterator::kSize), effect, control); 322 jsgraph()->Constant(JSArrayIterator::kSize), effect, control);
323 NodeProperties::SetType(value, Type::OtherObject());
323 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), 324 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()),
324 value, jsgraph()->Constant(map), effect, control); 325 value, jsgraph()->Constant(map), effect, control);
325 effect = graph()->NewNode( 326 effect = graph()->NewNode(
326 simplified()->StoreField(AccessBuilder::ForJSObjectProperties()), value, 327 simplified()->StoreField(AccessBuilder::ForJSObjectProperties()), value,
327 jsgraph()->EmptyFixedArrayConstant(), effect, control); 328 jsgraph()->EmptyFixedArrayConstant(), effect, control);
328 effect = graph()->NewNode( 329 effect = graph()->NewNode(
329 simplified()->StoreField(AccessBuilder::ForJSObjectElements()), value, 330 simplified()->StoreField(AccessBuilder::ForJSObjectElements()), value,
330 jsgraph()->EmptyFixedArrayConstant(), effect, control); 331 jsgraph()->EmptyFixedArrayConstant(), effect, control);
331 332
332 // attach the iterator to this object 333 // attach the iterator to this object
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 1750
1750 Node* map = jsgraph()->HeapConstant( 1751 Node* map = jsgraph()->HeapConstant(
1751 handle(native_context()->string_iterator_map(), isolate())); 1752 handle(native_context()->string_iterator_map(), isolate()));
1752 1753
1753 // allocate new iterator 1754 // allocate new iterator
1754 effect = graph()->NewNode( 1755 effect = graph()->NewNode(
1755 common()->BeginRegion(RegionObservability::kNotObservable), effect); 1756 common()->BeginRegion(RegionObservability::kNotObservable), effect);
1756 Node* value = effect = graph()->NewNode( 1757 Node* value = effect = graph()->NewNode(
1757 simplified()->Allocate(NOT_TENURED), 1758 simplified()->Allocate(NOT_TENURED),
1758 jsgraph()->Constant(JSStringIterator::kSize), effect, control); 1759 jsgraph()->Constant(JSStringIterator::kSize), effect, control);
1760 NodeProperties::SetType(value, Type::OtherObject());
1759 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), 1761 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()),
1760 value, map, effect, control); 1762 value, map, effect, control);
1761 effect = graph()->NewNode( 1763 effect = graph()->NewNode(
1762 simplified()->StoreField(AccessBuilder::ForJSObjectProperties()), value, 1764 simplified()->StoreField(AccessBuilder::ForJSObjectProperties()), value,
1763 jsgraph()->EmptyFixedArrayConstant(), effect, control); 1765 jsgraph()->EmptyFixedArrayConstant(), effect, control);
1764 effect = graph()->NewNode( 1766 effect = graph()->NewNode(
1765 simplified()->StoreField(AccessBuilder::ForJSObjectElements()), value, 1767 simplified()->StoreField(AccessBuilder::ForJSObjectElements()), value,
1766 jsgraph()->EmptyFixedArrayConstant(), effect, control); 1768 jsgraph()->EmptyFixedArrayConstant(), effect, control);
1767 1769
1768 // attach the iterator to this string 1770 // attach the iterator to this string
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 return jsgraph()->simplified(); 2183 return jsgraph()->simplified();
2182 } 2184 }
2183 2185
2184 JSOperatorBuilder* JSBuiltinReducer::javascript() const { 2186 JSOperatorBuilder* JSBuiltinReducer::javascript() const {
2185 return jsgraph()->javascript(); 2187 return jsgraph()->javascript();
2186 } 2188 }
2187 2189
2188 } // namespace compiler 2190 } // namespace compiler
2189 } // namespace internal 2191 } // namespace internal
2190 } // namespace v8 2192 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698