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

Side by Side Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 456333002: Move MachineRepresentation to machine-type.h and rename to MachineType in preparation for merging i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-run-machops.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/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 Schedule* BuildGraphAndSchedule(Graph* graph) { 114 Schedule* BuildGraphAndSchedule(Graph* graph) {
115 Isolate* isolate = info.isolate(); 115 Isolate* isolate = info.isolate();
116 CommonOperatorBuilder common(zone()); 116 CommonOperatorBuilder common(zone());
117 117
118 // Manually construct a schedule for the function below: 118 // Manually construct a schedule for the function below:
119 // function foo() { 119 // function foo() {
120 // deopt(); 120 // deopt();
121 // } 121 // }
122 122
123 MachineRepresentation parameter_reps[] = {kMachineTagged}; 123 MachineType parameter_reps[] = {kMachineTagged};
124 MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 1, 124 MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 1,
125 parameter_reps); 125 parameter_reps);
126 126
127 RawMachineAssembler m(graph, &descriptor_builder); 127 RawMachineAssembler m(graph, &descriptor_builder);
128 128
129 Handle<Object> undef_object = 129 Handle<Object> undef_object =
130 Handle<Object>(isolate->heap()->undefined_value(), isolate); 130 Handle<Object>(isolate->heap()->undefined_value(), isolate);
131 PrintableUnique<Object> undef_constant = 131 PrintableUnique<Object> undef_constant =
132 PrintableUnique<Object>::CreateUninitialized(zone(), undef_object); 132 PrintableUnique<Object>::CreateUninitialized(zone(), undef_object);
133 Node* undef_node = m.NewNode(common.HeapConstant(undef_constant)); 133 Node* undef_node = m.NewNode(common.HeapConstant(undef_constant));
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 Schedule* BuildGraphAndSchedule(Graph* graph) { 250 Schedule* BuildGraphAndSchedule(Graph* graph) {
251 Isolate* isolate = info.isolate(); 251 Isolate* isolate = info.isolate();
252 CommonOperatorBuilder common(zone()); 252 CommonOperatorBuilder common(zone());
253 253
254 // Manually construct a schedule for the function below: 254 // Manually construct a schedule for the function below:
255 // function foo() { 255 // function foo() {
256 // %DeoptimizeFunction(foo); 256 // %DeoptimizeFunction(foo);
257 // } 257 // }
258 258
259 MachineRepresentation parameter_reps[] = {kMachineTagged}; 259 MachineType parameter_reps[] = {kMachineTagged};
260 MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 2, 260 MachineCallDescriptorBuilder descriptor_builder(kMachineTagged, 2,
261 parameter_reps); 261 parameter_reps);
262 262
263 RawMachineAssembler m(graph, &descriptor_builder); 263 RawMachineAssembler m(graph, &descriptor_builder);
264 264
265 Handle<Object> undef_object = 265 Handle<Object> undef_object =
266 Handle<Object>(isolate->heap()->undefined_value(), isolate); 266 Handle<Object>(isolate->heap()->undefined_value(), isolate);
267 PrintableUnique<Object> undef_constant = 267 PrintableUnique<Object> undef_constant =
268 PrintableUnique<Object>::CreateUninitialized(zone(), undef_object); 268 PrintableUnique<Object>::CreateUninitialized(zone(), undef_object);
269 Node* undef_node = m.NewNode(common.HeapConstant(undef_constant)); 269 Node* undef_node = m.NewNode(common.HeapConstant(undef_constant));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Handle<Object> result; 335 Handle<Object> result;
336 bool has_pending_exception = 336 bool has_pending_exception =
337 !Execution::Call(isolate, t.function, 337 !Execution::Call(isolate, t.function,
338 isolate->factory()->undefined_value(), 0, NULL, 338 isolate->factory()->undefined_value(), 0, NULL,
339 false).ToHandle(&result); 339 false).ToHandle(&result);
340 CHECK(!has_pending_exception); 340 CHECK(!has_pending_exception);
341 CHECK(result->SameValue(Smi::FromInt(42))); 341 CHECK(result->SameValue(Smi::FromInt(42)));
342 } 342 }
343 343
344 #endif 344 #endif
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698