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

Side by Side Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 1305383003: Move runtime helper for JSArrayBuffer onto objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-runtime-helpers-2
Patch Set: Self-nit. Created 5 years, 3 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 | « test/cctest/compiler/test-simplified-lowering.cc ('k') | no next file » | 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 MachineOperatorBuilder machine(zone()); 81 MachineOperatorBuilder machine(zone());
82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
83 // TODO(titzer): mock the GraphReducer here for better unit testing. 83 // TODO(titzer): mock the GraphReducer here for better unit testing.
84 GraphReducer graph_reducer(zone(), graph()); 84 GraphReducer graph_reducer(zone(), graph());
85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); 85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone());
86 return reducer.Reduce(node); 86 return reducer.Reduce(node);
87 } 87 }
88 88
89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { 89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); 90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
91 Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length); 91 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length);
92 return buffer; 92 return buffer;
93 } 93 }
94 94
95 Matcher<Node*> IsIntPtrConstant(intptr_t value) { 95 Matcher<Node*> IsIntPtrConstant(intptr_t value) {
96 return sizeof(value) == 4 ? IsInt32Constant(static_cast<int32_t>(value)) 96 return sizeof(value) == 4 ? IsInt32Constant(static_cast<int32_t>(value))
97 : IsInt64Constant(static_cast<int64_t>(value)); 97 : IsInt64Constant(static_cast<int64_t>(value));
98 } 98 }
99 99
100 JSOperatorBuilder* javascript() { return &javascript_; } 100 JSOperatorBuilder* javascript() { return &javascript_; }
101 101
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 EXPECT_THAT(r.replacement(), 1123 EXPECT_THAT(r.replacement(),
1124 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( 1124 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
1125 Context::MIN_CONTEXT_SLOTS)), 1125 Context::MIN_CONTEXT_SLOTS)),
1126 effect, control), 1126 effect, control),
1127 _)); 1127 _));
1128 } 1128 }
1129 1129
1130 } // namespace compiler 1130 } // namespace compiler
1131 } // namespace internal 1131 } // namespace internal
1132 } // namespace v8 1132 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698